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
dd9e24fa
Commit
dd9e24fa
authored
Jul 29, 2025
by
asranov0003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: translate text select device
parent
3a26228b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
8 deletions
+14
-8
Header.tsx
src/layouts/Header/Header.tsx
+1
-0
SectionHeader.tsx
src/layouts/SectionHeader/SectionHeader.tsx
+4
-1
en.json
src/locales/en/en.json
+2
-1
ru.json
src/locales/ru/ru.json
+2
-1
deviceSlice.ts
src/stores/slices/deviceSlice.ts
+5
-5
No files found.
src/layouts/Header/Header.tsx
View file @
dd9e24fa
...
...
@@ -94,6 +94,7 @@ const Header: React.FC = () => {
disabled=
{
!
devices
.
length
}
style=
{
{
width
:
"220px"
}
}
className=
"header__device-select"
placeholder=
{
t
(
"common.selectDevice"
)
}
/>
</
div
>
</
div
>
...
...
src/layouts/SectionHeader/SectionHeader.tsx
View file @
dd9e24fa
...
...
@@ -9,6 +9,7 @@ import {
import
CDeviceSelect
from
"../../components/CDeviceSelect"
;
import
{
setSelectedDevice
}
from
"../../stores/slices/deviceSlice"
;
import
{
BiArrowBack
}
from
"react-icons/bi"
;
import
{
useTranslation
}
from
"react-i18next"
;
interface
SectionHeaderProps
{
to
?:
string
;
...
...
@@ -20,6 +21,7 @@ const SectionHeader: React.FC<SectionHeaderProps> = ({ to }) => {
);
const
dispatch
=
useAppDispatch
();
const
navigate
=
useNavigate
();
const
{
t
}
=
useTranslation
();
const
handleNavigate
=
(
e
:
React
.
MouseEvent
)
=>
{
if
(
!
to
)
{
...
...
@@ -35,7 +37,7 @@ const SectionHeader: React.FC<SectionHeaderProps> = ({ to }) => {
onClick=
{
handleNavigate
}
className=
"sectionheader__link"
>
<
BiArrowBack
className=
"sectionheader__link__icon"
/>
<
BiArrowBack
className=
"sectionheader__link__icon"
/>
</
Link
>
<
CDeviceSelect
...
...
@@ -45,6 +47,7 @@ const SectionHeader: React.FC<SectionHeaderProps> = ({ to }) => {
disabled=
{
!
devices
.
length
}
style=
{
{
width
:
"220px"
}
}
className=
"header__device-select"
placeholder=
{
t
(
"common.selectDevice"
)
}
/>
</
div
>
);
...
...
src/locales/en/en.json
View file @
dd9e24fa
...
...
@@ -12,7 +12,8 @@
"to"
:
"To"
,
"confirm"
:
"Confirm"
,
"password"
:
"Password"
,
"passwordPlaceholder"
:
"Enter your password"
"passwordPlaceholder"
:
"Enter your password"
,
"selectDevice"
:
"Select Device"
},
"auth"
:
{
"entrance"
:
"Sign In"
,
...
...
src/locales/ru/ru.json
View file @
dd9e24fa
...
...
@@ -12,7 +12,8 @@
"to"
:
"До"
,
"confirm"
:
"Подтвердить"
,
"password"
:
"Пароль"
,
"passwordPlaceholder"
:
"Введите ваш пароль"
"passwordPlaceholder"
:
"Введите ваш пароль"
,
"selectDevice"
:
"Выбрать устройство"
},
"auth"
:
{
"entrance"
:
"Вход"
,
...
...
src/stores/slices/deviceSlice.ts
View file @
dd9e24fa
...
...
@@ -17,7 +17,7 @@ interface IDeviceState {
selectedDevice
:
IDevice
|
null
;
loadingDevices
:
boolean
;
errorDevices
:
string
;
isFetched
:
boolean
isFetched
:
boolean
;
}
const
initialState
:
IDeviceState
=
{
...
...
@@ -26,7 +26,7 @@ const initialState: IDeviceState = {
selectedDevice
:
null
,
loadingDevices
:
false
,
errorDevices
:
""
,
isFetched
:
false
isFetched
:
false
,
};
export
const
fetchDevices
=
createAsyncThunk
(
...
...
@@ -83,18 +83,18 @@ const deviceSlice = createSlice({
builder
.
addCase
(
fetchDevices
.
pending
,
(
state
)
=>
{
state
.
loadingDevices
=
true
;
state
.
isFetched
=
false
;
state
.
isFetched
=
false
;
})
.
addCase
(
fetchDevices
.
fulfilled
,
(
state
,
action
)
=>
{
state
.
loadingDevices
=
false
;
state
.
devices
=
action
.
payload
;
state
.
selectedDevice
=
action
.
payload
[
0
]
??
null
;
state
.
isFetched
=
true
;
state
.
isFetched
=
true
;
})
.
addCase
(
fetchDevices
.
rejected
,
(
state
,
action
)
=>
{
state
.
loadingDevices
=
false
;
state
.
errorDevices
=
action
.
payload
as
string
;
state
.
isFetched
=
false
;
state
.
isFetched
=
false
;
})
.
addCase
(
fetchDeviceData
.
fulfilled
,
(
state
,
action
)
=>
{
...
...
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