diff --git a/code/th_01_base.js b/code/th_01_base.js index 14b17db..8d67eac 100644 --- a/code/th_01_base.js +++ b/code/th_01_base.js @@ -100,7 +100,9 @@ var ConfigValidator = { LONG_PRESS_TRIGGERED_MOVE_SLOP_DP: { type: "int", min: 8, max: 80, default: 28 }, LONG_PRESS_VIBRATE_MS: { type: "int", min: 10, max: 100, default: 40 }, CLICK_SLOP_DP: { type: "int", min: 2, max: 20, default: 6 }, - TOOLAPP_BACK_EDGE_WIDTH_DP: { type: "int", min: 1, max: 120, default: 22 }, + TOOLAPP_BACK_EDGE_WIDTH_DP: { type: "int", min: 1, max: 120, default: 48 }, + ENABLE_TOOLAPP_INNER_BACK_STRIPS: { type: "bool", default: true }, + ENABLE_TOOLAPP_SCREEN_BACK_STRIPS: { type: "bool", default: false }, TOOLAPP_BACK_COMMIT_DISTANCE_DP: { type: "int", min: 1, max: 480, default: 72 }, TOOLAPP_BACK_PROGRESS_DISTANCE_DP: { type: "int", min: 1, max: 720, default: 180 }, @@ -734,7 +736,9 @@ var ConfigManager = { LONG_PRESS_MS: 520, LONG_PRESS_TRIGGERED_MOVE_SLOP_DP: 28, CLICK_SLOP_DP: 6, - TOOLAPP_BACK_EDGE_WIDTH_DP: 22, + TOOLAPP_BACK_EDGE_WIDTH_DP: 48, + ENABLE_TOOLAPP_INNER_BACK_STRIPS: true, + ENABLE_TOOLAPP_SCREEN_BACK_STRIPS: false, TOOLAPP_BACK_COMMIT_DISTANCE_DP: 72, TOOLAPP_BACK_PROGRESS_DISTANCE_DP: 180, ENABLE_BOUNCE: true, @@ -847,6 +851,8 @@ var ConfigManager = { { type: "section", name: "触摸与手势" }, { key: "CLICK_SLOP_DP", name: "点击位移阈值(dp)", type: "int", min: 1, max: 40, step: 1 }, { key: "TOOLAPP_BACK_EDGE_WIDTH_DP", name: "页面内返回边界宽度", type: "int", min: 1, max: 120, step: 1 }, + { key: "ENABLE_TOOLAPP_INNER_BACK_STRIPS", name: "启用页面内左右滑动返回", type: "bool" }, + { key: "ENABLE_TOOLAPP_SCREEN_BACK_STRIPS", name: "启用屏幕边缘返回热区(排查用)", type: "bool" }, { key: "TOOLAPP_BACK_COMMIT_DISTANCE_DP", name: "设置页返回触发距离", type: "int", min: 1, max: 480, step: 1 }, { key: "TOOLAPP_BACK_PROGRESS_DISTANCE_DP", name: "设置页返回动画距离", type: "int", min: 1, max: 720, step: 1 }, { key: "ENABLE_LONG_PRESS", name: "启用长按", type: "bool" }, @@ -886,7 +892,7 @@ var ConfigManager = { var needReset = false; if (s) { var sStr = JSON.stringify(s); - if (sStr.indexOf("ENABLE_SNAP_TO_EDGE") < 0 || sStr.indexOf("ENABLE_ANIMATIONS") < 0 || sStr.indexOf("BALL_IDLE_ALPHA") < 0 || sStr.indexOf("PANEL_POS_GRAVITY") < 0 || sStr.indexOf("single_choice") < 0 || sStr.indexOf("ball_shortx_icon") < 0 || sStr.indexOf("ball_color") < 0 || sStr.indexOf("SETTINGS_THEME") < 0 || sStr.indexOf("BALL_BG_COLOR_HEX") < 0 || sStr.indexOf("BALL_ICON_SIZE_DP") < 0 || sStr.indexOf("TOOLAPP_BACK_EDGE_WIDTH_DP") < 0 || sStr.indexOf("TOOLAPP_BACK_COMMIT_DISTANCE_DP") < 0 || sStr.indexOf("TOOLAPP_BACK_PROGRESS_DISTANCE_DP") < 0 || sStr.indexOf("LONG_PRESS_TRIGGERED_MOVE_SLOP_DP") < 0) { + if (sStr.indexOf("ENABLE_SNAP_TO_EDGE") < 0 || sStr.indexOf("ENABLE_ANIMATIONS") < 0 || sStr.indexOf("BALL_IDLE_ALPHA") < 0 || sStr.indexOf("PANEL_POS_GRAVITY") < 0 || sStr.indexOf("single_choice") < 0 || sStr.indexOf("ball_shortx_icon") < 0 || sStr.indexOf("ball_color") < 0 || sStr.indexOf("SETTINGS_THEME") < 0 || sStr.indexOf("BALL_BG_COLOR_HEX") < 0 || sStr.indexOf("BALL_ICON_SIZE_DP") < 0 || sStr.indexOf("TOOLAPP_BACK_EDGE_WIDTH_DP") < 0 || sStr.indexOf("ENABLE_TOOLAPP_INNER_BACK_STRIPS") < 0 || sStr.indexOf("ENABLE_TOOLAPP_SCREEN_BACK_STRIPS") < 0 || sStr.indexOf("TOOLAPP_BACK_COMMIT_DISTANCE_DP") < 0 || sStr.indexOf("TOOLAPP_BACK_PROGRESS_DISTANCE_DP") < 0 || sStr.indexOf("LONG_PRESS_TRIGGERED_MOVE_SLOP_DP") < 0) { needReset = true; } @@ -918,6 +924,8 @@ var ConfigManager = { schemaItemDiffers("BALL_ICON_SIZE_DP", ["name", "type", "min", "max", "step"]) || schemaItemDiffers("BALL_BG_COLOR_HEX", ["name", "type"]) || schemaItemDiffers("TOOLAPP_BACK_EDGE_WIDTH_DP", ["name", "type", "min", "max", "step"]) || + schemaItemDiffers("ENABLE_TOOLAPP_INNER_BACK_STRIPS", ["name", "type"]) || + schemaItemDiffers("ENABLE_TOOLAPP_SCREEN_BACK_STRIPS", ["name", "type"]) || schemaItemDiffers("TOOLAPP_BACK_COMMIT_DISTANCE_DP", ["name", "type", "min", "max", "step"]) || schemaItemDiffers("TOOLAPP_BACK_PROGRESS_DISTANCE_DP", ["name", "type", "min", "max", "step"]) || schemaItemDiffers("LONG_PRESS_TRIGGERED_MOVE_SLOP_DP", ["name", "type", "min", "max", "step"])) { diff --git a/code/th_05_persistence.js b/code/th_05_persistence.js index 7357888..2bf0fb9 100644 --- a/code/th_05_persistence.js +++ b/code/th_05_persistence.js @@ -319,13 +319,31 @@ FloatBallAppWM.prototype.applyImmediateEffectsForKey = function(k) { } if (k === "BALL_SIZE_DP" || k === "BALL_PNG_MODE" || k === "BALL_ICON_TYPE" || k === "BALL_ICON_FILE_PATH" || k === "BALL_ICON_RES_ID" || k === "BALL_ICON_RES_NAME" || k === "BALL_ICON_SIZE_DP" || k === "BALL_ICON_TINT_HEX" || k === "BALL_BG_COLOR_HEX") { this.rebuildBallForNewSize(); return; } - if (k === "TOOLAPP_BACK_EDGE_WIDTH_DP") { + if (k === "TOOLAPP_BACK_EDGE_WIDTH_DP" || k === "ENABLE_TOOLAPP_INNER_BACK_STRIPS") { try { - if (this.state.toolAppActive && this.updateToolAppInnerBackEdgeWidth) { - this.updateToolAppInnerBackEdgeWidth(); + if (this.state.toolAppActive) { + if (k === "TOOLAPP_BACK_EDGE_WIDTH_DP" && this.updateToolAppInnerBackEdgeWidth) { + this.updateToolAppInnerBackEdgeWidth(); + } else if (this.showToolApp) { + this.showToolApp(this.state.toolAppRoute || "settings", false); + } } } catch(eBackStrip) { - safeLog(this.L, "w", "apply back edge width fail: " + String(eBackStrip)); + safeLog(this.L, "w", "apply inner back strip fail: " + String(eBackStrip)); + } + return; + } + + if (k === "ENABLE_TOOLAPP_SCREEN_BACK_STRIPS") { + try { + if (this.state.toolAppActive) { + var enableScreenBackStrip = false; + try { enableScreenBackStrip = parseBooleanLike(this.config.ENABLE_TOOLAPP_SCREEN_BACK_STRIPS); } catch(eCfg2) { enableScreenBackStrip = false; } + if (enableScreenBackStrip && this.hasToolAppBackTarget && this.hasToolAppBackTarget() && this.showToolAppScreenBackStrips) this.showToolAppScreenBackStrips(); + else if (this.hideToolAppScreenBackStrips) this.hideToolAppScreenBackStrips(); + } + } catch(eScreenBackStrip) { + safeLog(this.L, "w", "apply screen back strip fail: " + String(eScreenBackStrip)); } return; } diff --git a/manifest.json b/manifest.json index 7fa1de2..89e9698 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "alg": "SHA256withRSA", "files": { "th_01_base.js": { - "sha256": "6b7a51c97f76b797b176c8fcf712dbafb8d33ebab448d0c7574f26568dcd14df", - "size": 56392 + "sha256": "d3f390f25d56473584a85f10e10e7df49320674c757fda0b2e9036403e627887", + "size": 57159 }, "th_02_core.js": { "sha256": "3c5c498d200e961d48fc9ca3f885475e770ecb32b83ec6a89d23df3f88aed1c9", @@ -18,8 +18,8 @@ "size": 42568 }, "th_05_persistence.js": { - "sha256": "8cc52d3dacc8ac3c1b5aecf6fc399a2fe516402955799eddbd07dc9195c10d40", - "size": 15192 + "sha256": "ec8ee29c7e4fb7521cf4d1928f41c1495a5314f86dc398a5df9206f879700e45", + "size": 16147 }, "th_06_icon_parser.js": { "sha256": "25b95a5df634a7ee359f3ab798e4d3154a71c24016f7b4bf8a658096644b2484", @@ -68,5 +68,5 @@ }, "keyId": "toolhub-targets-2026-rsa3072", "schema": 2, - "version": 20260521212917 + "version": 20260521213941 } diff --git a/manifest.sig b/manifest.sig index 50f7ec1..9da9f76 100644 --- a/manifest.sig +++ b/manifest.sig @@ -1 +1 @@ -J+ucJ2iSqsLOHjiSuiZWkgPHIxPW6L69huPNPmVDNKuWqgBacB4NV4TcroZNqg5vbl/4BWCdOjyfPJkQGH/qbhDUMcyRxgPxNC1WgZ5bIbwnjWuiS+g/70OFjWsHKiMzlTZoa+djEOZeLt4HHCHiLe/KNPDFSPEQvJaUHJY6gltW7tqHRtI3IrU5pyPvMmgDGUF1o/HOScUWPuNnGUgJC75SBFj7rplfBOyOcMzMK5U/bOEeSRBcjJmEH1Rm6bNIoPPU049Ugn90rGUYcZTiG8oLdDn5Jc7iOvyPrtEz80IjTiurO5VVTD2O21GUnjPF7Y70LfzYJ/DOapSGGZYGkJcrmrMsarKakbcFy+/wv0j+yEF9MCgfWWAtIX4TEV25O0/UV2J8Ur2uf7yHhTIuZ23qtyNFW+0psEgPjaqCg101mbiZxUzcdvuYYfqQheqp9nMCwUWDH6zqZS4UKWrb+b+RBDlEauIByIAiiWer19/ViDbvu94bI+ADh/iB5JPi +O+tmvZac6NX45Eauc3MsOM3bRjUtRcNh27na7k74S/LPjbT9fZn9vwZQQR7x+DUoSfGfcoN34+jca4HmqvpdWxgQewIiRu0MaGrUxxqkTHCmzto4xX+c9m0DvbY7PBFTXzWInEyKjomoct9DEyXLWQHR+Vq4qWV2Rbh8icDzALLMbqX0VFUeiddPOy36AeC4T5TuLL0RPkYjkWOGdh72SadxgPynoXtD9NyoLZZixUza8nABBFWlKVRbFQ61FVrBtIo1sIdTJqExR22GumXnlFMdZFUaae3g8iGhFbnn62QFx69Dsn8NAJI9/Xu6ER7uryhTL653ZsmFAFoEq7kFAyTQJOv2DvMEMim9mn5v1MaPJhy1KwWhzrt0X2plWoX5Rbq/yJZZkGEhSsgdXowyE3auYe3mnsBpwuLN4XoNaAQNYB7WuhIQb2SGoGa/aP3Q3bojfzdY848v7T6AJedCqcwZQlcLnWTza/Nv6CHCvplk++XlZhzzX5IbXONzvtND