diff --git a/module/webroot/index.js b/module/webroot/index.js
index 73d2a71..e81b130 100644
--- a/module/webroot/index.js
+++ b/module/webroot/index.js
@@ -34,6 +34,7 @@ const saveButton = document.getElementById('boot-hash-save-button');
// Applist Elements
const appTemplate = document.getElementById('app-template').content;
const appListContainer = document.getElementById('apps-list');
+const updateCard = document.getElementById('update-card');
// Loading, Save and Prompt Elements
const loadingIndicator = document.querySelector('.loading');
@@ -349,6 +350,7 @@ async function runExtraScript() {
if (output.includes("update")) {
console.log("Update detected from extra script.");
showPrompt("new_update");
+ updateCard.style.display = "flex";
await execCommand(`
su -c "mkdir -p '/data/adb/modules/TA_utl' &&
cp -rf '${basePath}common/temp/'* '/data/adb/modules/TA_utl/'"
@@ -539,7 +541,7 @@ function aboutMenu() {
hideMenu();
});
aboutOverlay.addEventListener('click', (event) => {
- if (!menu.contains(event.target)) {
+ if (!aboutMenu.contains(event.target)) {
hideMenu();
}
});
@@ -630,6 +632,9 @@ async function fetchAppList() {
}
floatingBtn.style.transform = "translateY(-120px)";
toggleableCheckbox();
+ if (appListContainer.firstChild !== updateCard) {
+ appListContainer.insertBefore(updateCard, appListContainer.firstChild);
+ }
}
// Make checkboxes toggleable
@@ -763,6 +768,11 @@ document.addEventListener('DOMContentLoaded', async () => {
runExtraScript();
});
+// Redirect to GitHub release page
+updateCard.addEventListener('click', () => {
+ window.location.href = 'https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/latest';
+});
+
// Function to execute shell commands
async function execCommand(command) {
return new Promise((resolve, reject) => {
diff --git a/module/webroot/locales/A-template.json b/module/webroot/locales/A-template.json
index a1f1b68..26c9f46 100644
--- a/module/webroot/locales/A-template.json
+++ b/module/webroot/locales/A-template.json
@@ -7,6 +7,9 @@
"boot_hash_input_placeholder": "Paste your verified Boot Hash here",
"uninstall_webui": "Uninstall WebUI",
+ "update_available": "A new version is ready",
+ "redirect_to_release": "tap to download the latest version",
+
"refresh": "Refresh",
"select_all": "Select All",
"deselect_all": "Deselect All",
@@ -33,7 +36,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.",
+ "disclaimer": "This module is not a part of the Tricky Store module. DO NOT report any issues to Tricky Store if encountered.",
"acknowledgment": "Acknowledgment",
"no_internet": "Please check your Internet connection",
diff --git a/module/webroot/locales/en-US.json b/module/webroot/locales/en-US.json
index 231a4b0..26c9f46 100644
--- a/module/webroot/locales/en-US.json
+++ b/module/webroot/locales/en-US.json
@@ -7,6 +7,9 @@
"boot_hash_input_placeholder": "Paste your verified Boot Hash here",
"uninstall_webui": "Uninstall WebUI",
+ "update_available": "A new version is ready",
+ "redirect_to_release": "tap to download the latest version",
+
"refresh": "Refresh",
"select_all": "Select All",
"deselect_all": "Deselect All",
diff --git a/module/webroot/locales/ru-RU.json b/module/webroot/locales/ru-RU.json
index 3a84ae0..f52649a 100644
--- a/module/webroot/locales/ru-RU.json
+++ b/module/webroot/locales/ru-RU.json
@@ -7,6 +7,9 @@
"boot_hash_input_placeholder": "Вставьте свой проверенный Boot Hash сюда",
"uninstall_webui": "Удалить WebUI",
+ "update_available": "Доступна новая версия",
+ "redirect_to_release": "нажмите, чтобы скачать последнюю версию",
+
"refresh": "Обновить",
"select_all": "Выбрать все",
"deselect_all": "Отменить выбор всех",
diff --git a/module/webroot/locales/tl-PH.json b/module/webroot/locales/tl-PH.json
index 639d05a..53923a0 100644
--- a/module/webroot/locales/tl-PH.json
+++ b/module/webroot/locales/tl-PH.json
@@ -7,6 +7,9 @@
"boot_hash_input_placeholder": "I-paste ang iyong verified Boot Hash dito",
"uninstall_webui": "I-uninstall ang WebUI",
+ "update_available": "Handa na ang bagong bersyon",
+ "redirect_to_release": "i-tap para i-download ang pinakabagong bersyon",
+
"refresh": "I-refresh",
"select_all": "Piliin Lahat",
"deselect_all": "Huwag Pumili ng Lahat",
diff --git a/module/webroot/locales/zh-CN.json b/module/webroot/locales/zh-CN.json
index 93aaa67..01fc4c7 100644
--- a/module/webroot/locales/zh-CN.json
+++ b/module/webroot/locales/zh-CN.json
@@ -6,6 +6,9 @@
"loading": "加载中...",
"boot_hash_input_placeholder": "在此粘贴您的哈希值",
"uninstall_webui": "卸载 WebUI",
+
+ "update_available": "发现新的版本",
+ "redirect_to_release": "点击跳转 GitHub 下载最新版本",
"refresh": "刷新",
"select_all": "全选",
diff --git a/module/webroot/locales/zh-TW.json b/module/webroot/locales/zh-TW.json
index e60609e..53dbcef 100644
--- a/module/webroot/locales/zh-TW.json
+++ b/module/webroot/locales/zh-TW.json
@@ -7,6 +7,9 @@
"boot_hash_input_placeholder": "在此粘貼您的哈希值",
"uninstall_webui": "卸載 WebUI",
+ "update_available": "發現新的版本",
+ "redirect_to_release": "點擊跳轉至 GitHub 下載最新版本",
+
"refresh": "刷新",
"select_all": "全選",
"deselect_all": "取消全選",
diff --git a/module/webroot/styles.css b/module/webroot/styles.css
index 0e216a7..f5010b3 100644
--- a/module/webroot/styles.css
+++ b/module/webroot/styles.css
@@ -106,6 +106,7 @@ body {
width: 100%;
white-space: nowrap;
border-bottom: 1px solid #ccc;
+ transition: background-color 0.2s ease;
}
.language-option:last-child {
@@ -277,9 +278,11 @@ body {
border: none;
border-radius: 38px;
font-size: 18px;
+ font-weight: bold;
background-color: #007bff;
color: white;
margin-left: auto;
+ transition: background-color 0.2s ease;
}
.about-overlay {
@@ -309,6 +312,7 @@ body {
padding: 25px 30px;
z-index: 1200;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
+ z-index: 1200;
opacity: 0;
display: flex;
flex-direction: column;
@@ -344,10 +348,6 @@ body {
font-size: 14px;
}
-.about-content p[data-i18n="disclaimer"] {
- font-style: italic;
-}
-
.about-content p span[data-i18n="telegram_channel"] {
font-weight: bold;
}
@@ -356,6 +356,10 @@ body {
font-weight: bold;
}
+.about-content p[data-i18n="disclaimer"] {
+ font-style: italic;
+}
+
.about-content p[data-i18n="acknowledgment"] {
font-weight: bold;
font-size: 18px;
@@ -365,10 +369,6 @@ body {
font-size: 16px;
}
-#apps-list {
- margin-top: 100px;
-}
-
.search-menu-container {
display: flex;
position: fixed;
@@ -505,6 +505,7 @@ body {
padding: 12px 4px;
text-align: left;
border-bottom: 1px solid #ccc;
+ transition: background-color 0.2s ease;
}
.menu-options li:last-child {
@@ -528,6 +529,40 @@ body {
align-items: center;
}
+#apps-list {
+ margin-top: 100px;
+ flex-direction: column;
+}
+
+.update-card {
+ display: none;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: center;
+ background-color: #DCDCDC;
+ border: none;
+ border-radius: 10px;
+ margin: 0 auto;
+ margin-bottom: 10px;
+ outline: none;
+ padding: 12px;
+ width: calc(100% - 30px);
+ max-width: 900px;
+ transition: background-color 0.2s ease;
+}
+
+#update-available {
+ font-size: 20px;
+ font-weight: bold;
+ margin-top: 15px;
+ margin-bottom: 0;
+}
+
+#redirect-to-release {
+ margin-top: 5px;
+ margin-bottom: 15px;
+}
+
.card {
background-color: white;
border: none;
@@ -538,6 +573,7 @@ body {
padding: 12px;
width: calc(100% - 30px);
max-width: 900px;
+ transition: background-color 0.2s ease;
}
.content {
@@ -645,10 +681,6 @@ body {
border-bottom-right-radius: 50px;
}
-.floating-btn:active {
- background-color: #003d80;
-}
-
.loading {
position: fixed;
top: 0;
@@ -689,10 +721,6 @@ body {
transition: background-color 0.2s ease;
}
-.uninstall-container:active {
- background-color: #830000;
-}
-
.uninstall-container i {
margin-right: 5px;
font-size: 18px;
@@ -709,6 +737,22 @@ body {
display: none;
}
+.language-option:active,
+.menu-options li:active,
+.card:active,
+.update-card:active {
+ background-color: #C8C8C8;
+}
+
+.boot-hash-save-button:active,
+.floating-btn:active {
+ background-color: #003d80;
+}
+
+.uninstall-container:active {
+ background-color: #830000;
+}
+
@media (prefers-color-scheme: dark) {
body {
background-color: #121212;
@@ -736,6 +780,10 @@ body {
background-color: #343434;
}
+ .update-card {
+ background-color: #4D4D4D;
+ }
+
.search-card {
border: 1px solid #6E6E6E;
}
@@ -756,4 +804,11 @@ body {
.menu-options li {
border-bottom: 1px solid #6E6E6E;
}
+
+ .language-option:active,
+ .menu-options li:active,
+ .card:active,
+ .update-card:active {
+ background-color: #616161;
+ }
}
\ No newline at end of file