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
03105f2d
Commit
03105f2d
authored
Jul 15, 2025
by
asranov0003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add manage app modal
parent
71584879
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
6 deletions
+95
-6
en.json
src/locales/en/en.json
+6
-2
ru.json
src/locales/ru/ru.json
+5
-1
ManageApps.css
src/pages/ManageApps/ManageApps.css
+15
-0
ManageApps.tsx
src/pages/ManageApps/ManageApps.tsx
+69
-3
No files found.
src/locales/en/en.json
View file @
03105f2d
...
...
@@ -49,8 +49,12 @@
"usage"
:
"Manage Usage"
,
"blockUnwantedApps"
:
"Block unwanted apps"
,
"setTimeLimit"
:
"Set phone usage time limit"
,
"lockDevice"
:
"Lock device"
,
"unlockDevice"
:
"Unlock device"
"lockDevice"
:
"Block device"
,
"unlockDevice"
:
"Unblock device"
,
"lockDeviceTitle"
:
"Blocking device"
,
"lockDeviceDesc"
:
"Are you sure you want to continue?"
,
"unlockDeviceTitle"
:
"Unblocking device"
,
"unlockDeviceDesc"
:
"Are you sure you want to continue?"
},
"session"
:
{
"activeTill"
:
"Active till"
,
...
...
src/locales/ru/ru.json
View file @
03105f2d
...
...
@@ -50,7 +50,11 @@
"blockUnwantedApps"
:
"Блокировка нежелательных приложений"
,
"setTimeLimit"
:
"Установить ограничение по времени"
,
"lockDevice"
:
"Заблокировать устройство"
,
"unlockDevice"
:
"Разблокировать устройство"
"unlockDevice"
:
"Разблокировать устройство"
,
"lockDeviceTitle"
:
"Блокировка устройства"
,
"lockDeviceDesc"
:
"Вы уверены, что хотите продолжить?"
,
"unlockDeviceTitle"
:
"Разблокировка устройства"
,
"unlockDeviceDesc"
:
"Вы уверены, что хотите продолжить?"
},
"session"
:
{
"activeTill"
:
"Активен до"
,
...
...
src/pages/ManageApps/ManageApps.css
View file @
03105f2d
...
...
@@ -29,4 +29,18 @@
.manageapps__content__link
p
{
font-size
:
1.2rem
;
}
.manageapps__modal__title
{
text-align
:
center
;
}
.manageapps__modal__desc
{
margin-bottom
:
0.5rem
;
}
.manageapps__modal__actions
{
display
:
flex
;
justify-content
:
center
;
gap
:
1rem
;
}
\ No newline at end of file
src/pages/ManageApps/ManageApps.tsx
View file @
03105f2d
import
React
from
"react"
;
import
React
,
{
useState
}
from
"react"
;
import
"./ManageApps.css"
;
import
SectionHeader
from
"../../layouts/SectionHeader"
;
import
{
LuShield
}
from
"react-icons/lu"
;
...
...
@@ -9,10 +9,22 @@ import {
}
from
"react-icons/io5"
;
import
{
Link
}
from
"react-router-dom"
;
import
{
useTranslation
}
from
"react-i18next"
;
import
CModal
from
"../../components/CModal"
;
import
CButton
from
"../../components/CButton"
;
const
ManageApps
:
React
.
FC
=
()
=>
{
const
[
isOpenLockDeviceModal
,
setIsOpenLockDeviceModal
]
=
useState
(
false
);
const
[
isOpenUnLockDeviceModal
,
setIsOpenUnLockDeviceModal
]
=
useState
(
false
);
const
{
t
}
=
useTranslation
();
const
handleModalLockDevice
=
()
=>
{
setIsOpenLockDeviceModal
((
prev
)
=>
!
prev
);
};
const
handleModalUnlockDevice
=
()
=>
{
setIsOpenUnLockDeviceModal
((
prev
)
=>
!
prev
);
};
return
(
<
div
className=
"manageapps wrapper"
>
<
SectionHeader
to=
"/home"
/>
...
...
@@ -36,16 +48,70 @@ const ManageApps: React.FC = () => {
<
p
>
{
t
(
"manage.setTimeLimit"
)
}
</
p
>
</
Link
>
<
div
className=
"manageapps__content__link"
>
<
div
className=
"manageapps__content__link"
onClick=
{
handleModalLockDevice
}
>
<
IoLockClosedOutline
className=
"manageapps__content__icon"
/>
<
p
>
{
t
(
"manage.lockDevice"
)
}
</
p
>
</
div
>
<
div
className=
"manageapps__content__link"
>
<
div
className=
"manageapps__content__link"
onClick=
{
handleModalUnlockDevice
}
>
<
IoLockOpenOutline
className=
"manageapps__content__icon"
/>
<
p
>
{
t
(
"manage.unlockDevice"
)
}
</
p
>
</
div
>
</
div
>
<
CModal
isOpen=
{
isOpenLockDeviceModal
}
onToggle=
{
handleModalLockDevice
}
content=
{
<
div
className=
"manageapps__modal"
>
<
h3
className=
"manageapps__modal__title"
>
{
t
(
"manage.lockDeviceTitle"
)
}
</
h3
>
<
p
className=
"manageapps__modal__desc"
>
{
t
(
"manage.lockDeviceDesc"
)
}
</
p
>
<
div
className=
"manageapps__modal__actions"
>
<
CButton
title=
{
t
(
"common.no"
)
}
variant=
"danger"
onClick=
{
handleModalLockDevice
}
/>
<
CButton
title=
{
t
(
"common.yes"
)
}
/>
</
div
>
</
div
>
}
/>
<
CModal
isOpen=
{
isOpenUnLockDeviceModal
}
onToggle=
{
handleModalUnlockDevice
}
content=
{
<
div
className=
"manageapps__modal"
>
<
h3
className=
"manageapps__modal__title"
>
{
t
(
"manage.unlockDeviceTitle"
)
}
</
h3
>
<
p
className=
"manageapps__modal__desc"
>
{
t
(
"manage.unlockDeviceDesc"
)
}
</
p
>
<
div
className=
"manageapps__modal__actions"
>
<
CButton
title=
{
t
(
"common.no"
)
}
variant=
"danger"
onClick=
{
handleModalUnlockDevice
}
/>
<
CButton
title=
{
t
(
"common.yes"
)
}
/>
</
div
>
</
div
>
}
/>
</
div
>
);
};
...
...
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