mirror of
https://github.com/YuleBest/LuminPro.git
synced 2026-12-04 00:54:42 +08:00
style(webui): 模糊性能优化
This commit is contained in:
1 parent
a206c9e831
commit
74f37460b4
7 files changed
+17
-21
No files matched your search
+2
-2
@@ -6,8 +6,8 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
|
||||
<title>LuminPro</title>
|
||||
<link rel="stylesheet" type="text/css" href="/internal/insets.css" />
|
||||
<script type="module" crossorigin src="/assets/index-Bqhyl8p5.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CL94gOzq.css">
|
||||
<script type="module" crossorigin src="/assets/index-BShqMWYm.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-D3b5fUNT.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
+3
-2
@@ -1,3 +1,4 @@
|
||||
// oxlint-disable no-unused-expressions
|
||||
import { listPackages, getPackagesInfo } from 'kernelsu';
|
||||
import { createIcons, Eye, EyeOff } from 'lucide';
|
||||
import PinyinMatch from 'pinyin-match';
|
||||
@@ -107,7 +108,7 @@ export async function loadApps() {
|
||||
} else {
|
||||
throw new Error('No packages found');
|
||||
}
|
||||
} catch (_) {
|
||||
} catch {
|
||||
// 模拟 150 个应用包数据用于调试
|
||||
console.log("[DEBUG] 使用模拟应用列表数据");
|
||||
infoList = Array.from({ length: 150 }, (_, i) => ({
|
||||
@@ -599,7 +600,7 @@ function setupActivityPicker() {
|
||||
stopPolling();
|
||||
pollingTimer = setInterval(async () => {
|
||||
try {
|
||||
const res = await runCmd(`dumpsys window 2>/dev/null | grep mCurrentFocus | sed 's/.*u0 \\(.*\\)}/\\1/'`);
|
||||
const res = await runCmd(`dumpsys window 2>/dev/null | grep mCurrentFocus | sed 's/.*u[0-9][0-9]* //' | sed 's/}.*//'`);
|
||||
if (res.errno !== 0) return;
|
||||
const activity = res.stdout.trim();
|
||||
// 空值或仍在 WebUI 内则继续等待
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20px 20px;
|
||||
padding: 12px 12px;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
|
||||
+7
-12
@@ -117,15 +117,15 @@
|
||||
position: fixed;
|
||||
bottom: calc(18px + var(--safe-area-inset-bottom, 0px));
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateZ(0); /* 居中并开启硬件加速 */
|
||||
transform: translateX(-50%) translateZ(0);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
background: rgba(var(--md-sys-color-surface-container-high-rgb, 43, 41, 48), 0.6);
|
||||
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
||||
backdrop-filter: blur(20px) saturate(180%);
|
||||
will-change: backdrop-filter;
|
||||
background: rgba(var(--md-sys-color-surface-container-high-rgb, 43, 41, 48), 0.75);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
backdrop-filter: blur(12px);
|
||||
will-change: transform;
|
||||
padding: 8px 16px;
|
||||
border-radius: 28px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
@@ -136,7 +136,7 @@
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
touch-action: none; /* Prevents browser scroll during drag */
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.navbar-slider {
|
||||
@@ -145,16 +145,11 @@
|
||||
top: 8px;
|
||||
bottom: 8px;
|
||||
height: auto;
|
||||
background: rgba(var(--md-sys-color-primary-rgb, 168, 199, 250), 0.35);
|
||||
-webkit-backdrop-filter: blur(8px) saturate(120%);
|
||||
backdrop-filter: blur(8px) saturate(120%);
|
||||
transform: translateZ(0);
|
||||
background: var(--md-sys-color-primary-container);
|
||||
border-radius: 20px;
|
||||
transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), width 0.3s ease;
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
border: 1px solid rgba(var(--md-sys-color-primary-rgb, 168, 199, 250), 0.4);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.navbar-btn {
|
||||
|
||||
+2
-2
@@ -73,8 +73,8 @@ body::-webkit-scrollbar {
|
||||
}
|
||||
|
||||
#app {
|
||||
padding: 20px;
|
||||
padding-bottom: calc(20px + 80px);
|
||||
padding: 12px;
|
||||
padding-bottom: calc(12px + 80px);
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
|
||||
@@ -108,7 +108,7 @@ function startPolling() {
|
||||
pollingTimer = setInterval(async () => {
|
||||
try {
|
||||
const res = await runCmd(
|
||||
`dumpsys window 2>/dev/null | grep mCurrentFocus | sed 's/.*u0 \\(.*\\)}/\\1/'`
|
||||
`dumpsys window 2>/dev/null | grep mCurrentFocus | sed 's/.*u[0-9][0-9]* //' | sed 's/}.*//'`
|
||||
);
|
||||
if (res.errno !== 0) return;
|
||||
const activity = res.stdout.trim();
|
||||
@@ -327,7 +327,7 @@ function confirmPicker() {
|
||||
<div class="picker-step-icon"><Clock :size="52" stroke-width="1.5" /></div>
|
||||
<h3 class="picker-step-title">切换到目标界面</h3>
|
||||
<p class="picker-step-desc">
|
||||
点击「开始获取」后,切换到需要屏蔽的应用界面。<br /><br />
|
||||
切换到需要屏蔽的应用界面,并点击 「开始获取」<br /><br />
|
||||
检测到非 Web UI 界面后将<strong>自动停止</strong>。<br /><br />
|
||||
<span class="picker-status-text" :class="{ polling: pickerPolling }">{{
|
||||
pickerStatusText
|
||||
|
||||
Reference in new issue
Block a user