From 232cac0fbcd9862eb44350d8265de59702d7e229 Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Thu, 22 Jan 2026 20:30:18 +0800 Subject: [PATCH 1/3] webui: add flash to device switch #31 --- webui/index.html | 7 +++++++ webui/page/patch.js | 4 +++- webui/public/locales/strings/en.xml | 1 + webui/public/locales/strings/zh-CN.xml | 1 + webui/styles.css | 19 +++++++++++++++++++ 5 files changed, 31 insertions(+), 1 deletion(-) diff --git a/webui/index.html b/webui/index.html index 9803baf..6dd1dcd 100644 --- a/webui/index.html +++ b/webui/index.html @@ -190,6 +190,13 @@
Kernel
+
+ +
Embed KPM diff --git a/webui/page/patch.js b/webui/page/patch.js index e7540e0..1dc469a 100644 --- a/webui/page/patch.js +++ b/webui/page/patch.js @@ -333,6 +333,8 @@ async function embedKPM() { function patch(type) { const terminal = document.querySelector('#patch-terminal'); const pageContent = terminal.closest('.page-content'); + const flashToDevice = document.getElementById('flash-to-device'); + const onOutput = (data) => { terminal.innerHTML += `
${data}
`; pageContent.scrollTo({ top: pageContent.scrollHeight, behavior: 'smooth' }); @@ -348,7 +350,7 @@ function patch(type) { args.push( `${modDir}/patch/boot_patch.sh`, bootDev, - 'true' + flashToDevice.selected ? 'true' : 'false' ); // New kpm diff --git a/webui/public/locales/strings/en.xml b/webui/public/locales/strings/en.xml index 2ce24df..e55c811 100644 --- a/webui/public/locales/strings/en.xml +++ b/webui/public/locales/strings/en.xml @@ -35,6 +35,7 @@ Show system app System Default Trigger Event + Flash to Device Not installed Working 😋 diff --git a/webui/public/locales/strings/zh-CN.xml b/webui/public/locales/strings/zh-CN.xml index 66b37da..b2eb434 100644 --- a/webui/public/locales/strings/zh-CN.xml +++ b/webui/public/locales/strings/zh-CN.xml @@ -35,6 +35,7 @@ 显示系统应用 系统默认 触发事件 + 直接安装 未安装 工作中 😋 diff --git a/webui/styles.css b/webui/styles.css index 6ef550b..46a700e 100644 --- a/webui/styles.css +++ b/webui/styles.css @@ -221,6 +221,25 @@ body { transition: all 0.2s ease; } +.switch-card { + width: 100%; + border-radius: 20px; + background-color: var(--md-sys-color-tonal-surface); + word-wrap: break-word; + position: relative; + overflow: hidden; +} + +.switch-card label { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + padding: 20px; + box-sizing: border-box; + font-size: 1.1em; +} + .search-hidden { display: none !important; } From ef432d3a6a32c5ccafc2c5fc97078c1b7273bc8d Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Thu, 22 Jan 2026 20:55:11 +0800 Subject: [PATCH 2/3] styling --- webui/index.html | 6 +++--- webui/styles.css | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/webui/index.html b/webui/index.html index 6dd1dcd..6ade31c 100644 --- a/webui/index.html +++ b/webui/index.html @@ -190,14 +190,14 @@
Kernel
-
+
-
+
Embed KPM Start diff --git a/webui/styles.css b/webui/styles.css index 46a700e..d6dfbd4 100644 --- a/webui/styles.css +++ b/webui/styles.css @@ -226,8 +226,6 @@ body { border-radius: 20px; background-color: var(--md-sys-color-tonal-surface); word-wrap: break-word; - position: relative; - overflow: hidden; } .switch-card label { @@ -238,6 +236,8 @@ body { padding: 20px; box-sizing: border-box; font-size: 1.1em; + position: relative; + overflow: hidden; } .search-hidden { From b9ee5b74c2abb1553ec6030aba2b001b8745037e Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Thu, 22 Jan 2026 20:56:57 +0800 Subject: [PATCH 3/3] styling2 --- webui/index.html | 2 +- webui/styles.css | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/webui/index.html b/webui/index.html index 6ade31c..1bc7cad 100644 --- a/webui/index.html +++ b/webui/index.html @@ -194,8 +194,8 @@ +
diff --git a/webui/styles.css b/webui/styles.css index d6dfbd4..186d841 100644 --- a/webui/styles.css +++ b/webui/styles.css @@ -226,6 +226,7 @@ body { border-radius: 20px; background-color: var(--md-sys-color-tonal-surface); word-wrap: break-word; + position: relative; } .switch-card label { @@ -236,8 +237,6 @@ body { padding: 20px; box-sizing: border-box; font-size: 1.1em; - position: relative; - overflow: hidden; } .search-hidden {