mirror of
https://github.com/YuleBest/LuminPro.git
synced 2026-12-04 00:54:42 +08:00
perf(config): 配置继承优化
This commit is contained in:
1 parent
4f3d25ac5a
commit
0eef2358f0
19 files changed
+126
-678
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -195,7 +195,7 @@
|
||||
background-color: var(--md-sys-color-surface-container);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-family: 'Google Sans Code', monospace;
|
||||
font-family: 'Geist Mono', monospace;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -157,7 +157,7 @@
|
||||
.app-pkg {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--md-sys-color-on-surface-variant);
|
||||
font-family: 'Google Sans Code', monospace;
|
||||
font-family: 'Geist Mono', monospace;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
@@ -206,7 +206,7 @@
|
||||
border: 1px solid var(--md-sys-color-outline-variant);
|
||||
padding: 0 4px;
|
||||
border-radius: 4px;
|
||||
font-family: 'Google Sans Code', monospace;
|
||||
font-family: 'Geist Mono', monospace;
|
||||
margin-left: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -275,7 +275,7 @@
|
||||
|
||||
.activity-entry-path {
|
||||
flex: 1;
|
||||
font-family: 'Google Sans Code', 'Roboto Mono', monospace;
|
||||
font-family: 'Geist Mono', 'Roboto Mono', monospace;
|
||||
font-size: 0.75rem;
|
||||
color: var(--md-sys-color-on-surface-variant);
|
||||
word-break: break-all;
|
||||
@@ -359,7 +359,7 @@
|
||||
border: 1px solid var(--md-sys-color-outline-variant);
|
||||
border-radius: var(--border-radius-s);
|
||||
padding: 7px 10px;
|
||||
font-family: 'Google Sans Code', 'Roboto Mono', monospace;
|
||||
font-family: 'Geist Mono', 'Roboto Mono', monospace;
|
||||
font-size: 0.8125rem;
|
||||
color: var(--md-sys-color-on-surface);
|
||||
outline: none;
|
||||
@@ -513,7 +513,7 @@
|
||||
border: 1.5px solid var(--md-sys-color-primary);
|
||||
border-radius: var(--border-radius-m);
|
||||
padding: 14px 18px;
|
||||
font-family: 'Google Sans Code', 'Roboto Mono', monospace;
|
||||
font-family: 'Geist Mono', 'Roboto Mono', monospace;
|
||||
font-size: 0.875rem;
|
||||
color: var(--md-sys-color-on-surface);
|
||||
word-break: break-all;
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
border-radius: var(--border-radius-m);
|
||||
resize: vertical;
|
||||
padding: 10px 14px;
|
||||
font-family: 'Google Sans Code', system-ui, monospace;
|
||||
font-family: 'Geist Mono', system-ui, monospace;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.4;
|
||||
transition: all 0.2s ease;
|
||||
@@ -203,7 +203,7 @@
|
||||
border: none;
|
||||
font-size: 0.875rem;
|
||||
text-align: center;
|
||||
font-family: 'Google Sans Code', monospace;
|
||||
font-family: 'Geist Mono', monospace;
|
||||
outline: none;
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ref, reactive } from 'vue';
|
||||
import { listPackages, getPackagesInfo } from 'kernelsu';
|
||||
import PinyinMatch from 'pinyin-match';
|
||||
import { runCmd, writeFile, CONFIG_DIR } from '../utils.js';
|
||||
import { runCmd, readConfig, updateConfig } from '../utils.js';
|
||||
|
||||
export function useApps() {
|
||||
const apps = ref([]);
|
||||
@@ -18,8 +18,8 @@ export function useApps() {
|
||||
isLoading.value = true;
|
||||
loadError.value = '';
|
||||
try {
|
||||
const blRes = await runCmd(`cat "${CONFIG_DIR}/blacklist_apps.txt"`);
|
||||
const allSaved = blRes.errno === 0 ? blRes.stdout.trim().split('\n').filter(Boolean) : [];
|
||||
const cfg = await readConfig();
|
||||
const allSaved = Array.isArray(cfg.blacklist_apps) ? cfg.blacklist_apps : [];
|
||||
savedBlacklist.value = new Set(allSaved);
|
||||
const savedPkgSet = new Set(allSaved.filter(e => !e.includes('/')));
|
||||
activityEntries.value = new Set(allSaved.filter(e => e.includes('/')));
|
||||
@@ -100,8 +100,8 @@ export function useApps() {
|
||||
toast('保存中...');
|
||||
const selectedPkgs = apps.value.filter(a => a.checked).map(a => a.packageName);
|
||||
const allEntries = [...selectedPkgs, ...activityEntries.value];
|
||||
const res = await writeFile(`${CONFIG_DIR}/blacklist_apps.txt`, allEntries.join('\n'));
|
||||
if (res.errno === 0 || res.stdout?.includes('OK')) {
|
||||
const res = await updateConfig({ blacklist_apps: allEntries });
|
||||
if (res.errno === 0) {
|
||||
savedBlacklist.value = new Set(allEntries);
|
||||
toast('黑名单保存成功');
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: calc(var(--radius) + 4px);
|
||||
--font-sans: Geist, system-ui, -apple-system, sans-serif;
|
||||
--font-mono: 'Google Sans Code', 'Roboto Mono', monospace;
|
||||
--font-mono: 'Geist Mono', 'Roboto Mono', monospace;
|
||||
}
|
||||
|
||||
/* ===============================
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Logs */
|
||||
.log-output {
|
||||
font-family: 'Google Sans Code', 'JetBrains Mono', 'Consolas', monospace;
|
||||
font-family: 'Geist Mono', 'JetBrains Mono', 'Consolas', monospace;
|
||||
font-size: 0.6875rem;
|
||||
padding: var(--spacing-m);
|
||||
background-color: #0d0e12;
|
||||
|
||||
+3
-3
@@ -27,14 +27,14 @@
|
||||
|
||||
@font-face {
|
||||
font-family: 'Geist';
|
||||
src: url('/Geist-VariableFont_wght.ttf') format('truetype');
|
||||
src: url('/Geist[wght].woff2') format('woff2');
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Google Sans Code';
|
||||
src: url('/GoogleSansCode-VariableFont_wght.ttf') format('truetype');
|
||||
font-family: 'Geist Mono';
|
||||
src: url('/GeistMono[wght].woff2') format('woff2');
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user