From 2464df609f3525d24d0fb3e657eafb1fc3c16c4f Mon Sep 17 00:00:00 2001 From: Black Ram <67595890+BlackRam-oss@users.noreply.github.com> Date: Mon, 14 Oct 2024 11:59:08 +0200 Subject: [PATCH 1/2] improve --- README.md | 2 +- src/components/ModalConfirmation.tsx | 2 +- src/components/NextButton.tsx | 2 +- src/screens/GameSaveScreen.tsx | 4 ++-- src/screens/HistoryScreen.tsx | 2 +- src/screens/MainMenu.tsx | 2 +- src/screens/QuickTools.tsx | 2 +- src/screens/Settings.tsx | 4 ++-- src/screens/modals/SaveLoadAlert.tsx | 2 +- src/screens/modals/TextInput.tsx | 2 +- src/values/translations/strings_en.json | 4 ++-- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 5e51a6a..4dd969a 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ If you use Visual Studio Code, you can use the debug configuration that comes wi * `Shift` + `L`: Quick load the game. * `Shift` + `H`: Open the history modal. * `Esc`: Open the settings modal. -* `Shift` + `V`: Hide the Interface (Show only the canvas). +* `Shift` + `V`: Hide the UI (Show only the canvas). ## Used libraries diff --git a/src/components/ModalConfirmation.tsx b/src/components/ModalConfirmation.tsx index 513216f..9fb98d9 100644 --- a/src/components/ModalConfirmation.tsx +++ b/src/components/ModalConfirmation.tsx @@ -21,7 +21,7 @@ export default function ModalConfirmation(props: ModalConfirmationProps) { , startDecorator , ...rest } = props - const { t } = useTranslation(["interface"]); + const { t } = useTranslation(["ui"]); const [loadingConfirm, setLoadingConfirm] = useState(false) return ( diff --git a/src/components/NextButton.tsx b/src/components/NextButton.tsx index c0026ed..1a312e9 100644 --- a/src/components/NextButton.tsx +++ b/src/components/NextButton.tsx @@ -20,7 +20,7 @@ export default function NextButton({ nextOnClick }: { const hideNextButton = useRecoilValue(hideInterfaceState) || !canGoNext const { enqueueSnackbar } = useSnackbar(); const navigate = useMyNavigate(); - const { t } = useTranslation(["interface"]); + const { t } = useTranslation(["ui"]); const { t: tNarration } = useTranslation(["narration"]); useEffect(() => { window.addEventListener("keypress", onkeypress); diff --git a/src/screens/GameSaveScreen.tsx b/src/screens/GameSaveScreen.tsx index f93b955..fe8616e 100644 --- a/src/screens/GameSaveScreen.tsx +++ b/src/screens/GameSaveScreen.tsx @@ -23,7 +23,7 @@ import { downloadGameSave, loadGameSaveFromFile } from '../utilities/save-utilit export default function GameSaveScreen() { const [open, setOpen] = useRecoilState(openGameSaveScreenState); - const { t } = useTranslation(["interface"]); + const { t } = useTranslation(["ui"]); const smScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down("lg")); const setOpenLoadAlert = useSetRecoilState(saveLoadAlertState); const [page, setPage] = useRecoilState(saveScreenPageState); @@ -128,7 +128,7 @@ function GameSaveSlot({ saveId, onDelete, onLoad, onOverwriteSave, onSave }: { onOverwriteSave: (data: GameSaveData) => Promise | void, onLoad: (saveData: GameSaveData) => Promise | void, }) { - const { t } = useTranslation(["interface"]); + const { t } = useTranslation(["ui"]); const { isLoading, data: saveData, diff --git a/src/screens/HistoryScreen.tsx b/src/screens/HistoryScreen.tsx index a29a4ff..404ce5f 100644 --- a/src/screens/HistoryScreen.tsx +++ b/src/screens/HistoryScreen.tsx @@ -16,7 +16,7 @@ import ModalDialogCustom from '../components/ModalDialog'; export default function HistoryScreen() { const [open, setOpen] = useRecoilState(openHistoryScreenState); const [searchString, setSearchString] = useState("") - const { t } = useTranslation(["interface"]); + const { t } = useTranslation(["ui"]); const smScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down("md")); const { t: tNarration } = useTranslation(["narration"]); diff --git a/src/screens/MainMenu.tsx b/src/screens/MainMenu.tsx index 5ac366a..4968c43 100644 --- a/src/screens/MainMenu.tsx +++ b/src/screens/MainMenu.tsx @@ -21,7 +21,7 @@ export default function MainMenu() { const setHideInterface = useSetRecoilState(hideInterfaceState); const setGameSaveScreen = useSetRecoilState(openGameSaveScreenState); const { enqueueSnackbar } = useSnackbar(); - const { t } = useTranslation(["interface"]); + const { t } = useTranslation(["ui"]); const { t: tNarration } = useTranslation(["narration"]); const queryClient = useQueryClient() const { data: lastSave = null, isLoading } = useQueryLastSave() diff --git a/src/screens/QuickTools.tsx b/src/screens/QuickTools.tsx index b4a2499..b7c8c7b 100644 --- a/src/screens/QuickTools.tsx +++ b/src/screens/QuickTools.tsx @@ -26,7 +26,7 @@ export default function QuickTools() { const openSaveScreen = useSetRecoilState(openGameSaveScreenState); const navigate = useMyNavigate(); const setOpenLoadAlert = useSetRecoilState(saveLoadAlertState); - const { t } = useTranslation(["interface"]); + const { t } = useTranslation(["ui"]); const [hideInterface, setHideInterface] = useRecoilState(hideInterfaceState); const [skip, setSkip] = useRecoilState(skipEnabledState) const [auto, setAuto] = useRecoilState(autoInfoState) diff --git a/src/screens/Settings.tsx b/src/screens/Settings.tsx index 27d9ce1..14bd65f 100644 --- a/src/screens/Settings.tsx +++ b/src/screens/Settings.tsx @@ -54,7 +54,7 @@ export default function Settings() { const [openYouSure, setOpenYouSure] = useState(false) const [typewriterDelay, setTypewriterDelay] = useRecoilState(typewriterDelayState) const [fullScreenEnabled, setFullScreenEnabled] = useState(false) - const { t } = useTranslation(["interface"]); + const { t } = useTranslation(["ui"]); const [skip, setSkip] = useRecoilState(skipEnabledState) const [auto, setAuto] = useRecoilState(autoInfoState) const setOpenHistory = useSetRecoilState(openHistoryScreenState); @@ -261,7 +261,7 @@ export default function Settings() { onClick={() => setHideInterface((prev) => !prev)} > - {t("hide_interface")} + {t("hide_ui")} ("") diff --git a/src/screens/modals/TextInput.tsx b/src/screens/modals/TextInput.tsx index 9579ea7..eefa6a8 100644 --- a/src/screens/modals/TextInput.tsx +++ b/src/screens/modals/TextInput.tsx @@ -15,7 +15,7 @@ export default function TextInput() { const open = (!useRecoilValue(typewriterIsAnimatedState)) && isRequired const [tempValue, setTempValue] = useState(); const queryClient = useQueryClient() - const { t } = useTranslation(["interface"]); + const { t } = useTranslation(["ui"]); return ( Date: Mon, 14 Oct 2024 15:40:26 +0200 Subject: [PATCH 2/2] update --- package-lock.json | 32 ++++++++++++++++---------------- package.json | 6 +++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index defd6e1..6c1181a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,14 +8,14 @@ "name": "my-app", "version": "0.1.0", "dependencies": { - "@drincs/pixi-vn": "^0.8.2", + "@drincs/pixi-vn": "^0.8.3", "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^6.1.3", "@mui/joy": "^5.0.0-beta.28", "@tanstack/react-query": "^5.59.13", "framer-motion": "^11.11.8", - "i18next": "^23.15.2", + "i18next": "^23.16.0", "i18next-browser-languagedetector": "^8.0.0", "notistack": "^3.0.1", "react": "^18.3.1", @@ -41,7 +41,7 @@ "eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-refresh": "^0.4.12", "typescript": "^5.6.3", - "vite": "^5.4.8", + "vite": "^5.4.9", "vite-plugin-pwa": "^0.20.5" } }, @@ -1663,13 +1663,13 @@ } }, "node_modules/@drincs/pixi-vn": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-0.8.2.tgz", - "integrity": "sha512-+PzFZgGQXXeSIykzYgQIZrikVTyF9BX/LMzXS5uFRHyCUUdnqI9k7lMRumlBU3y1cOM6KSU88pQcWWJiMItQuQ==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-0.8.3.tgz", + "integrity": "sha512-I5QMBq7OHBQbwzIZ9FT6SGMXqMwVC5CxvWXsDoR+mOX81Crf+FRr2PmGBHdxq/ABI+ZKW/xrv/Q5CdA3G+G3KQ==", "license": "GPL-3.0", "dependencies": { "@pixi/sound": "^6.0.1", - "pixi.js": "^8.4.1" + "pixi.js": "^8.5.1" }, "funding": { "url": "https://github.com/DRincs-Productions/pixi-vn?sponsor=1" @@ -5812,9 +5812,9 @@ } }, "node_modules/i18next": { - "version": "23.15.2", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.15.2.tgz", - "integrity": "sha512-zcPSWzCvw6uKnuYHIqs4W7hTuB9e3AFcSdZgvCWoPXIZsBjBd4djN2/2uOHIB+1DFFkQnMBXvhNg7J3WyCuywQ==", + "version": "23.16.0", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.0.tgz", + "integrity": "sha512-Ni3CG6c14teOogY19YNRl+kYaE/Rb59khy0VyHVn4uOZ97E2E/Yziyi6r3C3s9+wacjdLZiq/LLYyx+Cgd+FCw==", "funding": [ { "type": "individual", @@ -7895,9 +7895,9 @@ } }, "node_modules/pixi.js": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.5.0.tgz", - "integrity": "sha512-C3UouBCqZZskKAkI63JrROUDUZF27avtmzq5udyVHJNRK/noZsS38YfQgx6SMANOIuuMSQ3jWnqD07mtCPmpeA==", + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.5.1.tgz", + "integrity": "sha512-yYj8tWehUfH7or/34gf17XyZGnyjiG8toMH8oy9gP+4GjLK+/WjFLlRqaP0AECB8XGF8AJxgkS5y2aMDHqx11A==", "license": "MIT", "dependencies": { "@pixi/colord": "^2.9.6", @@ -9501,9 +9501,9 @@ } }, "node_modules/vite": { - "version": "5.4.8", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz", - "integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==", + "version": "5.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.9.tgz", + "integrity": "sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==", "license": "MIT", "dependencies": { "esbuild": "^0.21.3", diff --git a/package.json b/package.json index 5592409..2eca567 100644 --- a/package.json +++ b/package.json @@ -11,14 +11,14 @@ "preview": "vite preview" }, "dependencies": { - "@drincs/pixi-vn": "^0.8.2", + "@drincs/pixi-vn": "^0.8.3", "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^6.1.3", "@mui/joy": "^5.0.0-beta.28", "@tanstack/react-query": "^5.59.13", "framer-motion": "^11.11.8", - "i18next": "^23.15.2", + "i18next": "^23.16.0", "i18next-browser-languagedetector": "^8.0.0", "notistack": "^3.0.1", "react": "^18.3.1", @@ -44,7 +44,7 @@ "eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-refresh": "^0.4.12", "typescript": "^5.6.3", - "vite": "^5.4.8", + "vite": "^5.4.9", "vite-plugin-pwa": "^0.20.5" }, "keywords": [