diff --git a/.oxfmtrc.json b/.oxfmtrc.json
index 2bbbe13..ff79f6c 100644
--- a/.oxfmtrc.json
+++ b/.oxfmtrc.json
@@ -3,5 +3,6 @@
"printWidth": 100,
"semi": false,
"singleQuote": true,
- "tabWidth": 2
+ "tabWidth": 2,
+ "trailingComma": "all",
}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 6a6fae2..f146a42 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,9 +1,11 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
- "source.fixAll.oxc": "always"
+ "source.fixAll.oxc": "always",
},
"[shellscript]": {
- "editor.defaultFormatter": "mads-hartmann.bash-ide-vscode"
- }
+ "editor.defaultFormatter": "mads-hartmann.bash-ide-vscode",
+ },
+ "oxc.fmt.configPath": ".oxfmtrc.json",
+ "editor.defaultFormatter": "oxc.oxc-vscode",
}
diff --git a/package.json b/package.json
index 312bad2..fd09920 100644
--- a/package.json
+++ b/package.json
@@ -7,8 +7,8 @@
"dev": "cd webui && vite",
"build": "cd webui && vite build && cd .. && node build-module.js",
"preview": "cd webui && vite preview",
- "lint": "oxlint",
- "lint:fix": "oxlint --fix",
+ "lint": "oxlint webui/",
+ "lint:fix": "oxlint --fix webui/",
"fmt": "oxfmt webui/",
"fmt:check": "oxfmt webui/ --check"
},
diff --git a/webroot/index.html b/webroot/index.html
index 9055866..32cebda 100644
--- a/webroot/index.html
+++ b/webroot/index.html
@@ -1,17 +1,15 @@
-
+
+
+
+
+ LuminPro
+
+
+
+
-
-
-
- LuminPro
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/webui/src/apps.js b/webui/src/apps.js
index c085ec3..5903129 100644
--- a/webui/src/apps.js
+++ b/webui/src/apps.js
@@ -2,7 +2,7 @@
import { listPackages, getPackagesInfo } from 'kernelsu'
import { createIcons, Eye, EyeOff } from 'lucide'
import PinyinMatch from 'pinyin-match'
-import { CONFIG_DIR, showToast, runCmd, readConfig, updateConfig } from './utils.js'
+import { showToast, runCmd, readConfig, updateConfig } from './utils.js'
let showingSystemApps = true
let savedBlacklist = new Set()
@@ -142,10 +142,30 @@ export async function loadApps() {
if (infoList.length === 0) {
infoList.push(
- { packageName: 'com.example.app1', appLabel: '示例 1', isSystem: false, uid: 10123 },
- { packageName: 'com.example.app2', appLabel: '示例 2', isSystem: false, uid: 10124 },
- { packageName: 'com.example.sys1', appLabel: '系统示例 1', isSystem: true, uid: 1000 },
- { packageName: 'com.example.sys2', appLabel: '系统示例 2', isSystem: true, uid: 1001 },
+ {
+ packageName: 'com.example.app1',
+ appLabel: '示例 1',
+ isSystem: false,
+ uid: 10123,
+ },
+ {
+ packageName: 'com.example.app2',
+ appLabel: '示例 2',
+ isSystem: false,
+ uid: 10124,
+ },
+ {
+ packageName: 'com.example.sys1',
+ appLabel: '系统示例 1',
+ isSystem: true,
+ uid: 1000,
+ },
+ {
+ packageName: 'com.example.sys2',
+ appLabel: '系统示例 2',
+ isSystem: true,
+ uid: 1001,
+ },
)
if (!showingSystemApps) {
infoList = infoList.filter((app) => !app.isSystem)
diff --git a/webui/src/composables/useApps.js b/webui/src/composables/useApps.js
index 8bc3c08..fa4a6b5 100644
--- a/webui/src/composables/useApps.js
+++ b/webui/src/composables/useApps.js
@@ -1,7 +1,7 @@
import { ref, reactive } from 'vue'
import { listPackages, getPackagesInfo } from 'kernelsu'
import PinyinMatch from 'pinyin-match'
-import { runCmd, readConfig, updateConfig } from '../utils.js'
+import { readConfig, updateConfig } from '../utils.js'
export function useApps() {
const apps = ref([])
diff --git a/webui/src/composables/useConfig.js b/webui/src/composables/useConfig.js
index 8308062..a4f3288 100644
--- a/webui/src/composables/useConfig.js
+++ b/webui/src/composables/useConfig.js
@@ -4,7 +4,6 @@ import {
readConfig,
writeConfig,
updateConfig,
- CONFIG_FILE,
BACKUP_CONFIG_FILE,
PID_FILE,
FLAG_FILE,
diff --git a/webui/src/views/AppsView.vue b/webui/src/views/AppsView.vue
index 8988947..9662a83 100644
--- a/webui/src/views/AppsView.vue
+++ b/webui/src/views/AppsView.vue
@@ -75,6 +75,27 @@ function doAddActivity() {
showToast(`已添加: ${val}`)
}
+function menuToggleSystemApps() {
+ toggleSystemApps()
+ appsMenuOpen.value = false
+}
+function menuSmartSelect() {
+ smartSelect()
+ appsMenuOpen.value = false
+}
+function menuSelectAll() {
+ selectAll()
+ appsMenuOpen.value = false
+}
+function menuSelectNone() {
+ selectNone()
+ appsMenuOpen.value = false
+}
+function menuInvertSelection() {
+ invertSelection()
+ appsMenuOpen.value = false
+}
+
// 手动添加包名
async function handleManualAdd() {
appsMenuOpen.value = false
@@ -155,6 +176,11 @@ function confirmPicker() {
showToast(`已添加: ${pickerResult.value}`)
closePicker()
}
+function retryPicker() {
+ pickerStep.value = 2
+ pickerPolling.value = false
+ stopPolling()
+}
@@ -185,53 +211,23 @@ function confirmPicker() {