diff --git a/frontend/src/pages/Settings.tsx b/frontend/src/pages/Settings.tsx index f3c84e1..549a5b3 100644 --- a/frontend/src/pages/Settings.tsx +++ b/frontend/src/pages/Settings.tsx @@ -1,4 +1,12 @@ -import { Input, Button, CircularProgress } from "@mui/joy"; +import { + Input, + Button, + CircularProgress, + Typography, + Sheet, + Chip, + Divider, +} from "@mui/joy"; import { useForm } from "@tanstack/react-form"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import Cookies from "js-cookie"; @@ -44,34 +52,105 @@ export const Settings = () => { return ( <> - {settingsPending ? ( - - ) : ( -
{ - e.preventDefault(); - form.handleSubmit(); - }} - > - - {(field) => ( - field.handleChange(e.target.value)} - /> - )} - - - {(field) => ( - field.handleChange(e.target.value)} - /> - )} - - -
- )} +
+
+
+ + {t("settings")} + + + {t("settings-sub")} + +
+ + {t("preferences")} + +
+
+ + + {settingsPending ? ( +
+ +
+ ) : ( +
{ + e.preventDefault(); + form.handleSubmit(); + }} + > +
+
+
+ + {t("app-name")} + + + {t("app-name-sub")} + + + {(field) => ( + field.handleChange(e.target.value)} + size="lg" + variant="outlined" + placeholder="Stockhome" + className="rounded-2xl bg-white/90 shadow-[0_10px_24px_rgba(15,23,42,0.08)]" + /> + )} + +
+
+ + {t("currency")} + + + {t("currency-sub")} + + + {(field) => ( + field.handleChange(e.target.value)} + size="lg" + variant="outlined" + placeholder="EUR" + className="rounded-2xl bg-white/90 shadow-[0_10px_24px_rgba(15,23,42,0.08)]" + /> + )} + +
+
+
+ + {t("quick-tips")} + + +
+

{t("quick-tips-1")}

+

{t("quick-tips-2")}

+
+
+
+
+ +
+
+ )} +
); }; diff --git a/frontend/src/utils/i18n/locales/en/en.json b/frontend/src/utils/i18n/locales/en/en.json index e05444a..2b32690 100644 --- a/frontend/src/utils/i18n/locales/en/en.json +++ b/frontend/src/utils/i18n/locales/en/en.json @@ -29,5 +29,14 @@ "amount": "Amount", "inventory-subtitle": "Here you can inspect all of your stored items.", "add-product": "Add product", - "add-product-subtitle": "Here you can enter information for a new product." + "add-product-subtitle": "Here you can enter information for a new product.", + "app-name": "App name", + "app-name-sub": "Displayed in the sidebar and login screen.", + "currency": "Currency", + "currency-sub": "Used for pricing across inventory views.", + "quick-tips": "Quick tips", + "quick-tips-1": "Update the app name to personalize the sidebar and login header.", + "quick-tips-2": "Choose a currency code that matches your pricing display, e.g. EUR, CHF, or USD.", + "settings-sub": "Manage your app preferences and store defaults.", + "preferences": "Preferences" } \ No newline at end of file