From ce0d638ebf7e5292c86c8489b77518a52d9bd628 Mon Sep 17 00:00:00 2001 From: Sthkm3 Date: Mon, 9 Mar 2026 02:22:58 +0800 Subject: [PATCH] v1.1.0-1 --- src/main.js | 55 ++++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/src/main.js b/src/main.js index 9ea7102..f36add9 100644 --- a/src/main.js +++ b/src/main.js @@ -23,6 +23,9 @@ importClass(android.provider.Settings); // 基本設定 const STORAGE = storages.create("AutoCatAndSoupConfig"); +// 語言包 +const T = require("./i18n.js"); + // 設定資料 let config = { sellProduct: STORAGE.get("sellProduct", false), @@ -43,7 +46,7 @@ let config = { // 浮窗權限檢查 function checkFloatyPermission() { if (!Settings.canDrawOverlays(context)) { - toast("請開啟懸浮窗權限"); + toast("perm_floaty"); var intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION); intent.setData(Uri.parse("package:" + context.getPackageName())); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); @@ -57,7 +60,7 @@ function checkFloatyPermission() { // 無障礙檢查 function checkAccessibility() { if (!auto.service) { - toast("請啟用無障礙服務"); + toast("perm_accessibility"); app.startActivity({ action: Settings.ACTION_ACCESSIBILITY_SETTINGS }); @@ -69,42 +72,42 @@ function checkAccessibility() { // UI ui.layout( - + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - + + + + -