anti virus
This commit is contained in:
@@ -30,6 +30,9 @@ defineProps<{
|
||||
extensionSortKey: ExtensionSortKey;
|
||||
bookmarkSortKey: BookmarkSortKey;
|
||||
passwordSiteSortKey: PasswordSiteSortKey;
|
||||
passwordSitesLoaded: boolean;
|
||||
passwordSitesLoading: boolean;
|
||||
passwordSitesError: string;
|
||||
sortedProfiles: BrowserView["profiles"];
|
||||
sortedExtensions: BrowserView["extensions"];
|
||||
sortedBookmarks: BrowserView["bookmarks"];
|
||||
@@ -81,6 +84,7 @@ const emit = defineEmits<{
|
||||
"update:extensionSortKey": [value: ExtensionSortKey];
|
||||
"update:bookmarkSortKey": [value: BookmarkSortKey];
|
||||
"update:passwordSiteSortKey": [value: PasswordSiteSortKey];
|
||||
loadPasswordSites: [];
|
||||
openProfile: [browserId: string, profileId: string];
|
||||
showExtensionProfiles: [extensionId: string];
|
||||
showBookmarkProfiles: [url: string];
|
||||
@@ -213,7 +217,11 @@ const emit = defineEmits<{
|
||||
v-else-if="activeSection === 'passwords'"
|
||||
:password-sites="sortedPasswordSites"
|
||||
:sort-key="passwordSiteSortKey"
|
||||
:loaded="passwordSitesLoaded"
|
||||
:loading="passwordSitesLoading"
|
||||
:error="passwordSitesError"
|
||||
@update:sort-key="emit('update:passwordSiteSortKey', $event)"
|
||||
@load="emit('loadPasswordSites')"
|
||||
@show-profiles="emit('showPasswordSiteProfiles', $event)"
|
||||
/>
|
||||
|
||||
|
||||
@@ -4,16 +4,32 @@ import type { PasswordSiteSortKey, PasswordSiteSummary } from "../../types/brows
|
||||
defineProps<{
|
||||
passwordSites: PasswordSiteSummary[];
|
||||
sortKey: PasswordSiteSortKey;
|
||||
loaded: boolean;
|
||||
loading: boolean;
|
||||
error: string;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
"update:sortKey": [value: PasswordSiteSortKey];
|
||||
showProfiles: [url: string];
|
||||
load: [];
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="table-section">
|
||||
<div class="password-actions">
|
||||
<div class="password-actions-copy">
|
||||
<h3>按需读取已保存登录站点</h3>
|
||||
<p>为减少误报风险,这部分数据不会在应用启动时自动扫描。</p>
|
||||
</div>
|
||||
<button class="load-button" type="button" :disabled="loading" @click="emit('load')">
|
||||
{{ loading ? "读取中..." : loaded ? "重新读取" : "手动读取" }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p v-if="error" class="error-text">{{ error }}</p>
|
||||
|
||||
<div v-if="passwordSites.length" class="data-table">
|
||||
<div class="data-table-header passwords-grid">
|
||||
<button class="header-cell sortable" :class="{ active: sortKey === 'domain' }" type="button" @click="emit('update:sortKey', 'domain')">域名</button>
|
||||
@@ -40,18 +56,67 @@ const emit = defineEmits<{
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="empty-card">
|
||||
<p>这个浏览器没有扫描到任何已保存登录站点。</p>
|
||||
<p v-if="loaded">这个浏览器没有检测到任何已保存登录站点。</p>
|
||||
<p v-else>点击上方按钮后才会读取当前浏览器的已保存登录站点。</p>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.table-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.password-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 18px 20px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.18);
|
||||
border-radius: 22px;
|
||||
background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 255, 0.88));
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.password-actions-copy h3 {
|
||||
margin: 0 0 6px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.password-actions-copy p {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.load-button {
|
||||
flex-shrink: 0;
|
||||
min-width: 112px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 14px;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.load-button:disabled {
|
||||
cursor: progress;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.error-text {
|
||||
margin: 0;
|
||||
color: #b91c1c;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -163,6 +228,15 @@ const emit = defineEmits<{
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.password-actions {
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.load-button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.passwords-grid {
|
||||
grid-template-columns: minmax(0, 1fr) 132px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user