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
Simplify logic, add Material Design ripple effect
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { basePath, execCommand, showPrompt, noConnection } from './main.js';
|
||||
import { updateCard } from './applist.js';
|
||||
|
||||
// Function to run the update check
|
||||
export async function updateCheck() {
|
||||
try {
|
||||
const output = await execCommand(`sh ${basePath}common/get_extra.sh --update`);
|
||||
console.log("update script executed successfully.");
|
||||
noConnection.style.display = "none";
|
||||
if (output.includes("update")) {
|
||||
console.log("Update detected from extra script.");
|
||||
showPrompt("prompt.new_update");
|
||||
updateCard.style.display = "flex";
|
||||
} else {
|
||||
console.log("No update detected from extra script.");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to execute update script:", error);
|
||||
showPrompt("prompt.no_internet", false);
|
||||
noConnection.style.display = "flex";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user