add selection buttons
This commit is contained in:
@@ -373,7 +373,12 @@ const BROWSER_CACHE_DIRS: &[&str] = &[
|
|||||||
"Code Cache",
|
"Code Cache",
|
||||||
"GPUCache",
|
"GPUCache",
|
||||||
"Media Cache",
|
"Media Cache",
|
||||||
"Service Worker/CacheStorage"
|
"Service Worker/CacheStorage",
|
||||||
|
"Service Worker/ScriptCache",
|
||||||
|
"GrShaderCache",
|
||||||
|
"DawnCache",
|
||||||
|
"File System",
|
||||||
|
"blob_storage"
|
||||||
];
|
];
|
||||||
|
|
||||||
#[derive(Serialize, Clone)]
|
#[derive(Serialize, Clone)]
|
||||||
|
|||||||
38
src/App.vue
38
src/App.vue
@@ -212,6 +212,20 @@ async function runAdvancedTask(task: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- 浏览器清理逻辑 ---
|
// --- 浏览器清理逻辑 ---
|
||||||
|
function toggleAllProfiles(enabled: boolean) {
|
||||||
|
const s = activeTab.value === 'clean-browser-chrome' ? chromeState.value : edgeState.value;
|
||||||
|
if (s.scanResult) {
|
||||||
|
s.scanResult.profiles.forEach(p => p.enabled = enabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function invertProfiles() {
|
||||||
|
const s = activeTab.value === 'clean-browser-chrome' ? chromeState.value : edgeState.value;
|
||||||
|
if (s.scanResult) {
|
||||||
|
s.scanResult.profiles.forEach(p => p.enabled = !p.enabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function startBrowserScan(browser: 'chrome' | 'edge') {
|
async function startBrowserScan(browser: 'chrome' | 'edge') {
|
||||||
const s = browser === 'chrome' ? chromeState.value : edgeState.value;
|
const s = browser === 'chrome' ? chromeState.value : edgeState.value;
|
||||||
s.isScanning = true;
|
s.isScanning = true;
|
||||||
@@ -741,7 +755,14 @@ function splitSize(sizeStr: string | number) {
|
|||||||
|
|
||||||
<!-- 详情列表 -->
|
<!-- 详情列表 -->
|
||||||
<div class="detail-list" v-if="activeTab === 'clean-browser-chrome' ? (chromeState.isScanning || chromeState.scanResult) && !chromeState.isDone : (edgeState.isScanning || edgeState.scanResult) && !edgeState.isDone">
|
<div class="detail-list" v-if="activeTab === 'clean-browser-chrome' ? (chromeState.isScanning || chromeState.scanResult) && !chromeState.isDone : (edgeState.isScanning || edgeState.scanResult) && !edgeState.isDone">
|
||||||
|
<div class="list-header">
|
||||||
<h3>用户资料列表</h3>
|
<h3>用户资料列表</h3>
|
||||||
|
<div class="list-actions">
|
||||||
|
<button class="btn-text" @click="toggleAllProfiles(true)">全选</button>
|
||||||
|
<button class="btn-text" @click="toggleAllProfiles(false)">取消</button>
|
||||||
|
<button class="btn-text" @click="invertProfiles()">反选</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="detail-item"
|
class="detail-item"
|
||||||
v-for="profile in (activeTab === 'clean-browser-chrome' ? chromeState.scanResult?.profiles : edgeState.scanResult?.profiles) || []"
|
v-for="profile in (activeTab === 'clean-browser-chrome' ? chromeState.scanResult?.profiles : edgeState.scanResult?.profiles) || []"
|
||||||
@@ -1313,7 +1334,22 @@ body {
|
|||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
border: 1px solid rgba(0,0,0,0.02);
|
border: 1px solid rgba(0,0,0,0.02);
|
||||||
}
|
}
|
||||||
.detail-list h3 { font-size: 18px; margin-bottom: 20px; font-weight: 700; color: var(--text-main); }
|
.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
|
||||||
|
.list-header h3 { font-size: 18px; margin-bottom: 0; font-weight: 700; color: var(--text-main); }
|
||||||
|
.list-actions { display: flex; gap: 8px; }
|
||||||
|
.btn-text {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: var(--primary-color);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 6px 10px;
|
||||||
|
border-radius: 8px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
.btn-text:hover { background-color: #F0F7FF; }
|
||||||
|
|
||||||
.detail-item {
|
.detail-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
Reference in New Issue
Block a user