You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
add: new module list interface
This commit is contained in:
@@ -179,6 +179,7 @@ androidComponents.onVariants { variant ->
|
||||
set.add(Pair(root.file("webroot/assets/warn.svg").asFile, null))
|
||||
set.add(Pair(root.file("webroot/assets/light.svg").asFile, null))
|
||||
set.add(Pair(root.file("webroot/assets/dark.svg").asFile, null))
|
||||
set.add(Pair(root.file("webroot/assets/module.svg").asFile, null))
|
||||
sig.initSign(privKey)
|
||||
set.forEach { it.first.sha(it.second) }
|
||||
val signFile = root.file(name).asFile
|
||||
|
||||
@@ -130,6 +130,7 @@ extract "$ZIPFILE" 'webroot/assets/tick.svg' "$MODPATH/webroot/assets" true
|
||||
extract "$ZIPFILE" 'webroot/assets/warn.svg' "$MODPATH/webroot/assets" true
|
||||
extract "$ZIPFILE" 'webroot/assets/light.svg' "$MODPATH/webroot/assets" true
|
||||
extract "$ZIPFILE" 'webroot/assets/dark.svg' "$MODPATH/webroot/assets" true
|
||||
extract "$ZIPFILE" 'webroot/assets/module.svg' "$MODPATH/webroot/assets" true
|
||||
|
||||
if [ "$ARCH" = "x86" ] || [ "$ARCH" = "x64" ]; then
|
||||
ui_print "- Extracting x86 libraries"
|
||||
|
||||
1
webroot/assets/module.svg
Normal file
1
webroot/assets/module.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="M627-520h133v-160H627v160Zm-214 0h133v-160H413v160Zm-213 0h133v-160H200v160Zm0 240h133v-160H200v160Zm213 0h133v-160H413v160Zm214 0h133v-160H627v160Zm-507 0v-400q0-33 23.5-56.5T200-760h560q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H200q-33 0-56.5-23.5T120-280Z"/></svg>
|
||||
|
After Width: | Height: | Size: 391 B |
@@ -66,16 +66,19 @@ import { fullScreen, exec, toast } from './kernelsu.js';
|
||||
modules_list.removeAttribute('style')
|
||||
|
||||
modules_list.innerHTML +=
|
||||
`<div class="dimc content" style="font-size: 1.2em;">
|
||||
Modules (${modules.length})
|
||||
`<div class="dimc" style="font-size: 1.2em; display: flex; align-items: center;">
|
||||
<div id="modules_list_icon" class="dimc">
|
||||
<img class="dimc" src="assets/module.svg">
|
||||
</div>
|
||||
<div class="dimc" style="padding-bottom: 4px; padding-left: 5px;">Modules (${modules.length})</div>
|
||||
</div>
|
||||
<br/>`
|
||||
`
|
||||
|
||||
for (const module of modules) {
|
||||
for ( i = 0; i < modules.length; i++) {
|
||||
const module = modules[i]
|
||||
const lsZygiskCmd = await exec(`ls ${module}/zygisk`)
|
||||
if (lsZygiskCmd.errno !== 0) {
|
||||
toast(`ls ${module}/zygisk error (${lsZygiskCmd.errno}): ${lsZygiskCmd.stderr}`)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -92,10 +95,10 @@ import { fullScreen, exec, toast } from './kernelsu.js';
|
||||
const name = lines.find(line => line.includes('name=')).split('=')[1]
|
||||
|
||||
modules_list.innerHTML +=
|
||||
`<div class="dimc content spliter liste" style="padding-top: 3px; padding-bottom: 13px;">
|
||||
<div class="dimc">${name}</div>
|
||||
<div class="dimc">${bitsUsed.join(' / ')}</div>
|
||||
</div>`
|
||||
`<div class="dimc content ${i + 1 !== modules.length ? "spliter" : ""}" style="padding-top: 10px; padding-bottom: 13px;">
|
||||
<div class="dimc">${name}</div>
|
||||
<div class="dimc" style="font-size: 0.9em;">Arch: ${bitsUsed.join(' / ')}</div>
|
||||
</div>`
|
||||
} else {
|
||||
toast(`cat ${module} error (${catCmd.errno}): ${catCmd.stderr}`)
|
||||
}
|
||||
|
||||
@@ -3,8 +3,14 @@ const light_icon = `
|
||||
<path d="M480-360q50 0 85-35t35-85q0-50-35-85t-85-35q-50 0-85 35t-35 85q0 50 35 85t85 35Zm0 80q-83 0-141.5-58.5T280-480q0-83 58.5-141.5T480-680q83 0 141.5 58.5T680-480q0 83-58.5 141.5T480-280ZM200-440H40v-80h160v80Zm720 0H760v-80h160v80ZM440-760v-160h80v160h-80Zm0 720v-160h80v160h-80ZM256-650l-101-97 57-59 96 100-52 56Zm492 496-97-101 53-55 101 97-57 59Zm-98-550 97-101 59 57-100 96-56-52ZM154-212l101-97 55 53-97 101-59-57Zm326-268Z"/>
|
||||
</svg>
|
||||
`
|
||||
const light_module_icon = `
|
||||
<svg class="dimc" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#2c2c2c">
|
||||
<path d="M627-520h133v-160H627v160Zm-214 0h133v-160H413v160Zm-213 0h133v-160H200v160Zm0 240h133v-160H200v160Zm213 0h133v-160H413v160Zm214 0h133v-160H627v160Zm-507 0v-400q0-33 23.5-56.5T200-760h560q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H200q-33 0-56.5-23.5T120-280Z"/>
|
||||
</svg>
|
||||
`
|
||||
const rootCss = document.querySelector(':root')
|
||||
const button = document.getElementById('theme-switcher')
|
||||
const module_list_icon = document.getElementById('modules_list_icon')
|
||||
let sys_theme = localStorage.getItem('system-theme')
|
||||
if (!sys_theme) sys_theme = setData('dark')
|
||||
|
||||
@@ -25,6 +31,7 @@ function setDark() {
|
||||
rootCss.style.setProperty('--dim', '#1d2327')
|
||||
sys_theme = setData('dark')
|
||||
button.innerHTML = '<img src="assets/dark.svg">'
|
||||
module_list_icon.innerHTML = '<img class="dimc" src="assets/module.svg">'
|
||||
return
|
||||
}
|
||||
|
||||
@@ -36,6 +43,7 @@ function setLight() {
|
||||
rootCss.style.setProperty('--dim', '#e0e0e0')
|
||||
sys_theme = setData('light')
|
||||
button.innerHTML = light_icon
|
||||
module_list_icon.innerHTML = light_module_icon
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user