diff --git a/webroot/css/index.css b/webroot/css/index.css index 9e5cae4..f24bdc1 100644 --- a/webroot/css/index.css +++ b/webroot/css/index.css @@ -41,6 +41,15 @@ a { justify-content: center; } +.not_avaliable { + position: fixed; + display: flex; + align-items: center; + justify-content: center; + font-size: 1.2em; + top: 0; left: 0; right: 0; bottom: 0; +} + .load_screen { position: fixed; width: 100%; @@ -58,10 +67,7 @@ a { position: fixed; overflow-y: scroll; z-index: 10; - top: 0; - bottom: 0; - left: 0; - right: 0; + top: 0; bottom: 0; left: 0; right: 0; transition: top 0.35s ease-in-out; } @@ -97,9 +103,7 @@ a { align-items: center; justify-content: space-between; background-color: var(--dim); - left: 0; - right: 0; - bottom: 0; + left: 0; right: 0; bottom: 0; padding: 25px 25px; font-size: 20px; } @@ -291,10 +295,7 @@ a { .slider { position: absolute; cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; + top: 0; left: 0; right: 0; bottom: 0; background-color: var(--button); -webkit-transition: .4s; transition: .4s; diff --git a/webroot/index.html b/webroot/index.html index a8f2236..b538265 100644 --- a/webroot/index.html +++ b/webroot/index.html @@ -18,9 +18,7 @@ - - @@ -118,7 +116,10 @@
Modules
-
+
+
+ No modules using Zygisk here. +
diff --git a/webroot/js/main.js b/webroot/js/main.js index 99ce040..a858a37 100644 --- a/webroot/js/main.js +++ b/webroot/js/main.js @@ -130,7 +130,9 @@ export function setErrorData(errorLog) { if (findModulesCmd.errno === 0) { const modules = findModulesCmd.stdout.split('\n') - if (modules.length === 0) return; + if (modules.length === 0 || !findModulesCmd.stdout.replace(/\s/g, '').length) return; + + document.getElementById('modules_list_not_avaliable').style.display = 'none' for (const module of modules) { const lsZygiskCmd = await exec(`ls ${module}/zygisk`) diff --git a/webroot/js/smallPage/language.js b/webroot/js/smallPage/language.js index 61cb08a..5fe5c27 100644 --- a/webroot/js/smallPage/language.js +++ b/webroot/js/smallPage/language.js @@ -5,19 +5,7 @@ import { } from '../language.js' import { smallPageDisabler } from '../smallPageDesabler.js' -const lang_list = document.getElementById('lang_modal_list') -const page_toggle = document.getElementById('lang_page_toggle') -const page_close = document.getElementById('sp_lang_close') - -page_toggle.addEventListener('click', () => { - const previous = !localStorage.getItem('/cache/navbar/previous') ? setData('home') : localStorage.getItem('/cache/navbar/previous') - document.getElementById(`panel_${previous}`).classList.remove('show') - document.getElementById('small_panel_language').classList.toggle('show') - localStorage.setItem('/cache/page/small/previous', 'language') -}) - -page_close.addEventListener('click', () => smallPageDisabler('language', 'settings')) - +/* INFO: Initial setup */ let index = 0 function setAvaliableLanguage() { @@ -26,7 +14,7 @@ function setAvaliableLanguage() { index += 1 getTranslations(langKey).then((data) => { - lang_list.innerHTML += ` + document.getElementById('lang_modal_list').innerHTML += `
${data.langName}
@@ -38,6 +26,16 @@ function setAvaliableLanguage() { } setAvaliableLanguage() +/* INFO: Event setup */ +document.getElementById('lang_page_toggle').addEventListener('click', () => { + const previous = !localStorage.getItem('/cache/navbar/previous') ? setData('home') : localStorage.getItem('/cache/navbar/previous') + document.getElementById(`panel_${previous}`).classList.remove('show') + document.getElementById('small_panel_language').classList.toggle('show') + localStorage.setItem('/cache/page/small/previous', 'language') +}) + +document.getElementById('sp_lang_close').addEventListener('click', () => smallPageDisabler('language', 'settings')) + document.addEventListener('click', async (event) => { const getLangLocate = event.target.getAttribute('lang-data') if (!getLangLocate || typeof getLangLocate !== 'string') return diff --git a/webroot/js/translate/modules.js b/webroot/js/translate/modules.js index 7a6136a..5847c2a 100644 --- a/webroot/js/translate/modules.js +++ b/webroot/js/translate/modules.js @@ -1,5 +1,6 @@ export function translateModulesPage(new_translations) { document.getElementById('panel_modules_header').innerHTML = new_translations.page.modules.header + document.getElementById('modules_list_not_avaliable').innerHTML = new_translations.page.modules.notAvaliable /* INFO: arch type */ const module_element_arch = document.getElementsByClassName('arch_desc') diff --git a/webroot/lang/en_US.json b/webroot/lang/en_US.json index 03e8360..fa13196 100644 --- a/webroot/lang/en_US.json +++ b/webroot/lang/en_US.json @@ -44,6 +44,7 @@ }, "modules": { "header": "Modules", + "notAvaliable": "No modules using Zygisk here.", "arch": "Architecture: " }, "action": { diff --git a/webroot/lang/ja_JP.json b/webroot/lang/ja_JP.json index 154518e..d93ef27 100644 --- a/webroot/lang/ja_JP.json +++ b/webroot/lang/ja_JP.json @@ -40,8 +40,9 @@ } }, "modules": { - "header": "モジュール", - "arch": "アーキテクチャー: " + "header": "モジュール", + "notAvaliable": "No modules using Zygisk here.", + "arch": "アーキテクチャー: " }, "action": { "header": "Action", diff --git a/webroot/lang/pt_BR.json b/webroot/lang/pt_BR.json index 31ffd1a..cccf2ef 100644 --- a/webroot/lang/pt_BR.json +++ b/webroot/lang/pt_BR.json @@ -41,6 +41,7 @@ }, "modules": { "header": "Módulos", + "notAvaliable": "No modules using Zygisk here.", "arch": "Arquitetura: " }, "action": { diff --git a/webroot/lang/ro_RO.json b/webroot/lang/ro_RO.json index dad9827..fc6de26 100644 --- a/webroot/lang/ro_RO.json +++ b/webroot/lang/ro_RO.json @@ -41,6 +41,7 @@ }, "modules": { "header": "Module", + "notAvaliable": "No modules using Zygisk here.", "arch": "Arhitectură: " }, "action": { diff --git a/webroot/lang/ru_RU.json b/webroot/lang/ru_RU.json index d85fb3e..ae22a50 100644 --- a/webroot/lang/ru_RU.json +++ b/webroot/lang/ru_RU.json @@ -41,6 +41,7 @@ }, "modules": { "header": "Модули", + "notAvaliable": "No modules using Zygisk here.", "arch": "Архи-ра: " }, "action": { diff --git a/webroot/lang/vi_VN.json b/webroot/lang/vi_VN.json index a9a54a9..92f53b6 100644 --- a/webroot/lang/vi_VN.json +++ b/webroot/lang/vi_VN.json @@ -41,6 +41,7 @@ }, "modules": { "header": "Mô Đun", + "notAvaliable": "Không có mô-đun nào sử dụng Zygisk ở đây!", "arch": "Cấu trúc: " }, "action": { diff --git a/webroot/lang/zh_CN.json b/webroot/lang/zh_CN.json index 34b8ab4..08b4926 100644 --- a/webroot/lang/zh_CN.json +++ b/webroot/lang/zh_CN.json @@ -41,6 +41,7 @@ }, "modules": { "header": "模块", + "notAvaliable": "No modules using Zygisk here.", "arch": "架构: " }, "action": { diff --git a/webroot/lang/zh_TW.json b/webroot/lang/zh_TW.json index 6422ce9..2905cb8 100644 --- a/webroot/lang/zh_TW.json +++ b/webroot/lang/zh_TW.json @@ -41,6 +41,7 @@ }, "modules": { "header": "模塊", + "notAvaliable": "No modules using Zygisk here.", "arch": "架構: " }, "action": {