Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
thecybernanny-webapp
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
asranov0003
thecybernanny-webapp
Commits
82c42cf8
Commit
82c42cf8
authored
Jul 04, 2025
by
asranov0003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add settings
parent
7871a959
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
2 deletions
+107
-2
en.json
src/locales/en/en.json
+7
-0
ru.json
src/locales/ru/ru.json
+7
-0
Notifications.css
src/pages/Notifications/Notifications.css
+1
-1
Settings.css
src/pages/Settings/Settings.css
+25
-0
Settings.tsx
src/pages/Settings/Settings.tsx
+64
-1
global.css
src/styles/global.css
+3
-0
No files found.
src/locales/en/en.json
View file @
82c42cf8
...
@@ -37,6 +37,13 @@
...
@@ -37,6 +37,13 @@
"title"
:
"Notifications"
,
"title"
:
"Notifications"
,
"empty"
:
"No notifications"
"empty"
:
"No notifications"
},
},
"settings"
:
{
"title"
:
"Settings"
,
"account"
:
"Account"
,
"deleteAccount"
:
"Delete account"
,
"recoverPassword"
:
"Recover password"
,
"logout"
:
"Logout"
},
"pincode"
:
{
"pincode"
:
{
"enterTitle"
:
"Enter your PIN Code"
,
"enterTitle"
:
"Enter your PIN Code"
,
"createTitle"
:
"Create your PIN Code"
,
"createTitle"
:
"Create your PIN Code"
,
...
...
src/locales/ru/ru.json
View file @
82c42cf8
...
@@ -37,6 +37,13 @@
...
@@ -37,6 +37,13 @@
"title"
:
"Уведомления"
,
"title"
:
"Уведомления"
,
"empty"
:
"Нет уведомлений"
"empty"
:
"Нет уведомлений"
},
},
"settings"
:
{
"title"
:
"Настройки"
,
"account"
:
"Аккаунт"
,
"deleteAccount"
:
"Удалить аккаунт"
,
"recoverPassword"
:
"Восстановить пароль"
,
"logout"
:
"Выйти"
},
"pincode"
:
{
"pincode"
:
{
"enterTitle"
:
"Введите PIN-код"
,
"enterTitle"
:
"Введите PIN-код"
,
"createTitle"
:
"Создайте PIN-код"
,
"createTitle"
:
"Создайте PIN-код"
,
...
...
src/pages/Notifications/Notifications.css
View file @
82c42cf8
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
.notification
{
.notification
{
padding
:
1rem
;
padding
:
1rem
;
background
:
#ffffff
;
background
:
var
(
--content-bg-color
)
;
border-radius
:
0.5rem
;
border-radius
:
0.5rem
;
}
}
...
...
src/pages/Settings/Settings.css
View file @
82c42cf8
.settings
{
.settings
{
padding
:
0
1rem
;
padding
:
0
1rem
;
}
.settings__title
{
margin-bottom
:
1rem
;
}
.settings__content
{
display
:
flex
;
flex-direction
:
column
;
gap
:
1rem
;
}
.settings__content__action
{
padding
:
1rem
;
background
:
var
(
--content-bg-color
);
border-radius
:
0.5rem
;
display
:
flex
;
align-items
:
center
;
gap
:
0.5rem
;
cursor
:
pointer
;
}
.settings__content__action__icon
{
font-size
:
1.2rem
;
}
}
\ No newline at end of file
src/pages/Settings/Settings.tsx
View file @
82c42cf8
import
React
from
"react"
;
import
React
from
"react"
;
import
"./Settings.css"
;
import
"./Settings.css"
;
import
{
useLanguage
}
from
"../../contexts/LanguageContext/useLanguage"
;
import
CSelect
from
"../../components/CSelect"
;
import
en
from
"../../assets/images/flag-en.png"
;
import
ru
from
"../../assets/images/flag-ru.png"
;
import
{
FiUserMinus
}
from
"react-icons/fi"
;
import
{
IoKeyOutline
}
from
"react-icons/io5"
;
import
{
MdOutlineLogout
}
from
"react-icons/md"
;
import
{
useTranslation
}
from
"react-i18next"
;
const
Settings
:
React
.
FC
=
()
=>
{
const
Settings
:
React
.
FC
=
()
=>
{
return
<
div
className=
"settings"
>
Settings
</
div
>;
const
{
language
,
changeLanguage
}
=
useLanguage
();
const
{
t
}
=
useTranslation
();
return
(
<
div
className=
"settings"
>
<
h3
className=
"settings__title"
>
{
t
(
"settings.title"
)
}
</
h3
>
<
div
className=
"settings__content"
>
<
CSelect
value=
{
language
}
onChange=
{
(
flag
:
string
)
=>
changeLanguage
(
flag
as
"en"
|
"ru"
)
}
options=
{
[
{
label
:
"English"
,
value
:
"en"
,
image
:
(
<
img
src=
{
en
}
alt=
"en"
style=
{
{
width
:
20
,
height
:
20
,
objectFit
:
"cover"
}
}
/>
),
},
{
label
:
"Русский"
,
value
:
"ru"
,
image
:
(
<
img
src=
{
ru
}
alt=
"ru"
style=
{
{
width
:
20
,
height
:
20
,
objectFit
:
"cover"
}
}
/>
),
},
]
}
/>
<
h3
>
{
t
(
"settings.account"
)
}
</
h3
>
<
div
className=
"settings__content__action"
>
<
FiUserMinus
className=
"settings__content__action__icon"
/>
{
" "
}
{
t
(
"settings.deleteAccount"
)
}
</
div
>
<
div
className=
"settings__content__action"
>
<
IoKeyOutline
className=
"settings__content__action__icon"
/>
{
" "
}
{
t
(
"settings.recoverPassword"
)
}
</
div
>
<
div
className=
"settings__content__action"
>
<
MdOutlineLogout
className=
"settings__content__action__icon"
/>
{
" "
}
{
t
(
"settings.logout"
)
}
</
div
>
</
div
>
</
div
>
);
};
};
export
default
Settings
;
export
default
Settings
;
src/styles/global.css
View file @
82c42cf8
...
@@ -44,6 +44,7 @@ body {
...
@@ -44,6 +44,7 @@ body {
html
[
data-theme
=
'light'
]
{
html
[
data-theme
=
'light'
]
{
--background-color
:
#F5F5F5
;
--background-color
:
#F5F5F5
;
--on-background-color
:
#000000
;
--on-background-color
:
#000000
;
--content-bg-color
:
#FFFFFF
;
--text-color
:
#000000
;
--text-color
:
#000000
;
--on-text-color
:
#ffffff
--on-text-color
:
#ffffff
}
}
...
@@ -51,6 +52,7 @@ html[data-theme='light'] {
...
@@ -51,6 +52,7 @@ html[data-theme='light'] {
html
[
data-theme
=
'dark'
]
{
html
[
data-theme
=
'dark'
]
{
--background-color
:
#000000
;
--background-color
:
#000000
;
--on-background-color
:
#ffffff
;
--on-background-color
:
#ffffff
;
--content-bg-color
:
#000000
;
--text-color
:
#ffffff
;
--text-color
:
#ffffff
;
--on-text-color
:
#000000
;
--on-text-color
:
#000000
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment