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
Compare commits
20 Commits
v2.6-beta.
...
v2.6-beta.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce2164b6c2 | ||
|
|
1c1333d0c8 | ||
|
|
561de52bf7 | ||
|
|
6fe8d30ccf | ||
|
|
101bb6abd0 | ||
|
|
b7341c80bc | ||
|
|
5460a2fa5d | ||
|
|
d6d890ef10 | ||
|
|
8801513684 | ||
|
|
db6e591010 | ||
|
|
ad5e2ca551 | ||
|
|
7f431f13f3 | ||
|
|
ed379dfde5 | ||
|
|
3dd007882b | ||
|
|
0607f2d223 | ||
|
|
6a5fb6c717 | ||
|
|
6561ea861b | ||
|
|
f4085f8cf0 | ||
|
|
336efb8d3e | ||
|
|
9e57c81a66 |
@@ -5,6 +5,7 @@ A **KSU WebUI** to configure tricky store target.txt
|
||||
## Description
|
||||
- Automated script to update tricky store target list.
|
||||
- System app excluded by default
|
||||
- This module is **not** a part of Tricky Store module, DO NOT report to Tricky Store if you encounter any issue.
|
||||
- This is **not** a necessary module for root hide but for those who lazy to do it manually
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -3,13 +3,18 @@ A **KSU WebUI** to configure tricky store target.txt
|
||||
|
||||
Requirement: Tricky Store module installed
|
||||
|
||||
This module is not a part of Tricky Store, DO NOT report to Tricky Store if you encounter any issue.
|
||||
|
||||
GitHub release: [Tricky Addon: Update Target List](https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/latest)
|
||||
|
||||
Telegram channel: [KOW's Little World](https://t.me/kowchannel)
|
||||
|
||||
## Changelog
|
||||
### v2.6-beta.2
|
||||
- Check in [release notes](https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/tag/v2.6-beta.2).
|
||||
|
||||
### v2.6-beta.1
|
||||
- Check in (release notes)[https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/tag/v2.6-beta.1].
|
||||
- Check in [release notes](https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/tag/v2.6-beta.1).
|
||||
|
||||
### v2.5
|
||||
- Remove kb prompt on installation, moved into WebUI
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
MODPATH="${0%/*}"
|
||||
###########################################
|
||||
## This file is NOT a part of Tricky Store
|
||||
###########################################
|
||||
|
||||
MODPATH="/data/adb/modules/.TA_utl"
|
||||
COMPATH="$MODPATH/common"
|
||||
SCRIPT_DIR="/data/adb/tricky_store"
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
URL="https://github.com/5ec1cff/KsuWebUIStandalone/releases/download/v1.0/KsuWebUI-1.0-34-release.apk"
|
||||
APK_DIR="$COMPATH"
|
||||
LOG_FILE="$COMPATH/webuiError.log"
|
||||
|
||||
find_busybox
|
||||
check_wget
|
||||
|
||||
@@ -17,7 +17,7 @@ awk -F'"' '{print $4}' > "$OUTPUT"
|
||||
|
||||
if [ ! -s "$OUTPUT" ]; then
|
||||
rm -f "$KBOUTPUT"
|
||||
skipkb=true
|
||||
skipfetch=true
|
||||
fi
|
||||
|
||||
# Find xposed package name
|
||||
@@ -29,12 +29,21 @@ pm list packages -3 </dev/null 2>&1 | cat | awk -F: '{print $2}' | while read -
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$skipkb" != "true" ]; then
|
||||
if [ "$skipfetch" != "true" ]; then
|
||||
wget --no-check-certificate -qO "$KBOUTPUT" "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/.extra"
|
||||
|
||||
if [ ! -s "$KBOUTPUT" ]; then
|
||||
rm -f "$KBOUTPUT"
|
||||
fi
|
||||
|
||||
if [ -d "$MODPATH/temp" ]; then
|
||||
JSON=$(wget --no-check-certificate -q -O - "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/update.json")
|
||||
REMOTE_VERSION=$(echo "$JSON" | grep -o '"versionCode": *[0-9]*' | awk -F: '{print $2}' | tr -d ' ')
|
||||
LOCAL_VERSION=$(grep -o 'versionCode=[0-9]*' "$MODPATH/temp/module.prop" | awk -F= '{print $2}')
|
||||
if [ "$REMOTE_VERSION" -gt "$LOCAL_VERSION" ]; then
|
||||
echo "update"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
3
module/common/temp/service.sh
Normal file
3
module/common/temp/service.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
MODPATH=${0%/*}
|
||||
|
||||
rm -rf "$MODPATH"
|
||||
22
module/common/temp/uninstall.sh
Normal file
22
module/common/temp/uninstall.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
MODPATH=${0%/*}
|
||||
TS="/data/adb/modules/tricky_store"
|
||||
SCRIPT_DIR="/data/adb/tricky_store"
|
||||
|
||||
# Enable back TSupport-A auto update
|
||||
if [ -f "/storage/emulated/0/stop-tspa-auto-target" ]; then
|
||||
rm -f "/storage/emulated/0/stop-tspa-auto-target"
|
||||
fi
|
||||
|
||||
# Remove residue and restore aosp keybox.
|
||||
rm -rf "/data/adb/modules/.TA_utl"
|
||||
rm -rf "$SCRIPT_DIR/target_list_config"
|
||||
rm -f "$SCRIPT_DIR/UpdateTargetList.sh"
|
||||
rm -f "/data/adb/boot_hash"
|
||||
if [ -d "$TS" ]; then
|
||||
if [ -f "$TS/action.sh" ]; then
|
||||
rm -f "$TS/action.sh"
|
||||
else
|
||||
rm -rf "$TS/webroot"
|
||||
fi
|
||||
fi
|
||||
xxd -r -p "$MODPATH/.default" | base64 -d > "$SCRIPT_DIR/keybox.xml"
|
||||
@@ -5,7 +5,7 @@ TS="/data/adb/modules/tricky_store"
|
||||
SCRIPT_DIR="/data/adb/tricky_store"
|
||||
CONFIG_DIR="$SCRIPT_DIR/target_list_config"
|
||||
MODID=`grep_prop id $TMPDIR/module.prop`
|
||||
ORG_DIR="/data/adb/modules/$MODID"
|
||||
NEW_MODID=.TA_utl
|
||||
kb="$COMPATH/.default"
|
||||
|
||||
ui_print " ";
|
||||
|
||||
@@ -5,22 +5,13 @@ initialize() {
|
||||
if [ -f "$CONFIG_DIR/skipwebui" ]; then
|
||||
rm -f "$CONFIG_DIR/skipwebui"
|
||||
fi
|
||||
cp "$MODPATH/module.prop" "$COMPATH/module.prop.orig"
|
||||
if [ -d "/data/adb/modules/$NEW_MODID" ]; then
|
||||
rm -rf "/data/adb/modules/$NEW_MODID"
|
||||
fi
|
||||
|
||||
cp "$MODPATH/module.prop" "$COMPATH/temp/module.prop"
|
||||
cp "$COMPATH/.default" "$COMPATH/temp/.default"
|
||||
mv "$COMPATH/UpdateTargetList.sh" "$SCRIPT_DIR/UpdateTargetList.sh"
|
||||
|
||||
sed -i "s|\"set-path\"|\"/data/adb/modules/$MODID/common/\"|" "$MODPATH/webroot/index.js" || {
|
||||
ui_print "! Failed to set path"
|
||||
abort
|
||||
}
|
||||
sed -i "s|\"set-id\"|\"$MODID\"|" "$COMPATH/util_func.sh" || {
|
||||
ui_print "! Failed to set id"
|
||||
abort
|
||||
}
|
||||
|
||||
mv "$MODPATH/bin/$(getprop ro.product.cpu.abi)/aapt" "$COMPATH/aapt"
|
||||
rm -rf "$MODPATH/bin"
|
||||
|
||||
set_perm $COMPATH/aapt 0 2000 0755
|
||||
set_perm $SCRIPT_DIR/UpdateTargetList.sh 0 2000 0755
|
||||
set_perm $COMPATH/get_extra.sh 0 2000 0755
|
||||
set_perm $COMPATH/get_WebUI.sh 0 2000 0755
|
||||
@@ -28,7 +19,31 @@ initialize() {
|
||||
if [ "$ACTION" = "false" ]; then
|
||||
rm -f "$MODPATH/action.sh"
|
||||
rm -f "$COMPATH/get_WebUI.sh"
|
||||
echo "**********************************************"
|
||||
echo "- Tricky Addon's visibility in root manager?"
|
||||
echo " VOL [+]: Visible"
|
||||
echo " VOL [-]: Invisible (default)"
|
||||
echo "**********************************************"
|
||||
|
||||
key_check
|
||||
if [[ "$keycheck" == "KEY_VOLUMEUP" ]]; then
|
||||
echo "- Setting to visible..."
|
||||
rm -rf "$COMPATH/temp"
|
||||
NEW_MODID="$MODID"
|
||||
fi
|
||||
fi
|
||||
sed -i "s|\"set-path\"|\"/data/adb/modules/$NEW_MODID/common/\"|" "$MODPATH/webroot/index.js" || {
|
||||
ui_print "! Failed to set path"
|
||||
abort
|
||||
}
|
||||
sed -i "s|\"set-id\"|\"$NEW_MODID\"|" "$COMPATH/util_func.sh" || {
|
||||
ui_print "! Failed to set id"
|
||||
abort
|
||||
}
|
||||
|
||||
mv "$MODPATH/bin/$(getprop ro.product.cpu.abi)/aapt" "$COMPATH/aapt"
|
||||
set_perm $COMPATH/aapt 0 2000 0755
|
||||
rm -rf "$MODPATH/bin"
|
||||
}
|
||||
|
||||
add_exclude() {
|
||||
@@ -77,19 +92,28 @@ find_config() {
|
||||
|
||||
migrate_old_boot_hash() {
|
||||
if [ ! -f "/data/adb/boot_hash" ]; then
|
||||
if [ -f "$ORG_DIR/boot_hash" ]; then
|
||||
mv "$ORG_DIR/boot_hash" "/data/adb/boot_hash"
|
||||
fi
|
||||
mv "$COMPATH/boot_hash" "/data/adb/boot_hash"
|
||||
mv "$COMPATH/boot_hash" "/data/adb/boot_hash"
|
||||
else
|
||||
rm -f "$COMPATH/boot_hash"
|
||||
fi
|
||||
|
||||
# Migrate from old version setup
|
||||
if [ -f "$ORG_DIR/system.prop" ]; then
|
||||
hash_value=$(sed -n 's/^ro.boot.vbmeta.digest=//p' "$ORG_DIR/system.prop")
|
||||
if [ -n "$hash_value" ]; then
|
||||
echo -e "\n$hash_value" >> "/data/adb/boot_hash"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
key_check() {
|
||||
while true; do
|
||||
key_check=$(/system/bin/getevent -qlc 1)
|
||||
key_event=$(echo "$key_check" | awk '{ print $3 }' | grep 'KEY_')
|
||||
key_status=$(echo "$key_check" | awk '{ print $4 }')
|
||||
if [[ "$key_event" == *"KEY_"* && "$key_status" == "DOWN" ]]; then
|
||||
keycheck="$key_event"
|
||||
break
|
||||
fi
|
||||
done
|
||||
while true; do
|
||||
key_check=$(/system/bin/getevent -qlc 1)
|
||||
key_event=$(echo "$key_check" | awk '{ print $3 }' | grep 'KEY_')
|
||||
key_status=$(echo "$key_check" | awk '{ print $4 }')
|
||||
if [[ "$key_event" == *"KEY_"* && "$key_status" == "UP" ]]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
id=TA_utl
|
||||
name=Tricky Addon - Update Target List
|
||||
version=v2.6-beta.1
|
||||
version=v2.6-beta.2
|
||||
versionCode=250
|
||||
author=KOWX712
|
||||
description=A WebUI to conifgure tricky store target.txt
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
MODPATH=${0%/*}
|
||||
OUTPUT_APP="$MODPATH/common/applist"
|
||||
OUTPUT_SKIP="$MODPATH/common/skiplist"
|
||||
HIDE_DIR="/data/adb/modules/.TA_utl"
|
||||
TS="/data/adb/modules/tricky_store"
|
||||
SCRIPT_DIR="/data/adb/tricky_store"
|
||||
TSPA="/data/adb/modules/tsupport-advance"
|
||||
@@ -19,23 +18,48 @@ elif [ ! -d "$TSPA" ] && [ -f "/storage/emulated/0/stop-tspa-auto-target" ]; the
|
||||
rm -f "/storage/emulated/0/stop-tspa-auto-target"
|
||||
fi
|
||||
|
||||
if [ ! -f "$MODPATH/common/module.prop.orig" ]; then
|
||||
sed -i 's/^description=.*/description=Module is corrupted, please reinstall module./' "$MODPATH/module.prop"
|
||||
touch "$MODPATH/disable"
|
||||
exit 1
|
||||
if [ -d "$MODPATH/common/temp" ]; then
|
||||
if [ "$KSU" ] || [ "$APATCH" ]; then
|
||||
rm -f "$MODPATH/module.prop"
|
||||
fi
|
||||
if [ ! -d "$HIDE_DIR" ]; then
|
||||
mv "$MODPATH" "$HIDE_DIR"
|
||||
elif [[ "$MODPATH" != "$HIDE_DIR" ]]; then
|
||||
rm -rf "$MODPATH"
|
||||
exit 0
|
||||
fi
|
||||
MODPATH="$HIDE_DIR"
|
||||
fi
|
||||
|
||||
OUTPUT_APP="$MODPATH/common/applist"
|
||||
OUTPUT_SKIP="$MODPATH/common/skiplist"
|
||||
|
||||
if [ ! -d "$TS" ]; then
|
||||
sed -i 's/^description=.*/description=Tricky store is not installed/' "$MODPATH/module.prop"
|
||||
touch "$MODPATH/disable"
|
||||
if [ -d "$MODPATH/common/temp" ]; then
|
||||
mkdir -p "/data/adb/modules/TA_utl"
|
||||
cp -rf "$MODPATH/common/temp/*" "/data/adb/modules/TA_utl/"
|
||||
touch "/data/adb/modules/TA_utl/remove"
|
||||
exit 1
|
||||
else
|
||||
touch "$MODPATH/remove"
|
||||
exit 1
|
||||
fi
|
||||
elif [ -f "$TS/disable" ]; then
|
||||
sed -i 's/^description=.*/description=Tricky store is disabled/' "$MODPATH/module.prop"
|
||||
touch "$MODPATH/disable"
|
||||
elif [ ! -f "$SCRIPT_DIR/UpdateTargetList.sh" ]; then
|
||||
sed -i 's/^description=.*/description=Script missing, please install module again/' "$MODPATH/module.prop"
|
||||
touch "$MODPATH/disable"
|
||||
exit 1
|
||||
else
|
||||
cat "$MODPATH/common/module.prop.orig" > "$MODPATH/module.prop"
|
||||
if [ -f "$MODPATH/action.sh" ]; then
|
||||
if [ -f "$TS/action.sh" ]; then
|
||||
rm -f "$TS/action.sh"
|
||||
fi
|
||||
ln -s "$MODPATH/action.sh" "$TS/action.sh"
|
||||
else
|
||||
if [ -d "$TS/webroot" ]; then
|
||||
rm -rf "$TS/webroot"
|
||||
fi
|
||||
if [ -d "$MODPATH/common/temp" ]; then
|
||||
ln -s "$MODPATH/webroot" "$TS/webroot"
|
||||
fi
|
||||
fi
|
||||
until [ "$(getprop sys.boot_completed)" = "1" ]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
MODPATH=${0%/*}
|
||||
TS="/data/adb/modules/tricky_store"
|
||||
SCRIPT_DIR="/data/adb/tricky_store"
|
||||
|
||||
# Enable back TSupport-A auto update
|
||||
@@ -10,4 +11,11 @@ fi
|
||||
rm -rf "$SCRIPT_DIR/target_list_config"
|
||||
rm -f "$SCRIPT_DIR/UpdateTargetList.sh"
|
||||
rm -f "/data/adb/boot_hash"
|
||||
if [ -d "$TS" ]; then
|
||||
if [ -f "$TS/action.sh" ]; then
|
||||
rm -f "$TS/action.sh"
|
||||
else
|
||||
rm -rf "$TS/webroot"
|
||||
fi
|
||||
fi
|
||||
xxd -r -p "$MODPATH/common/.default" | base64 -d > "$SCRIPT_DIR/keybox.xml"
|
||||
|
||||
@@ -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,26 +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-uninstall">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span data-i18n="uninstall_webui"></span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -232,7 +232,7 @@ async function fetchAppList() {
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch or render app list with names:", error);
|
||||
}
|
||||
floatingBtn.style.transform = "translateY(-100px)";
|
||||
floatingBtn.style.transform = "translateY(-120px)";
|
||||
}
|
||||
|
||||
// Function to refresh app list
|
||||
@@ -245,13 +245,15 @@ async function refreshAppList() {
|
||||
clearBtn.style.display = "none";
|
||||
appListContainer.innerHTML = '';
|
||||
loadingIndicator.style.display = 'flex';
|
||||
document.querySelector('.uninstall-container').classList.add('hidden-uninstall');
|
||||
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-uninstall');
|
||||
isRefreshing = false;
|
||||
}
|
||||
|
||||
@@ -275,16 +277,26 @@ function deselectAllApps() {
|
||||
|
||||
// Function to run the extra script
|
||||
async function runExtraScript() {
|
||||
try {
|
||||
const scriptPath = `${basePath}get_extra.sh`;
|
||||
await execCommand(scriptPath);
|
||||
console.log("Extra script executed successfully.");
|
||||
noConnection.style.display = "none";
|
||||
} catch (error) {
|
||||
console.error("Failed to execute Extra script:", error);
|
||||
showPrompt("no_internet", false);
|
||||
noConnection.style.display = "flex";
|
||||
try {
|
||||
const scriptPath = `${basePath}get_extra.sh`;
|
||||
const output = await execCommand(scriptPath);
|
||||
console.log("Extra script executed successfully.");
|
||||
noConnection.style.display = "none";
|
||||
if (output.includes("update")) {
|
||||
console.log("Update detected from extra script.");
|
||||
showPrompt("new_update");
|
||||
await execCommand(`
|
||||
su -c "mkdir -p '/data/adb/modules/TA_utl' &&
|
||||
cp -rf '${basePath}temp/'* '/data/adb/modules/TA_utl/'"
|
||||
`);
|
||||
} else {
|
||||
console.log("No update detected from extra script.");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to execute Extra script:", error);
|
||||
showPrompt("no_internet", false);
|
||||
noConnection.style.display = "flex";
|
||||
}
|
||||
}
|
||||
|
||||
// Function to read the exclude list and uncheck corresponding apps
|
||||
@@ -649,6 +661,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
await fetchAppList();
|
||||
checkMagisk();
|
||||
loadingIndicator.style.display = "none";
|
||||
document.querySelector('.uninstall-container').classList.remove('hidden-uninstall');
|
||||
runExtraScript();
|
||||
});
|
||||
|
||||
@@ -675,17 +688,17 @@ 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)';
|
||||
searchMenuContainer.style.transform = 'translateY(0)';
|
||||
floatingBtn.style.transform = 'translateY(-100px)';
|
||||
floatingBtn.style.transform = 'translateY(-120px)';
|
||||
}
|
||||
if (languageMenu.classList.contains("show")) {
|
||||
languageMenu.classList.remove("show");
|
||||
@@ -720,3 +733,25 @@ helpOverlay.addEventListener("click", (event) => {
|
||||
hideHelpOverlay();
|
||||
}
|
||||
});
|
||||
|
||||
// Uninstall WebUI
|
||||
document.querySelector(".uninstall-container").addEventListener("click", async () => {
|
||||
try {
|
||||
await execCommand(`
|
||||
su -c "
|
||||
if [ -d '${basePath}temp/' ]; then
|
||||
mkdir -p '/data/adb/modules/TA_utl' &&
|
||||
cp -rf '${basePath}temp/'* '/data/adb/modules/TA_utl/' &&
|
||||
touch '/data/adb/modules/TA_utl/remove'
|
||||
else
|
||||
touch '/data/adb/modules/TA_utl/remove'
|
||||
fi
|
||||
"
|
||||
`);
|
||||
showPrompt("uninstall_prompt");
|
||||
} catch (error) {
|
||||
console.error("Failed to execute uninstall command:", error);
|
||||
console.log("Error message:", error.message);
|
||||
showPrompt("uninstall_failed", false);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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,8 @@
|
||||
"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"
|
||||
"save_error": "Failed to save config",
|
||||
"uninstall_prompt": "WebUI will be removed after reboot",
|
||||
"uninstall_failed": "Failed to uninstall WebUI",
|
||||
"new_update": "A new update is available!"
|
||||
}
|
||||
@@ -6,29 +6,31 @@
|
||||
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`.
|
||||
2. Make a copy of `/module/webroot/locales/A-template.json`
|
||||
3. Rename it to `language_code-COUNTRY_CODE.json`, e.g., `en-US.json`.
|
||||
4. Translate the string value inside.
|
||||
5. 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>
|
||||
</div>
|
||||
```
|
||||
5. Add language_code-COUNTRY_CODE in `/module/webroot/index.js` under `function detectUserLanguage()`
|
||||
6. Add language_code-COUNTRY_CODE in `/module/webroot/index.js` under `function detectUserLanguage()`
|
||||
Format:
|
||||
```js
|
||||
function detectUserLanguage() {
|
||||
const availableLanguages = ['en-US', 'ru-RU', 'tl-PH', 'zh-CN', 'zh-TW'];
|
||||
}
|
||||
```
|
||||
6. Create a Pull Request
|
||||
7. Create a Pull Request
|
||||
@@ -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,8 @@
|
||||
"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"
|
||||
"save_error": "Failed to save config",
|
||||
"uninstall_prompt": "WebUI will be removed after reboot",
|
||||
"uninstall_failed": "Failed to uninstall WebUI",
|
||||
"new_update": "A new update is available!"
|
||||
}
|
||||
@@ -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,8 @@
|
||||
"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",
|
||||
"new_update": "Доступно новое обновление!"
|
||||
}
|
||||
@@ -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,8 @@
|
||||
"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",
|
||||
"new_update": "May bagong update na available!"
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
"boot_hash_save_button": "保存",
|
||||
"loading": "加载中...",
|
||||
"boot_hash_input_placeholder": "在此粘贴您的哈希值",
|
||||
"uninstall_webui": "卸载 WebUI",
|
||||
|
||||
"refresh": "刷新",
|
||||
"select_all": "全选",
|
||||
@@ -32,6 +33,7 @@
|
||||
"by": "作者:",
|
||||
"telegram_channel": "TG频道",
|
||||
"github": "GitHub",
|
||||
"disclaimer": "此 WebUI 不是 Tricky Store 的一部分,遇到任何问题请勿向 Tricky Store 作者反馈。",
|
||||
"acknowledgment": "特别鸣谢",
|
||||
|
||||
"no_internet": "请检查您的网络连接",
|
||||
@@ -43,5 +45,8 @@
|
||||
"boot_hash_set_error": "哈希值重置失败",
|
||||
"saved_and_updated": "成功保存配置和更新目标列表",
|
||||
"saved_not_updated": "配置已保存,但更新目标列表失败",
|
||||
"save_error": "保存配置失败"
|
||||
"save_error": "保存配置失败",
|
||||
"uninstall_prompt": "WebUI 将在重启后被移除",
|
||||
"uninstall_failed": "卸载 WebUI 失败",
|
||||
"new_update": "发现新的版本!"
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
"boot_hash_save_button": "保存",
|
||||
"loading": "加載中...",
|
||||
"boot_hash_input_placeholder": "在此粘貼您的哈希值",
|
||||
"uninstall_webui": "卸載 WebUI",
|
||||
|
||||
"refresh": "刷新",
|
||||
"select_all": "全選",
|
||||
@@ -32,6 +33,7 @@
|
||||
"by": "作者:",
|
||||
"telegram_channel": "TG頻道",
|
||||
"github": "GitHub",
|
||||
"disclaimer": "此 WebUI 不是 Tricky Store 的一部分,遇到任何問題請勿向 Tricky Store 作者反饋。",
|
||||
"acknowledgment": "特別鳴謝",
|
||||
|
||||
"no_internet": "請檢查您的網路連接",
|
||||
@@ -43,5 +45,8 @@
|
||||
"boot_hash_set_error": "哈希值重置失敗",
|
||||
"saved_and_updated": "成功保存配置和更新目標列表",
|
||||
"saved_not_updated": "配置已保存,但更新目標列表失敗",
|
||||
"save_error": "保存配置失敗"
|
||||
"save_error": "保存配置失敗",
|
||||
"uninstall_prompt": "WebUI 將在重啟後被移除",
|
||||
"uninstall_failed": "卸載 WebUI 失敗",
|
||||
"new_update": "發現新的版本!"
|
||||
}
|
||||
@@ -13,41 +13,42 @@ body {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
height: 40px;
|
||||
width: calc(100% - 17px);
|
||||
width: 100%;
|
||||
background-color: #F5F5F5;
|
||||
transition: transform 0.3s ease;
|
||||
z-index: 1100;
|
||||
}
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
.language-dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.language-button {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 24px;
|
||||
font-size: 23px;
|
||||
color: #333;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.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;
|
||||
@@ -537,13 +543,14 @@ body {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: fixed;
|
||||
bottom: -50px;
|
||||
bottom: -70px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.uninstall-container.hidden-uninstall {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
||||
Reference in New Issue
Block a user