diff --git a/client/src/components/chat.tsx b/client/src/components/chat.tsx index 8e4fcff..e9b06d2 100644 --- a/client/src/components/chat.tsx +++ b/client/src/components/chat.tsx @@ -14,6 +14,7 @@ import { GameHint, InteractiveGoalsWithHints } from './infoview/rpc_api' import { lastStepHasErrors } from './infoview/goals' import '../css/chat.css' +import { faHome } from '@fortawesome/free-solid-svg-icons' /** Split a string by double newlines and filters out empty segments. */ function splitIntro (intro : string) { @@ -72,12 +73,14 @@ export function ChatButtons ({counter=undefined, setCounter=()=>{}, introMessage setCounter?: React.Dispatch> introMessages?: GameHintWithStep[] }) { + let { t } = useTranslation() const { mobile } = useContext(PreferencesContext) const { gameId, worldId, levelId } = useContext(GameIdContext) const {setPage} = useContext(PageContext) const dispatch = useAppDispatch() const gameInfo = useGetGameInfoQuery({game: gameId}) + const { proof } = useContext(ProofContext) const readIntro = useSelector(selectReadIntro(gameId, worldId)) @@ -124,6 +127,20 @@ export function ChatButtons ({counter=undefined, setCounter=()=>{}, introMessage )} { (worldId && levelId) ? : <> } + { (worldId && levelId && proof?.completed) ? + (levelId == gameInfo.data?.worldSize[worldId] ? + : + + ) : <> } } diff --git a/client/src/css/infoview.css b/client/src/css/infoview.css index 8d0f164..62811c0 100644 --- a/client/src/css/infoview.css +++ b/client/src/css/infoview.css @@ -193,6 +193,7 @@ .goal-tab { /* border: 2px dotted darkgreen; */ + padding: .2rem; display: flex; flex-direction: row; font-family: "JuliaMono", monospace;