You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
add: start/stop/restart daemon button
This commit is contained in:
@@ -7,10 +7,11 @@
|
||||
--dim: #1d2327;
|
||||
--error: #8d1d19;
|
||||
--icon: #48565e;
|
||||
--icon-bc: #313a3f;
|
||||
--icon-bc: #2b3338;
|
||||
/* Locked Color */
|
||||
--lock-desc: #c9c9c9;
|
||||
--lock: #fff;
|
||||
--test: #c4a000;
|
||||
}
|
||||
|
||||
* {
|
||||
@@ -93,10 +94,16 @@ a {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.center {
|
||||
justify-content: center;
|
||||
align-self: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.list {
|
||||
max-height: 25px;
|
||||
overflow-y: hidden;
|
||||
transition: max-height 0.25s ease-out;
|
||||
transition: max-height 0.25s ease-in-out;
|
||||
}
|
||||
|
||||
.full {
|
||||
@@ -108,6 +115,42 @@ a {
|
||||
transition: 0.2s ease-out;
|
||||
}
|
||||
|
||||
.button_list {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
column-gap: 20px;
|
||||
}
|
||||
|
||||
.button {
|
||||
/* width: 2em; */
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
border-radius: 30px;
|
||||
transition: transform 0.07s ease-in-out;
|
||||
}
|
||||
|
||||
.button:active {
|
||||
transform: scale(90%)
|
||||
}
|
||||
|
||||
.small_card {
|
||||
margin-top: 10px;
|
||||
background: var(--icon-bc);
|
||||
border-radius: 15px;
|
||||
padding-top: 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.small_card_bg {
|
||||
background: var(--icon-bc);
|
||||
}
|
||||
|
||||
.small_card_bg_in {
|
||||
background: var(--icon);
|
||||
}
|
||||
|
||||
/* Card type */
|
||||
.bright {
|
||||
border: 5px solid var(--bright);
|
||||
|
||||
@@ -7,14 +7,17 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="js/theme.js" type="module"></script>
|
||||
<script src="js/list.js" type="module"></script>
|
||||
<script src="js/main.js" type="module"></script>
|
||||
<link rel="stylesheet" href="css/fonts.css">
|
||||
<link rel="stylesheet" href="css/index.css">
|
||||
<script src="js/main.js" type="module"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Loading screen -->
|
||||
<div class="loading_screen">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
|
||||
<!-- Headers -->
|
||||
<div class="header">
|
||||
<div>ReZygisk</div>
|
||||
<div id="theme-switcher" style="color: black;">
|
||||
@@ -22,6 +25,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 40px 0px;"></div>
|
||||
|
||||
<!-- Info card -->
|
||||
<div id="info_card" class="bright card">
|
||||
<div class="brightc content" style="display: flex; align-items: center;">
|
||||
<div id="rezygisk_icon_state" class="brightc">
|
||||
@@ -49,7 +54,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Module list card -->
|
||||
<div id="module_card" class="dim card list" style="display: none;">
|
||||
<!-- Module list card header -->
|
||||
<div class="dimc liste">
|
||||
<div class="dimc" style="font-size: 1.2em; display: flex; align-items: center;">
|
||||
<div id="modules_list_icon" class="dimc">
|
||||
@@ -65,12 +72,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Module list card body -->
|
||||
<div id="modules_list" class="dimc" style="width: 100%;">
|
||||
<!-- N/A -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Settings card -->
|
||||
<div id="rezygisk_settings" class="dim card" style="display: none;">
|
||||
<!-- Settings card header -->
|
||||
<div class="dimc" style="align-items: center; display: flex;">
|
||||
<div class="dimc" id="setting_icon">
|
||||
<img class="dimc" src="assets/settings.svg">
|
||||
@@ -79,6 +89,25 @@
|
||||
Settings
|
||||
</div>
|
||||
</div>
|
||||
<!-- Settings card body (Daemon32) -->
|
||||
<div class="small_card">
|
||||
<div class="small_card_bg content" style="font-size: 1.1em; padding-left: 5px; padding-top: 6px; padding-bottom: 14px;">Daemon (32 bit)</div>
|
||||
<div class="small_card_bg content button_list">
|
||||
<div class="center button">Stop</div>
|
||||
<div class="center button">Start</div>
|
||||
<div class="center button">Restart</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Settings card body (Daemon64) -->
|
||||
<div class="small_card" style="margin-top: 15px;">
|
||||
<div class="small_card_bg content" style="font-size: 1.1em; padding-left: 5px; padding-top: 6px; padding-bottom: 14px;">Daemon (64 bit)</div>
|
||||
<div class="small_card_bg content button_list">
|
||||
<div class="center button">Stop</div>
|
||||
<div class="center button">Start</div>
|
||||
<div class="center button">Restart</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -63,15 +63,15 @@ import { fullScreen, exec, toast } from './kernelsu.js';
|
||||
const modules_card = document.getElementById('modules_card')
|
||||
const modules_list = document.getElementById('modules_list')
|
||||
|
||||
// For hiding loading screen
|
||||
loading_screen.style.display = 'none';
|
||||
|
||||
const findModulesCmd = await exec('find /data/adb/modules -type d -name zygisk -exec dirname {} \\;')
|
||||
|
||||
if (findModulesCmd.errno === 0) {
|
||||
const modules = findModulesCmd.stdout.split('\n')
|
||||
|
||||
if (modules.length === 0) {
|
||||
loading_screen.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
if (modules.length === 0) return;
|
||||
|
||||
modules_card.removeAttribute('style')
|
||||
|
||||
@@ -108,5 +108,4 @@ import { fullScreen, exec, toast } from './kernelsu.js';
|
||||
} else {
|
||||
toast(`find error (${findModulesCmd.errno}): ${findModulesCmd.stderr}`)
|
||||
}
|
||||
loading_screen.style.display = 'none';
|
||||
})()
|
||||
@@ -43,6 +43,8 @@ function setDark() {
|
||||
rootCss.style.setProperty('--desc', '#c9c9c9')
|
||||
rootCss.style.setProperty('--spliter', '#283136')
|
||||
rootCss.style.setProperty('--dim', '#1d2327')
|
||||
rootCss.style.setProperty('--icon', '#48565e')
|
||||
rootCss.style.setProperty('--icon-bc', '#313a3f')
|
||||
sys_theme = setData('dark')
|
||||
settings_icon.innerHTML = '<img class="dimc" src="assets/settings.svg">'
|
||||
expand_clicker.innerHTML = '<img class="dimc" src="assets/expand.svg">'
|
||||
@@ -57,6 +59,8 @@ function setLight() {
|
||||
rootCss.style.setProperty('--desc', '#444444')
|
||||
rootCss.style.setProperty('--spliter', '#4f6069')
|
||||
rootCss.style.setProperty('--dim', '#e0e0e0')
|
||||
rootCss.style.setProperty('--icon', '#acacac')
|
||||
rootCss.style.setProperty('--icon-bc', '#c9c9c9')
|
||||
sys_theme = setData('light')
|
||||
settings_icon.innerHTML = light_settings_icon
|
||||
expand_clicker.innerHTML = light_expand_icon
|
||||
|
||||
Reference in New Issue
Block a user