You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
add: error history modal for easier to view log and copy
This commit is contained in:
@@ -168,6 +168,8 @@ androidComponents.onVariants { variant ->
|
||||
set.add(Pair(root.file("webroot/js/kernelsu.js").asFile, null))
|
||||
set.add(Pair(root.file("webroot/js/theme.js").asFile, null))
|
||||
set.add(Pair(root.file("webroot/js/language.js").asFile, null))
|
||||
set.add(Pair(root.file("webroot/js/light.icon.js").asFile, null))
|
||||
set.add(Pair(root.file("webroot/js/restoreError.js").asFile, null))
|
||||
|
||||
set.add(Pair(root.file("webroot/js/list/module.js").asFile, null))
|
||||
set.add(Pair(root.file("webroot/js/list/settings.js").asFile, null))
|
||||
@@ -181,6 +183,7 @@ androidComponents.onVariants { variant ->
|
||||
set.add(Pair(root.file("webroot/lang/vi_VN.json").asFile, null))
|
||||
|
||||
set.add(Pair(root.file("webroot/js/modal/language.js").asFile, null))
|
||||
set.add(Pair(root.file("webroot/js/modal/errorHistory.js").asFile, null))
|
||||
|
||||
set.add(Pair(root.file("webroot/css/index.css").asFile, null))
|
||||
|
||||
@@ -194,6 +197,8 @@ androidComponents.onVariants { variant ->
|
||||
set.add(Pair(root.file("webroot/assets/settings.svg").asFile, null))
|
||||
set.add(Pair(root.file("webroot/assets/close.svg").asFile, null))
|
||||
set.add(Pair(root.file("webroot/assets/lang.svg").asFile, null))
|
||||
set.add(Pair(root.file("webroot/assets/content.svg").asFile, null))
|
||||
set.add(Pair(root.file("webroot/assets/error.svg").asFile, null))
|
||||
sig.initSign(privKey)
|
||||
set.forEach { it.first.sha(it.second) }
|
||||
val signFile = root.file(name).asFile
|
||||
|
||||
@@ -123,6 +123,8 @@ extract "$ZIPFILE" 'webroot/js/language.js' "$MODPATH/webroot/js" true
|
||||
extract "$ZIPFILE" 'webroot/js/list/module.js' "$MODPATH/webroot/js/list" true
|
||||
extract "$ZIPFILE" 'webroot/js/list/settings.js' "$MODPATH/webroot/js/list" true
|
||||
extract "$ZIPFILE" 'webroot/js/list/language.js' "$MODPATH/webroot/js/list" true
|
||||
extract "$ZIPFILE" 'webroot/js/list/light.icon.js' "$MODPATH/webroot/js/list" true
|
||||
extract "$ZIPFILE" 'webroot/js/list/restoreError.js' "$MODPATH/webroot/js/list" true
|
||||
|
||||
extract "$ZIPFILE" 'webroot/lang/en_US.json' "$MODPATH/webroot/lang" true
|
||||
extract "$ZIPFILE" 'webroot/lang/ja_JP.json' "$MODPATH/webroot/lang" true
|
||||
@@ -132,6 +134,7 @@ extract "$ZIPFILE" 'webroot/lang/ru_RU.json' "$MODPATH/webroot/lang" true
|
||||
extract "$ZIPFILE" 'webroot/lang/vi_VN.json' "$MODPATH/webroot/lang" true
|
||||
|
||||
extract "$ZIPFILE" 'webroot/js/modal/language.js' "$MODPATH/webroot/js/modal" true
|
||||
extract "$ZIPFILE" 'webroot/js/modal/errorHistory.js' "$MODPATH/webroot/js/modal" true
|
||||
|
||||
extract "$ZIPFILE" 'webroot/css/index.css' "$MODPATH/webroot/css" true
|
||||
|
||||
@@ -145,6 +148,8 @@ extract "$ZIPFILE" 'webroot/assets/expand.svg' "$MODPATH/webroot/assets" true
|
||||
extract "$ZIPFILE" 'webroot/assets/settings.svg' "$MODPATH/webroot/assets" true
|
||||
extract "$ZIPFILE" 'webroot/assets/close.svg' "$MODPATH/webroot/assets" true
|
||||
extract "$ZIPFILE" 'webroot/assets/lang.svg' "$MODPATH/webroot/assets" true
|
||||
extract "$ZIPFILE" 'webroot/assets/content.svg' "$MODPATH/webroot/assets" true
|
||||
extract "$ZIPFILE" 'webroot/assets/error.svg' "$MODPATH/webroot/assets" true
|
||||
|
||||
if [ "$ARCH" = "x86" ] || [ "$ARCH" = "x64" ]; then
|
||||
ui_print "- Extracting x86 libraries"
|
||||
|
||||
1
webroot/assets/content.svg
Normal file
1
webroot/assets/content.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#e8eaed"><path d="M320-213.33q-27 0-46.83-19.84Q253.33-253 253.33-280v-533.33q0-27 19.84-46.84Q293-880 320-880h413.33q27 0 46.84 19.83Q800-840.33 800-813.33V-280q0 27-19.83 46.83-19.84 19.84-46.84 19.84H320Zm0-66.67h413.33v-533.33H320V-280ZM186.67-80q-27 0-46.84-19.83Q120-119.67 120-146.67v-600h66.67v600h480V-80h-480ZM320-280v-533.33V-280Z"/></svg>
|
||||
|
After Width: | Height: | Size: 448 B |
1
webroot/assets/error.svg
Normal file
1
webroot/assets/error.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="M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>
|
||||
|
After Width: | Height: | Size: 537 B |
@@ -137,7 +137,7 @@ a {
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
border-radius: 30px;
|
||||
transition: transform 0.07s ease-in-out;
|
||||
transition: transform 0.05s ease-in-out;
|
||||
background-color: var(--button);
|
||||
}
|
||||
|
||||
@@ -172,13 +172,32 @@ a {
|
||||
}
|
||||
|
||||
.element_animation {
|
||||
transition: transform 0.15 ease-in-out;
|
||||
transition: transform 0.15s ease-in-out;
|
||||
}
|
||||
|
||||
.element_animation:active {
|
||||
transform: scale(95%)
|
||||
}
|
||||
|
||||
.card_animation {
|
||||
transition: transform 0.05s ease-in-out;
|
||||
}
|
||||
|
||||
.card_animation:active {
|
||||
transform: scale(95%)
|
||||
}
|
||||
|
||||
.errorh_textarea {
|
||||
resize: none;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border: none;
|
||||
outline: none;
|
||||
font-size: 16px;
|
||||
padding-bottom: 25px;
|
||||
font-family: monospace, monospace;
|
||||
}
|
||||
|
||||
/* Card type */
|
||||
.bright {
|
||||
border: 5px solid var(--bright);
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
<script src="js/list/language.js" type="module"></script>
|
||||
<script src="js/main.js" type="module"></script>
|
||||
<script src="js/modal/language.js" type="module"></script>
|
||||
<script src="js/modal/errorHistory.js" type="module"></script>
|
||||
<script src="js/restoreError.js" type="module"></script>
|
||||
<link rel="stylesheet" href="css/index.css">
|
||||
</head>
|
||||
<body id="main_body">
|
||||
@@ -19,7 +21,7 @@
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
|
||||
<!-- INFO: Modal list -->
|
||||
<!-- INFO: Language Modal -->
|
||||
<div id="lang_modal" class="full_screen" style="top: 100%;">
|
||||
<div class="liste" style="margin-top: 20px; margin-left: 20px;">
|
||||
<div style="margin-left: 20px;"></div>
|
||||
@@ -35,6 +37,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- INFO: Error History Modal -->
|
||||
<div id="errorh_modal" class="full_screen" style="top: 100%;">
|
||||
<div class="liste" style="margin-top: 20px; margin-left: 20px;">
|
||||
<div style="margin-left: 20px;"></div>
|
||||
<div id="errorh_modal_close" class="close_icon icon_animation" style="margin-right: 20px; width: 40px; height: 40px;">
|
||||
<img src="assets/close.svg">
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-left: 25px; display: flex; align-items: center; justify-content: space-between; padding-right: 25px;">
|
||||
<h1 id="errorh_modal_title">Error History</h1>
|
||||
<div class="icon_animation" id="errorh_copy">
|
||||
<img src="assets/content.svg">
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-left: 25px; margin-right: 25px; height: 100%;">
|
||||
<textarea id="errorh_panel" disabled class="errorh_textarea" placeholder="No error log recorded here!"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- INFO: Headers -->
|
||||
<div class="header">
|
||||
<div>ReZygisk</div>
|
||||
@@ -141,5 +162,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- INFO: Get error logs button card -->
|
||||
<div id="rezygisk_errorh" class="dim card list card_animation">
|
||||
<!-- INFO: Settings card header -->
|
||||
<div class="dimc" style="align-items: center; display: flex;">
|
||||
<div class="dimc" id="logs_icon">
|
||||
<img class="dimc" src="assets/error.svg">
|
||||
</div>
|
||||
<div id="errorh_card_title" class="dimc content" style="padding-left: 5px; font-size: 1.2em;">
|
||||
Error History
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -16,6 +16,11 @@ const daemon32_exit_button = document.getElementById('daemon32_exit_button')
|
||||
const daemon64_stop_button = document.getElementById('daemon64_stop_button')
|
||||
const daemon64_start_button = document.getElementById('daemon64_start_button')
|
||||
const daemon64_exit_button = document.getElementById('daemon64_exit_button')
|
||||
/* INFO: error history button card */
|
||||
const errorh_card_title = document.getElementById('errorh_card_title')
|
||||
/* INFO: error history modal */
|
||||
const errorh_modal_title = document.getElementById('errorh_modal_title')
|
||||
const errorh_panel = document.getElementById('errorh_panel')
|
||||
/* INFO: lang modal */
|
||||
const lang_modal_title = document.getElementById('lang_modal_title')
|
||||
/* INFO: Variable fields */
|
||||
@@ -55,6 +60,13 @@ export async function setNewLanguage(locate, initialize) {
|
||||
/* INFO: lang modal */
|
||||
lang_modal_title.innerHTML = new_lang.langModal.header
|
||||
|
||||
/* INFO: error history button card */
|
||||
errorh_card_title.innerHTML = new_lang.errorHistory.header
|
||||
|
||||
/* INFO: error history modal */
|
||||
errorh_modal_title.innerHTML = new_lang.errorHistory.header
|
||||
errorh_panel.placeholder = new_lang.errorHistory.placeholder
|
||||
|
||||
/* INFO: Translate variables */
|
||||
switch (rezygisk_state.innerHTML.replace(/(\r\n|\n|\r)/gm,"").trim()) {
|
||||
case old_translations.infoCard.status.ok: {
|
||||
|
||||
40
webroot/js/light.icon.js
Normal file
40
webroot/js/light.icon.js
Normal file
@@ -0,0 +1,40 @@
|
||||
export const light_icon = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#2c2c2c">
|
||||
<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>
|
||||
`
|
||||
export 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>
|
||||
`
|
||||
export const light_expand_icon = `
|
||||
<svg class="dimc" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#2c2c2c">
|
||||
<path d="m480-340 180-180-57-56-123 123-123-123-57 56 180 180Zm0 260q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/>
|
||||
</svg>
|
||||
`
|
||||
export const light_settings_icon = `
|
||||
<svg class="dimc" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#2c2c2c">
|
||||
<path d="m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z"/>
|
||||
</svg>
|
||||
`
|
||||
export const light_lang_icon = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#2c2c2c">
|
||||
<path d="M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q83 0 155.5 31.5t127 86q54.5 54.5 86 127T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Zm0-82q26-36 45-75t31-83H404q12 44 31 83t45 75Zm-104-16q-18-33-31.5-68.5T322-320H204q29 50 72.5 87t99.5 55Zm208 0q56-18 99.5-55t72.5-87H638q-9 38-22.5 73.5T584-178ZM170-400h136q-3-20-4.5-39.5T300-480q0-21 1.5-40.5T306-560H170q-5 20-7.5 39.5T160-480q0 21 2.5 40.5T170-400Zm216 0h188q3-20 4.5-39.5T580-480q0-21-1.5-40.5T574-560H386q-3 20-4.5 39.5T380-480q0 21 1.5 40.5T386-400Zm268 0h136q5-20 7.5-39.5T800-480q0-21-2.5-40.5T790-560H654q3 20 4.5 39.5T660-480q0 21-1.5 40.5T654-400Zm-16-240h118q-29-50-72.5-87T584-782q18 33 31.5 68.5T638-640Zm-234 0h152q-12-44-31-83t-45-75q-26 36-45 75t-31 83Zm-200 0h118q9-38 22.5-73.5T376-782q-56 18-99.5 55T204-640Z"/>
|
||||
</svg>
|
||||
`
|
||||
export const light_close_icon = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#2c2c2c">
|
||||
<path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/>
|
||||
</svg>
|
||||
`
|
||||
export const light_logs_icon = `
|
||||
<svg class="dimc" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#2c2c2c">
|
||||
<path d="M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/>
|
||||
</svg>
|
||||
`
|
||||
export const light_copy_icon = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#2c2c2c">
|
||||
<path d="M320-213.33q-27 0-46.83-19.84Q253.33-253 253.33-280v-533.33q0-27 19.84-46.84Q293-880 320-880h413.33q27 0 46.84 19.83Q800-840.33 800-813.33V-280q0 27-19.83 46.83-19.84 19.84-46.84 19.84H320Zm0-66.67h413.33v-533.33H320V-280ZM186.67-80q-27 0-46.84-19.83Q120-119.67 120-146.67v-600h66.67v600h480V-80h-480ZM320-280v-533.33V-280Z"/>
|
||||
</svg>
|
||||
`
|
||||
30
webroot/js/modal/errorHistory.js
Normal file
30
webroot/js/modal/errorHistory.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const button = document.getElementById('rezygisk_errorh')
|
||||
const copy_button = document.getElementById('errorh_copy')
|
||||
const target = document.getElementById('errorh_modal')
|
||||
const close_button = document.getElementById('errorh_modal_close')
|
||||
const panel = document.getElementById('errorh_panel')
|
||||
|
||||
let sys_module_mode = localStorage.getItem('/cache/modal/error_history/state')
|
||||
sys_module_mode = setData('closed')
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
target.style.top = '0%'
|
||||
|
||||
sys_module_mode = setData('opened')
|
||||
})
|
||||
|
||||
close_button.addEventListener('click', () => {
|
||||
target.style.top = '100%'
|
||||
|
||||
sys_module_mode = setData('closed')
|
||||
})
|
||||
|
||||
copy_button.addEventListener('click', () => {
|
||||
navigator.clipboard.writeText(panel.innerHTML);
|
||||
})
|
||||
|
||||
function setData(mode) {
|
||||
localStorage.setItem('/cache/modal/error_history/state', mode)
|
||||
|
||||
return localStorage.getItem('/cache/modal/error_history/state')
|
||||
}
|
||||
9
webroot/js/restoreError.js
Normal file
9
webroot/js/restoreError.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const errorh_panel = document.getElementById('errorh_panel')
|
||||
let sys_error = localStorage.getItem('/system/error')
|
||||
|
||||
if (!sys_error) {
|
||||
localStorage.setItem('/system/error', '')
|
||||
sys_error = localStorage.getItem('/system/error')
|
||||
}
|
||||
|
||||
if (sys_error.length !== 0) errorh_panel.innerHTML = sys_error
|
||||
@@ -1,34 +1,13 @@
|
||||
const light_icon = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#2c2c2c">
|
||||
<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 light_expand_icon = `
|
||||
<svg class="dimc" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#2c2c2c">
|
||||
<path d="m480-340 180-180-57-56-123 123-123-123-57 56 180 180Zm0 260q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/>
|
||||
</svg>
|
||||
`
|
||||
const light_settings_icon = `
|
||||
<svg class="dimc" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#2c2c2c">
|
||||
<path d="m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z"/>
|
||||
</svg>
|
||||
`
|
||||
const light_lang_icon = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#2c2c2c">
|
||||
<path d="M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q83 0 155.5 31.5t127 86q54.5 54.5 86 127T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Zm0-82q26-36 45-75t31-83H404q12 44 31 83t45 75Zm-104-16q-18-33-31.5-68.5T322-320H204q29 50 72.5 87t99.5 55Zm208 0q56-18 99.5-55t72.5-87H638q-9 38-22.5 73.5T584-178ZM170-400h136q-3-20-4.5-39.5T300-480q0-21 1.5-40.5T306-560H170q-5 20-7.5 39.5T160-480q0 21 2.5 40.5T170-400Zm216 0h188q3-20 4.5-39.5T580-480q0-21-1.5-40.5T574-560H386q-3 20-4.5 39.5T380-480q0 21 1.5 40.5T386-400Zm268 0h136q5-20 7.5-39.5T800-480q0-21-2.5-40.5T790-560H654q3 20 4.5 39.5T660-480q0 21-1.5 40.5T654-400Zm-16-240h118q-29-50-72.5-87T584-782q18 33 31.5 68.5T638-640Zm-234 0h152q-12-44-31-83t-45-75q-26 36-45 75t-31 83Zm-200 0h118q9-38 22.5-73.5T376-782q-56 18-99.5 55T204-640Z"/>
|
||||
</svg>
|
||||
`
|
||||
const light_close_icon = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#2c2c2c">
|
||||
<path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/>
|
||||
</svg>
|
||||
`
|
||||
|
||||
import {
|
||||
light_icon,
|
||||
light_logs_icon,
|
||||
light_lang_icon,
|
||||
light_close_icon,
|
||||
light_expand_icon,
|
||||
light_module_icon,
|
||||
light_settings_icon,
|
||||
light_copy_icon
|
||||
} from "./light.icon.js"
|
||||
const rootCss = document.querySelector(':root')
|
||||
const button = document.getElementById('theme_switcher')
|
||||
|
||||
@@ -38,7 +17,9 @@ const module_expand = document.getElementById('module_expand_icon')
|
||||
const settings_expand = document.getElementById('settings_expand_icon')
|
||||
const settings_icon = document.getElementById('setting_icon')
|
||||
const lang_switcher = document.getElementById('lang_switcher')
|
||||
const logs_icon = document.getElementById('logs_icon')
|
||||
const close_icons = document.getElementsByClassName('close_icon')
|
||||
const copy_button = document.getElementById('errorh_copy')
|
||||
|
||||
let sys_theme = localStorage.getItem('/system/theme')
|
||||
if (!sys_theme) sys_theme = setData('dark')
|
||||
@@ -74,6 +55,8 @@ function setDark() {
|
||||
button.innerHTML = '<img src="assets/dark.svg">'
|
||||
module_list_icon.innerHTML = '<img class="dimc" src="assets/module.svg">'
|
||||
lang_switcher.innerHTML = '<img src="assets/lang.svg">'
|
||||
logs_icon.innerHTML = '<img class="dimc" src="assets/error.svg">'
|
||||
copy_button.innerHTML = '<img src="assets/content.svg">'
|
||||
}
|
||||
|
||||
function setLight() {
|
||||
@@ -98,6 +81,8 @@ function setLight() {
|
||||
button.innerHTML = light_icon
|
||||
module_list_icon.innerHTML = light_module_icon
|
||||
lang_switcher.innerHTML = light_lang_icon
|
||||
logs_icon.innerHTML = light_logs_icon
|
||||
copy_button.innerHTML = light_copy_icon
|
||||
}
|
||||
|
||||
function setData(mode) {
|
||||
|
||||
@@ -39,5 +39,9 @@
|
||||
},
|
||||
"global": {
|
||||
"unknown": "Unknown"
|
||||
},
|
||||
"errorHistory": {
|
||||
"header": "Error History",
|
||||
"placeholder": "No error log recorded here!"
|
||||
}
|
||||
}
|
||||
@@ -39,5 +39,9 @@
|
||||
},
|
||||
"global": {
|
||||
"unknown": "不明"
|
||||
},
|
||||
"errorHistory": {
|
||||
"header": "Error History",
|
||||
"placeholder": "No error log recorded here!"
|
||||
}
|
||||
}
|
||||
@@ -39,5 +39,9 @@
|
||||
},
|
||||
"global": {
|
||||
"unknown": "Desconhecido"
|
||||
},
|
||||
"errorHistory": {
|
||||
"header": "Error History",
|
||||
"placeholder": "No error log recorded here!"
|
||||
}
|
||||
}
|
||||
@@ -39,5 +39,9 @@
|
||||
},
|
||||
"global": {
|
||||
"unknown": "Necunoscut"
|
||||
},
|
||||
"errorHistory": {
|
||||
"header": "Error History",
|
||||
"placeholder": "No error log recorded here!"
|
||||
}
|
||||
}
|
||||
@@ -39,5 +39,9 @@
|
||||
},
|
||||
"global": {
|
||||
"unknown": "Неизвестно"
|
||||
},
|
||||
"errorHistory": {
|
||||
"header": "Error History",
|
||||
"placeholder": "No error log recorded here!"
|
||||
}
|
||||
}
|
||||
@@ -39,5 +39,9 @@
|
||||
},
|
||||
"global": {
|
||||
"unknown": "Không xác định"
|
||||
},
|
||||
"errorHistory": {
|
||||
"header": "Lịch sử lỗi",
|
||||
"placeholder": "Không có lỗi nào đã được ghi lại ở đây!"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user