You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
Invisible + UI fix
integrate module action.sh and WebUI into tricky store, module now is not visible root manager, Thanks for ideaa from @backslashxx . Add uninstall button in the bottom of WebUI. Fix some UI bug.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<body>
|
||||
<!-- Header -->
|
||||
<div class="header">
|
||||
<div id="title" data-i18n="title">Tricky Addon - Update Target List</div>
|
||||
<div id="title" data-i18n="title"></div>
|
||||
<button id="help-button" class="help-button"><i class="fa fa-question-circle"></i></button>
|
||||
<div class="no-connection">
|
||||
<img src="wifi-slash.svg" alt="No Connection Icon" class="wifi-icon">
|
||||
@@ -106,27 +106,36 @@
|
||||
<div id="about-menu" class="about-menu">
|
||||
<button id="close-about" class="close-about">✕</button>
|
||||
<div class="about-content">
|
||||
<p data-i18n="module_name_line1">Module Name Line 1</p>
|
||||
<p data-i18n="module_name_line2">Module Name Line 2</p>
|
||||
<p><span data-i18n="by">by </span>KOWX712</p>
|
||||
<p data-i18n="module_name_line1"></p>
|
||||
<p data-i18n="module_name_line2"></p>
|
||||
<p><span data-i18n="by"></span>KOWX712</p>
|
||||
<br>
|
||||
<p>
|
||||
<span data-i18n="telegram_channel"></span>:
|
||||
<span data-i18n="telegram_channel"></span>
|
||||
<br>
|
||||
<span>t.me/kowchannel</span>
|
||||
</p>
|
||||
<br>
|
||||
<p>
|
||||
<span data-i18n="github">GitHub</span>:
|
||||
<span data-i18n="github"></span>
|
||||
<br>
|
||||
<span>github.com/KOWX712/Tricky-Addon-Update-Target-List</span>
|
||||
</p>
|
||||
<br>
|
||||
<p data-i18n="acknowledgment">Acknowledgment</p>
|
||||
<p data-i18n="disclaimer"></p>
|
||||
<br>
|
||||
<p data-i18n="acknowledgment"></p>
|
||||
<p>j-hc/zygisk-detach: WebUI template</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="footer"></div>
|
||||
<div class="footer">
|
||||
<div class="uninstall-container hidden">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span data-i18n="uninstall_webui"></span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+17
-3
@@ -245,13 +245,15 @@ async function refreshAppList() {
|
||||
clearBtn.style.display = "none";
|
||||
appListContainer.innerHTML = '';
|
||||
loadingIndicator.style.display = 'flex';
|
||||
document.querySelector('.uninstall-container').classList.add('hidden');
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
window.scrollTo(0, 0);
|
||||
if (noConnection.style.display === "flex") {
|
||||
await runExtraScript();
|
||||
}
|
||||
await fetchAppList();[]
|
||||
await fetchAppList();
|
||||
loadingIndicator.style.display = 'none';
|
||||
document.querySelector('.uninstall-container').classList.remove('hidden');
|
||||
isRefreshing = false;
|
||||
}
|
||||
|
||||
@@ -649,6 +651,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
await fetchAppList();
|
||||
checkMagisk();
|
||||
loadingIndicator.style.display = "none";
|
||||
document.querySelector('.uninstall-container').classList.remove('hidden');
|
||||
runExtraScript();
|
||||
});
|
||||
|
||||
@@ -675,12 +678,12 @@ languageOptions.forEach(option => {
|
||||
|
||||
// Scroll event
|
||||
let lastScrollY = window.scrollY;
|
||||
const scrollThreshold = 35;
|
||||
const scrollThreshold = 40;
|
||||
window.addEventListener('scroll', () => {
|
||||
if (isRefreshing) return;
|
||||
if (window.scrollY > lastScrollY && window.scrollY > scrollThreshold) {
|
||||
title.style.transform = 'translateY(-100%)';
|
||||
searchMenuContainer.style.transform = 'translateY(-35px)';
|
||||
searchMenuContainer.style.transform = 'translateY(-40px)';
|
||||
floatingBtn.style.transform = 'translateY(0)';
|
||||
} else if (window.scrollY < lastScrollY) {
|
||||
title.style.transform = 'translateY(0)';
|
||||
@@ -719,4 +722,15 @@ helpOverlay.addEventListener("click", (event) => {
|
||||
if (event.target === helpOverlay) {
|
||||
hideHelpOverlay();
|
||||
}
|
||||
});
|
||||
|
||||
// Uninstall WebUI button
|
||||
document.querySelector(".uninstall-container").addEventListener("click", async () => {
|
||||
try {
|
||||
await execCommand('cp -rf "/data/adb/modules/.TA_utl/common/temp/" "/data/adb/modules/TA_utl/"');
|
||||
showPrompt("uninstall_prompt");
|
||||
} catch (error) {
|
||||
console.error("Failed to execute uninstall command:", error);
|
||||
showPrompt("uninstall_failed", false);
|
||||
}
|
||||
});
|
||||
@@ -6,19 +6,20 @@
|
||||
4. Create a Pull Request.
|
||||
|
||||
---
|
||||
## Create a New Language
|
||||
## Add a New Language
|
||||
### Simple
|
||||
- Contact me in Telegram to create a new translation langauge for you.
|
||||
- Contact me in Telegram to add a new translation langauge for you.
|
||||
|
||||
### Advanced
|
||||
1. Fork this repository.
|
||||
2. Rename `/module/webroot/locales/A-translate.json` to `language_code-COUNTRY_CODE.json`, e.g., `en-US.json`.
|
||||
3. Translate the string value inside.
|
||||
4. Add `langauge-option` into `/module/webroot/index.html`.
|
||||
Format:
|
||||
```xml
|
||||
<button class="language-option" data-lang="language_code-COUNTRY_CODE" data-i18n="language_languageName">languageName</button>
|
||||
```
|
||||
Format:
|
||||
Example:
|
||||
```xml
|
||||
<div class="language-menu">
|
||||
<button class="language-option" data-lang="en-US" data-i18n="language_english_us">English</button>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"boot_hash_save_button": "Save",
|
||||
"loading": "Loading...",
|
||||
"boot_hash_input_placeholder": "Paste your verified Boot Hash here",
|
||||
"uninstall_webui": "Uninstall WebUI",
|
||||
|
||||
"refresh": "Refresh",
|
||||
"select_all": "Select All",
|
||||
@@ -32,6 +33,7 @@
|
||||
"by": "by ",
|
||||
"telegram_channel": "Telegram Channel",
|
||||
"github": "GitHub",
|
||||
"disclaimer": "This WebUI is not a part of Tricky Store, DO NOT report to Tricky Store author if you encounter any issue.",
|
||||
"acknowledgment": "Acknowledgment",
|
||||
|
||||
"no_internet": "Please check your Internet connection",
|
||||
@@ -43,5 +45,6 @@
|
||||
"boot_hash_set_error": "Failed to update Verified Boot Hash",
|
||||
"saved_and_updated": "Config and target.txt updated",
|
||||
"saved_not_updated": "Config saved, but failed to update target list",
|
||||
"save_error": "Failed to save config"
|
||||
"uninstall_prompt": "WebUI will be removed after reboot",
|
||||
"uninstall_failed": "Failed to uninstall WebUI"
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
"boot_hash_save_button": "Сохранить",
|
||||
"loading": "Загрузка...",
|
||||
"boot_hash_input_placeholder": "Вставьте свой проверенный Boot Hash сюда",
|
||||
"uninstall_webui": "Удалить WebUI",
|
||||
|
||||
"refresh": "Обновить",
|
||||
"select_all": "Выбрать все",
|
||||
@@ -32,6 +33,7 @@
|
||||
"by": "от ",
|
||||
"telegram_channel": "Канал в Telegram",
|
||||
"github": "GitHub",
|
||||
"disclaimer": "Этот WebUI не является частью Tricky Store, НЕ сообщайте автору Tricky Store о любых возникающих проблемах.",
|
||||
"acknowledgment": "Благодарности",
|
||||
|
||||
"no_internet": "Пожалуйста, проверьте ваше подключение к интернету",
|
||||
@@ -43,5 +45,7 @@
|
||||
"boot_hash_set_error": "Не удалось обновить Verified Boot Hash",
|
||||
"saved_and_updated": "Конфигурация и target.txt обновлены",
|
||||
"saved_not_updated": "Конфигурация сохранена, но не удалось обновить список целей",
|
||||
"save_error": "Не удалось сохранить конфигурацию"
|
||||
"save_error": "Не удалось сохранить конфигурацию",
|
||||
"uninstall_prompt": "WebUI будет удален после перезагрузки",
|
||||
"uninstall_failed": "Не удалось удалить WebUI"
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
"boot_hash_save_button": "I-save",
|
||||
"loading": "Naglo-load...",
|
||||
"boot_hash_input_placeholder": "I-paste ang iyong verified Boot Hash dito",
|
||||
"uninstall_webui": "I-uninstall ang WebUI",
|
||||
|
||||
"refresh": "I-refresh",
|
||||
"select_all": "Piliin Lahat",
|
||||
@@ -32,6 +33,7 @@
|
||||
"by": "ni ",
|
||||
"telegram_channel": "Telegram Channel",
|
||||
"github": "GitHub",
|
||||
"disclaimer": "Ang WebUI na ito ay hindi bahagi ng Tricky Store, HUWAG i-report sa may-akda ng Tricky Store kung makaranas ka ng anumang isyu.",
|
||||
"acknowledgment": "Pagkilala",
|
||||
|
||||
"no_internet": "Pakitingnan ang iyong koneksyon sa Internet",
|
||||
@@ -43,5 +45,7 @@
|
||||
"boot_hash_set_error": "Nabigong i-update ang Verified Boot Hash",
|
||||
"saved_and_updated": "Na-save ang config at na-update ang target.txt",
|
||||
"saved_not_updated": "Na-save ang config, ngunit nabigong i-update ang target list",
|
||||
"save_error": "Nabigong i-save ang config"
|
||||
"save_error": "Nabigong i-save ang config",
|
||||
"uninstall_prompt": "Mawawala ang WebUI pagkatapos ng reboot",
|
||||
"uninstall_failed": "Nabigong i-uninstall ang WebUI"
|
||||
}
|
||||
@@ -5,7 +5,8 @@
|
||||
"boot_hash_save_button": "保存",
|
||||
"loading": "加载中...",
|
||||
"boot_hash_input_placeholder": "在此粘贴您的哈希值",
|
||||
|
||||
"uninstall_webui": "卸载 WebUI",
|
||||
|
||||
"refresh": "刷新",
|
||||
"select_all": "全选",
|
||||
"deselect_all": "取消全选",
|
||||
@@ -32,6 +33,7 @@
|
||||
"by": "作者:",
|
||||
"telegram_channel": "TG频道",
|
||||
"github": "GitHub",
|
||||
"disclaimer": "此 WebUI 不是 Tricky Store 的一部分,遇到任何问题请勿向 Tricky Store 作者反馈。",
|
||||
"acknowledgment": "特别鸣谢",
|
||||
|
||||
"no_internet": "请检查您的网络连接",
|
||||
@@ -43,5 +45,7 @@
|
||||
"boot_hash_set_error": "哈希值重置失败",
|
||||
"saved_and_updated": "成功保存配置和更新目标列表",
|
||||
"saved_not_updated": "配置已保存,但更新目标列表失败",
|
||||
"save_error": "保存配置失败"
|
||||
"save_error": "保存配置失败",
|
||||
"uninstall_prompt": "WebUI 将在重启后被移除",
|
||||
"uninstall_failed": "卸载 WebUI 失败"
|
||||
}
|
||||
@@ -5,7 +5,8 @@
|
||||
"boot_hash_save_button": "保存",
|
||||
"loading": "加載中...",
|
||||
"boot_hash_input_placeholder": "在此粘貼您的哈希值",
|
||||
|
||||
"uninstall_webui": "卸載 WebUI",
|
||||
|
||||
"refresh": "刷新",
|
||||
"select_all": "全選",
|
||||
"deselect_all": "取消全選",
|
||||
@@ -32,6 +33,7 @@
|
||||
"by": "作者:",
|
||||
"telegram_channel": "TG頻道",
|
||||
"github": "GitHub",
|
||||
"disclaimer": "此 WebUI 不是 Tricky Store 的一部分,遇到任何問題請勿向 Tricky Store 作者反饋。",
|
||||
"acknowledgment": "特別鳴謝",
|
||||
|
||||
"no_internet": "請檢查您的網路連接",
|
||||
@@ -43,5 +45,7 @@
|
||||
"boot_hash_set_error": "哈希值重置失敗",
|
||||
"saved_and_updated": "成功保存配置和更新目標列表",
|
||||
"saved_not_updated": "配置已保存,但更新目標列表失敗",
|
||||
"save_error": "保存配置失敗"
|
||||
"save_error": "保存配置失敗",
|
||||
"uninstall_prompt": "WebUI 將在重啟後被移除",
|
||||
"uninstall_failed": "卸載 WebUI 失敗"
|
||||
}
|
||||
+47
-11
@@ -20,20 +20,21 @@ body {
|
||||
}
|
||||
|
||||
#title {
|
||||
font-size: 18px;
|
||||
font-size: 16.5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.no-connection {
|
||||
padding-bottom: 2px;
|
||||
display: none;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
margin-right: 0px;
|
||||
color: #7E7E7E;
|
||||
}
|
||||
|
||||
.no-connection .wifi-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-right: 0;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
filter: invert(0.6) sepia(0) saturate(0) hue-rotate(180deg) brightness(0.8) contrast(1);
|
||||
}
|
||||
|
||||
@@ -45,9 +46,9 @@ body {
|
||||
.language-button {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 24px;
|
||||
font-size: 23px;
|
||||
color: #333;
|
||||
margin-left: 10px;
|
||||
margin-right: -3px;
|
||||
}
|
||||
|
||||
.language-menu {
|
||||
@@ -57,7 +58,6 @@ body {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
background-color: #fff;
|
||||
min-width: 120px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||
z-index: 2000;
|
||||
border: 1px solid #ccc;
|
||||
@@ -89,10 +89,9 @@ body {
|
||||
|
||||
.help-button {
|
||||
margin-right: auto;
|
||||
padding: 0 7px;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 23px;
|
||||
font-size: 22px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
@@ -270,7 +269,6 @@ body {
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
padding: 25px 30px;
|
||||
padding-right: 50px;
|
||||
z-index: 1200;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
|
||||
opacity: 0;
|
||||
@@ -308,6 +306,14 @@ body {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.about-content p span[data-i18n="telegram_channel"] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.about-content p span[data-i18n="github"] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.about-content p[data-i18n="acknowledgment"] {
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
@@ -544,6 +550,7 @@ body {
|
||||
}
|
||||
|
||||
.floating-btn {
|
||||
flex-shrink: 0;
|
||||
background-color: #007bff;
|
||||
border: none;
|
||||
box-shadow: 0 4px 8px #0003;
|
||||
@@ -576,6 +583,35 @@ body {
|
||||
|
||||
.footer {
|
||||
padding: 25px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.uninstall-container {
|
||||
padding: 10px 10px;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 8px;
|
||||
background-color: #B10000
|
||||
}
|
||||
|
||||
.uninstall-container i {
|
||||
margin-right: 5px;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.uninstall-container span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
||||
Reference in New Issue
Block a user