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
3935464e
Commit
3935464e
authored
Jul 17, 2025
by
asranov0003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: manage modal app action variants
parent
be9ddb83
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
ManageApps.tsx
src/pages/ManageApps/ManageApps.tsx
+13
-10
No files found.
src/pages/ManageApps/ManageApps.tsx
View file @
3935464e
...
@@ -11,15 +11,21 @@ import { Link } from "react-router-dom";
...
@@ -11,15 +11,21 @@ import { Link } from "react-router-dom";
import
{
useTranslation
}
from
"react-i18next"
;
import
{
useTranslation
}
from
"react-i18next"
;
import
CModal
from
"../../components/CModal"
;
import
CModal
from
"../../components/CModal"
;
import
CButton
from
"../../components/CButton"
;
import
CButton
from
"../../components/CButton"
;
import
{
useAppDispatch
,
useAppSelector
,
type
RootState
}
from
"../../stores/store"
;
import
{
useAppDispatch
,
useAppSelector
,
type
RootState
,
}
from
"../../stores/store"
;
import
{
blockDevice
,
unBlockDevice
}
from
"../../stores/slices/commandSlice"
;
import
{
blockDevice
,
unBlockDevice
}
from
"../../stores/slices/commandSlice"
;
const
ManageApps
:
React
.
FC
=
()
=>
{
const
ManageApps
:
React
.
FC
=
()
=>
{
const
[
isOpenLockDeviceModal
,
setIsOpenLockDeviceModal
]
=
useState
(
false
);
const
[
isOpenLockDeviceModal
,
setIsOpenLockDeviceModal
]
=
useState
(
false
);
const
[
isOpenUnLockDeviceModal
,
setIsOpenUnLockDeviceModal
]
=
useState
(
false
);
const
[
isOpenUnLockDeviceModal
,
setIsOpenUnLockDeviceModal
]
=
useState
(
false
);
const
{
t
}
=
useTranslation
();
const
{
t
}
=
useTranslation
();
const
{
selectedDevice
}
=
useAppSelector
((
state
:
RootState
)
=>
state
.
device
)
const
{
selectedDevice
}
=
useAppSelector
((
state
:
RootState
)
=>
state
.
device
);
const
{
isLoadingBlockDevice
,
isLoadingUnBlockDevice
}
=
useAppSelector
((
state
:
RootState
)
=>
state
.
command
)
const
{
isLoadingBlockDevice
,
isLoadingUnBlockDevice
}
=
useAppSelector
(
(
state
:
RootState
)
=>
state
.
command
);
const
dispatch
=
useAppDispatch
();
const
dispatch
=
useAppDispatch
();
const
handleModalLockDevice
=
()
=>
{
const
handleModalLockDevice
=
()
=>
{
...
@@ -38,7 +44,7 @@ const ManageApps: React.FC = () => {
...
@@ -38,7 +44,7 @@ const ManageApps: React.FC = () => {
}
finally
{
}
finally
{
handleModalLockDevice
();
handleModalLockDevice
();
}
}
}
}
;
const
handleUnBlockDevice
=
async
()
=>
{
const
handleUnBlockDevice
=
async
()
=>
{
try
{
try
{
...
@@ -103,13 +109,10 @@ const ManageApps: React.FC = () => {
...
@@ -103,13 +109,10 @@ const ManageApps: React.FC = () => {
</
p
>
</
p
>
<
div
className=
"manageapps__modal__actions"
>
<
div
className=
"manageapps__modal__actions"
>
<
CButton
<
CButton
title=
{
t
(
"common.no"
)
}
onClick=
{
handleModalLockDevice
}
/>
title=
{
t
(
"common.no"
)
}
variant=
"danger"
onClick=
{
handleModalLockDevice
}
/>
<
CButton
<
CButton
title=
{
t
(
"common.yes"
)
}
title=
{
t
(
"common.yes"
)
}
variant=
"danger"
onClick=
{
handleBlockDevice
}
onClick=
{
handleBlockDevice
}
isLoading=
{
isLoadingBlockDevice
}
isLoading=
{
isLoadingBlockDevice
}
/>
/>
...
@@ -133,11 +136,11 @@ const ManageApps: React.FC = () => {
...
@@ -133,11 +136,11 @@ const ManageApps: React.FC = () => {
<
div
className=
"manageapps__modal__actions"
>
<
div
className=
"manageapps__modal__actions"
>
<
CButton
<
CButton
title=
{
t
(
"common.no"
)
}
title=
{
t
(
"common.no"
)
}
variant=
"danger"
onClick=
{
handleModalUnlockDevice
}
onClick=
{
handleModalUnlockDevice
}
/>
/>
<
CButton
<
CButton
title=
{
t
(
"common.yes"
)
}
title=
{
t
(
"common.yes"
)
}
variant=
"danger"
onClick=
{
handleUnBlockDevice
}
onClick=
{
handleUnBlockDevice
}
isLoading=
{
isLoadingUnBlockDevice
}
isLoading=
{
isLoadingUnBlockDevice
}
/>
/>
...
...
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