From 03d18af0e49f626ace7f515f79369baaadb04233 Mon Sep 17 00:00:00 2001 From: Koosha Lahouti Date: Sat, 26 Jul 2025 17:55:43 +0330 Subject: [PATCH] feat: security section in profile setting --- package-lock.json | 13 ++ package.json | 1 + public/locales/fa/security.json | 11 ++ src/App.tsx | 2 + .../profile/components/UserSecurity.tsx | 124 ++++++++++++++++++ 5 files changed, 151 insertions(+) create mode 100644 public/locales/fa/security.json create mode 100644 src/features/profile/components/UserSecurity.tsx diff --git a/package-lock.json b/package-lock.json index 1204723..fe1023c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "i18next": "^25.3.0", "i18next-browser-languagedetector": "^8.2.0", "i18next-http-backend": "^3.0.2", + "iconsax-react": "^0.0.8", "react": "^19.1.0", "react-dom": "^19.1.0", "react-i18next": "^15.6.0", @@ -3102,6 +3103,18 @@ "cross-fetch": "4.0.0" } }, + "node_modules/iconsax-react": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/iconsax-react/-/iconsax-react-0.0.8.tgz", + "integrity": "sha512-l3dVk4zGtkkJHgvNYqAf0wDKqnKxXykee5/DoESGo2JvSYwaxajJUHSX2YrPRXSov8Hd8ClGFwJxCEaEjrFD1Q==", + "license": "MIT", + "dependencies": { + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": "*" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", diff --git a/package.json b/package.json index 666890c..91571b6 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "i18next": "^25.3.0", "i18next-browser-languagedetector": "^8.2.0", "i18next-http-backend": "^3.0.2", + "iconsax-react": "^0.0.8", "react": "^19.1.0", "react-dom": "^19.1.0", "react-i18next": "^15.6.0", diff --git a/public/locales/fa/security.json b/public/locales/fa/security.json new file mode 100644 index 0000000..a2aae2a --- /dev/null +++ b/public/locales/fa/security.json @@ -0,0 +1,11 @@ +{ + "securityForm": { + "password": "رمز عبور", + "determinePassword": "با تعیین یک رمز عبور قوی راحت تر به اکانت هارمونی خود وارد شوید", + "addPassword": "افزودن رمز عبور", + "notDeterminedPassword": "هنوز رمز عبوری برای این حساب کاربری تعیین نکرده اید", + "newPassword": "رمز عبور جدید", + "confirmPassword": "تکرار رمز عبور", + "confirm": "تایید" + } +} diff --git a/src/App.tsx b/src/App.tsx index 43fe290..957efc5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,6 +9,7 @@ import { import './App.css'; import { useTranslation } from 'react-i18next'; import { LanguageManager } from './components/LanguageManager'; +import { UserSecurity } from './features/profile/components/UserSecurity'; function App() { const { t } = useTranslation(); @@ -17,6 +18,7 @@ function App() { <> +
{t('helloWorld')} setOpen(true); + const handleClose = () => setOpen(false); + + return ( + + + + {t('securityForm.password')} + + {t('securityForm.determinePassword')} + + + + + + + {t('securityForm.notDeterminedPassword')} + + + + + + + + {t('securityForm.addPassword')} + + + setPassword(e.target.value)} + sx={{ width: '364px' }} + /> + setConfirmPassword(e.target.value)} + sx={{ width: '364px' }} + /> + + + + + + + ); +}