This commit is contained in:
Julian Freeman
2026-04-17 17:26:55 -04:00
parent 1c43a318c6
commit 6062a38b99
14 changed files with 137 additions and 140 deletions

View File

@@ -145,9 +145,9 @@ const {
<div class="scan-dot dot-three"></div> <div class="scan-dot dot-three"></div>
</div> </div>
</div> </div>
<p class="eyebrow">Scanning</p> <p class="eyebrow">扫描中</p>
<h2>Reading local browser data</h2> <h2>正在读取本地浏览器数据</h2>
<p>Profiles, extensions, bookmarks, and saved login sites are being collected.</p> <p>正在收集用户资料插件书签和已保存登录站点</p>
<div class="loading-steps" aria-hidden="true"> <div class="loading-steps" aria-hidden="true">
<span></span> <span></span>
<span></span> <span></span>
@@ -158,8 +158,8 @@ const {
<template v-else-if="error"> <template v-else-if="error">
<section class="state-panel error"> <section class="state-panel error">
<p class="eyebrow">Error</p> <p class="eyebrow">错误</p>
<h2>Scan failed</h2> <h2>扫描失败</h2>
<p>{{ error }}</p> <p>{{ error }}</p>
</section> </section>
</template> </template>
@@ -246,9 +246,9 @@ const {
<template v-else> <template v-else>
<section class="state-panel"> <section class="state-panel">
<p class="eyebrow">No Data</p> <p class="eyebrow">无数据</p>
<h2>No supported browser was detected</h2> <h2>没有检测到受支持的浏览器</h2>
<p>Install or sign in to Chrome, Edge, or Brave and refresh the scan.</p> <p>请安装或登录 ChromeEdgeBrave 等浏览器后再刷新扫描</p>
</section> </section>
</template> </template>
</main> </main>

View File

@@ -64,7 +64,7 @@ function isSelected(profileId: string) {
<div class="modal-header"> <div class="modal-header">
<h3>{{ title }}</h3> <h3>{{ title }}</h3>
<button class="secondary-button modal-close-button" type="button" @click="emit('close')"> <button class="secondary-button modal-close-button" type="button" @click="emit('close')">
Close 关闭
</button> </button>
</div> </div>
@@ -83,7 +83,7 @@ function isSelected(profileId: string) {
<path d="M3.5 8.2L6.4 11.1L12.5 4.9" /> <path d="M3.5 8.2L6.4 11.1L12.5 4.9" />
</svg> </svg>
</span> </span>
<span>Select All</span> <span>全选</span>
</label> </label>
<button <button
class="danger-button" class="danger-button"
@@ -91,14 +91,14 @@ function isSelected(profileId: string) {
:disabled="!selectedProfileIds.length || deleteBusy" :disabled="!selectedProfileIds.length || deleteBusy"
@click="emit('deleteSelectedProfiles')" @click="emit('deleteSelectedProfiles')"
> >
{{ deleteBusy ? "Deleting..." : `Delete Selected (${selectedProfileIds.length})` }} {{ deleteBusy ? "删除中..." : `删除所选(${selectedProfileIds.length}` }}
</button> </button>
</div> </div>
<div class="modal-table-header modal-grid" :class="{ bookmark: isBookmark, extension: isExtension }"> <div class="modal-table-header modal-grid" :class="{ bookmark: isBookmark, extension: isExtension }">
<div v-if="isSelectableMode" class="header-cell checkbox-cell">Pick</div> <div v-if="isSelectableMode" class="header-cell checkbox-cell">选择</div>
<div class="header-cell icon-cell">Avatar</div> <div class="header-cell icon-cell">头像</div>
<button class="header-cell sortable" :class="{ active: sortKey === 'name' }" type="button" @click="sortKey = 'name'">Name</button> <button class="header-cell sortable" :class="{ active: sortKey === 'name' }" type="button" @click="sortKey = 'name'">名称</button>
<button <button
v-if="!isExtension && !isBookmark" v-if="!isExtension && !isBookmark"
class="header-cell sortable" class="header-cell sortable"
@@ -106,11 +106,11 @@ function isSelected(profileId: string) {
type="button" type="button"
@click="sortKey = 'id'" @click="sortKey = 'id'"
> >
Profile ID 资料 ID
</button> </button>
<div v-if="isExtension" class="header-cell">Source</div> <div v-if="isExtension" class="header-cell">来源</div>
<div v-if="isBookmark" class="header-cell">Bookmark Path</div> <div v-if="isBookmark" class="header-cell">书签路径</div>
<div class="header-cell actions-cell">Action</div> <div class="header-cell actions-cell">操作</div>
</div> </div>
<div class="modal-table-body styled-scrollbar"> <div class="modal-table-body styled-scrollbar">
<article <article
@@ -151,7 +151,7 @@ function isSelected(profileId: string) {
<span class="badge neutral">{{ profile.id }}</span> <span class="badge neutral">{{ profile.id }}</span>
</div> </div>
<div v-if="isExtension && hasInstallSource(profile)" class="row-cell muted-cell"> <div v-if="isExtension && hasInstallSource(profile)" class="row-cell muted-cell">
{{ profile.installSource === "store" ? "Store" : "External" }} {{ profile.installSource === "store" ? "商店安装" : "外部安装" }}
</div> </div>
<div <div
v-if="isBookmark && hasBookmarkPath(profile)" v-if="isBookmark && hasBookmarkPath(profile)"
@@ -167,7 +167,7 @@ function isSelected(profileId: string) {
:disabled="isOpeningProfile(browserId, profile.id)" :disabled="isOpeningProfile(browserId, profile.id)"
@click="emit('openProfile', browserId, profile.id)" @click="emit('openProfile', browserId, profile.id)"
> >
{{ isOpeningProfile(browserId, profile.id) ? "Opening..." : "Open" }} {{ isOpeningProfile(browserId, profile.id) ? "打开中..." : "打开" }}
</button> </button>
<button <button
v-if="isSelectableMode" v-if="isSelectableMode"
@@ -176,7 +176,7 @@ function isSelected(profileId: string) {
:disabled="deleteBusy" :disabled="deleteBusy"
@click="emit('deleteProfile', profile.id)" @click="emit('deleteProfile', profile.id)"
> >
Delete 删除
</button> </button>
</div> </div>
</article> </article>
@@ -217,12 +217,22 @@ function isSelected(profileId: string) {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
gap: 12px; gap: 12px;
min-width: 0;
} }
.modal-header h3 { .modal-header h3 {
margin: 0; margin: 0;
font-weight: 600; font-weight: 600;
letter-spacing: -0.03em; letter-spacing: -0.03em;
min-width: 0;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.modal-close-button {
flex-shrink: 0;
} }
.modal-table { .modal-table {

View File

@@ -52,19 +52,18 @@ const resultSummary = computed(() => {
<section class="modal-card"> <section class="modal-card">
<div class="modal-header"> <div class="modal-header">
<h3>{{ title }}</h3> <h3>{{ title }}</h3>
<button class="secondary-button" type="button" @click="emit('close')">Close</button> <button class="secondary-button" type="button" @click="emit('close')">关闭</button>
</div> </div>
<template v-if="mode === 'confirm'"> <template v-if="mode === 'confirm'">
<p class="modal-copy"> <p class="modal-copy">
This will remove {{ bookmarkCount }} bookmark{{ bookmarkCount === 1 ? "" : "s" }} from 将从 {{ profileCount }} 个资料中删除 {{ bookmarkCount }} 个书签
{{ profileCount }} profile{{ profileCount === 1 ? "" : "s" }}.
</p> </p>
<div class="modal-actions"> <div class="modal-actions">
<button class="secondary-button" type="button" @click="emit('close')">Cancel</button> <button class="secondary-button" type="button" @click="emit('close')">取消</button>
<button class="danger-button" type="button" :disabled="busy" @click="emit('confirm')"> <button class="danger-button" type="button" :disabled="busy" @click="emit('confirm')">
{{ busy ? "Deleting..." : "Confirm Delete" }} {{ busy ? "删除中..." : "确认删除" }}
</button> </button>
</div> </div>
</template> </template>
@@ -72,15 +71,11 @@ const resultSummary = computed(() => {
<template v-else> <template v-else>
<p v-if="generalError" class="result-banner error">{{ generalError }}</p> <p v-if="generalError" class="result-banner error">{{ generalError }}</p>
<p class="modal-copy"> <p class="modal-copy">
Successfully removed {{ resultSummary.successCount }} bookmark{{ 成功删除 {{ resultSummary.successCount }} 个书签失败 {{ resultSummary.failedCount }}
resultSummary.successCount === 1 ? "" : "s"
}}. Failed to remove {{ resultSummary.failedCount }} bookmark{{
resultSummary.failedCount === 1 ? "" : "s"
}}.
</p> </p>
<div class="modal-actions"> <div class="modal-actions">
<button class="primary-button" type="button" @click="emit('close')">Close</button> <button class="primary-button" type="button" @click="emit('close')">关闭</button>
</div> </div>
</template> </template>
</section> </section>

View File

@@ -47,7 +47,7 @@ function isSelected(url: string) {
<path d="M3.5 8.2L6.4 11.1L12.5 4.9" /> <path d="M3.5 8.2L6.4 11.1L12.5 4.9" />
</svg> </svg>
</span> </span>
<span>Select All</span> <span>全选</span>
</label> </label>
<button <button
class="danger-button" class="danger-button"
@@ -55,15 +55,15 @@ function isSelected(url: string) {
:disabled="!selectedBookmarkUrls.length || deleteBusy" :disabled="!selectedBookmarkUrls.length || deleteBusy"
@click="emit('deleteSelected')" @click="emit('deleteSelected')"
> >
{{ deleteBusy ? "Deleting..." : `Delete Selected (${selectedBookmarkUrls.length})` }} {{ deleteBusy ? "删除中..." : `删除所选(${selectedBookmarkUrls.length}` }}
</button> </button>
</div> </div>
<div class="data-table-header bookmarks-grid"> <div class="data-table-header bookmarks-grid">
<div class="header-cell checkbox-cell">Pick</div> <div class="header-cell checkbox-cell">选择</div>
<button class="header-cell sortable" :class="{ active: sortKey === 'title' }" type="button" @click="emit('update:sortKey', 'title')">Name</button> <button class="header-cell sortable" :class="{ active: sortKey === 'title' }" type="button" @click="emit('update:sortKey', 'title')">名称</button>
<button class="header-cell sortable" :class="{ active: sortKey === 'url' }" type="button" @click="emit('update:sortKey', 'url')">URL</button> <button class="header-cell sortable" :class="{ active: sortKey === 'url' }" type="button" @click="emit('update:sortKey', 'url')">URL</button>
<div class="header-cell actions-cell">Actions</div> <div class="header-cell actions-cell">操作</div>
</div> </div>
<div class="data-table-body styled-scrollbar"> <div class="data-table-body styled-scrollbar">
<article v-for="bookmark in bookmarks" :key="bookmark.url" class="data-table-row bookmarks-grid"> <article v-for="bookmark in bookmarks" :key="bookmark.url" class="data-table-row bookmarks-grid">
@@ -89,7 +89,7 @@ function isSelected(url: string) {
<div class="row-cell muted-cell" :title="bookmark.url">{{ bookmark.url }}</div> <div class="row-cell muted-cell" :title="bookmark.url">{{ bookmark.url }}</div>
<div class="row-cell actions-cell"> <div class="row-cell actions-cell">
<button class="disclosure-button" type="button" @click="emit('showProfiles', bookmark.url)"> <button class="disclosure-button" type="button" @click="emit('showProfiles', bookmark.url)">
<span>View</span> <span>查看</span>
<span class="badge neutral">{{ bookmark.profileIds.length }}</span> <span class="badge neutral">{{ bookmark.profileIds.length }}</span>
</button> </button>
<button <button
@@ -98,14 +98,14 @@ function isSelected(url: string) {
:disabled="deleteBusy" :disabled="deleteBusy"
@click="emit('deleteBookmark', bookmark.url)" @click="emit('deleteBookmark', bookmark.url)"
> >
Delete 删除
</button> </button>
</div> </div>
</article> </article>
</div> </div>
</div> </div>
<div v-else class="empty-card"> <div v-else class="empty-card">
<p>No bookmarks were discovered for this browser.</p> <p>这个浏览器没有扫描到任何书签</p>
</div> </div>
</section> </section>
</template> </template>

View File

@@ -126,7 +126,7 @@ const emit = defineEmits<{
type="button" type="button"
@click="emit('update:activeSection', 'profiles')" @click="emit('update:activeSection', 'profiles')"
> >
<span>Profiles</span> <span>资料</span>
<span class="count-pill">{{ sectionCount("profiles") }}</span> <span class="count-pill">{{ sectionCount("profiles") }}</span>
</button> </button>
<button <button
@@ -135,7 +135,7 @@ const emit = defineEmits<{
type="button" type="button"
@click="emit('update:activeSection', 'extensions')" @click="emit('update:activeSection', 'extensions')"
> >
<span>Extensions</span> <span>插件</span>
<span class="count-pill">{{ sectionCount("extensions") }}</span> <span class="count-pill">{{ sectionCount("extensions") }}</span>
</button> </button>
<button <button
@@ -144,7 +144,7 @@ const emit = defineEmits<{
type="button" type="button"
@click="emit('update:activeSection', 'bookmarks')" @click="emit('update:activeSection', 'bookmarks')"
> >
<span>Bookmarks</span> <span>书签</span>
<span class="count-pill">{{ sectionCount("bookmarks") }}</span> <span class="count-pill">{{ sectionCount("bookmarks") }}</span>
</button> </button>
<button <button
@@ -153,7 +153,7 @@ const emit = defineEmits<{
type="button" type="button"
@click="emit('update:activeSection', 'passwords')" @click="emit('update:activeSection', 'passwords')"
> >
<span>Saved Logins</span> <span>已保存登录</span>
<span class="count-pill">{{ sectionCount("passwords") }}</span> <span class="count-pill">{{ sectionCount("passwords") }}</span>
</button> </button>
<button <button
@@ -162,7 +162,7 @@ const emit = defineEmits<{
type="button" type="button"
@click="emit('update:activeSection', 'history')" @click="emit('update:activeSection', 'history')"
> >
<span>History</span> <span>历史</span>
<span class="count-pill">{{ sectionCount("history") }}</span> <span class="count-pill">{{ sectionCount("history") }}</span>
</button> </button>
</section> </section>
@@ -233,7 +233,7 @@ const emit = defineEmits<{
<HistoryCleanupModal <HistoryCleanupModal
v-if="historyCleanupConfirmProfiles.length" v-if="historyCleanupConfirmProfiles.length"
mode="confirm" mode="confirm"
title="Confirm History Cleanup" title="确认清理历史"
:profiles="historyCleanupConfirmProfiles" :profiles="historyCleanupConfirmProfiles"
:results="[]" :results="[]"
:busy="cleanupHistoryBusy" :busy="cleanupHistoryBusy"
@@ -244,7 +244,7 @@ const emit = defineEmits<{
<HistoryCleanupModal <HistoryCleanupModal
v-if="historyCleanupResultOpen" v-if="historyCleanupResultOpen"
mode="result" mode="result"
title="Cleanup Result" title="清理结果"
:profiles="[]" :profiles="[]"
:results="cleanupHistoryResults" :results="cleanupHistoryResults"
:general-error="cleanupHistoryError" :general-error="cleanupHistoryError"
@@ -254,7 +254,7 @@ const emit = defineEmits<{
<BookmarkRemovalModal <BookmarkRemovalModal
v-if="bookmarkRemovalConfirmBookmarkCount > 0" v-if="bookmarkRemovalConfirmBookmarkCount > 0"
mode="confirm" mode="confirm"
title="Confirm Bookmark Removal" title="确认删除书签"
:bookmark-count="bookmarkRemovalConfirmBookmarkCount" :bookmark-count="bookmarkRemovalConfirmBookmarkCount"
:profile-count="bookmarkRemovalConfirmProfileCount" :profile-count="bookmarkRemovalConfirmProfileCount"
:results="[]" :results="[]"
@@ -266,7 +266,7 @@ const emit = defineEmits<{
<BookmarkRemovalModal <BookmarkRemovalModal
v-if="bookmarkRemovalResultOpen" v-if="bookmarkRemovalResultOpen"
mode="result" mode="result"
title="Bookmark Removal Result" title="书签删除结果"
:bookmark-count="0" :bookmark-count="0"
:profile-count="0" :profile-count="0"
:results="bookmarkRemovalResults" :results="bookmarkRemovalResults"
@@ -277,7 +277,7 @@ const emit = defineEmits<{
<ExtensionRemovalModal <ExtensionRemovalModal
v-if="extensionRemovalConfirmExtensions.length || extensionRemovalConfirmProfiles.length" v-if="extensionRemovalConfirmExtensions.length || extensionRemovalConfirmProfiles.length"
mode="confirm" mode="confirm"
title="Confirm Extension Removal" title="确认删除插件"
:extensions="extensionRemovalConfirmExtensions" :extensions="extensionRemovalConfirmExtensions"
:profiles="extensionRemovalConfirmProfiles" :profiles="extensionRemovalConfirmProfiles"
:results="[]" :results="[]"
@@ -289,7 +289,7 @@ const emit = defineEmits<{
<ExtensionRemovalModal <ExtensionRemovalModal
v-if="extensionRemovalResultOpen" v-if="extensionRemovalResultOpen"
mode="result" mode="result"
title="Extension Removal Result" title="插件删除结果"
:extensions="[]" :extensions="[]"
:profiles="[]" :profiles="[]"
:results="extensionRemovalResults" :results="extensionRemovalResults"

View File

@@ -58,22 +58,18 @@ const resultSummary = computed(() => {
<section class="modal-card"> <section class="modal-card">
<div class="modal-header"> <div class="modal-header">
<h3>{{ title }}</h3> <h3>{{ title }}</h3>
<button class="secondary-button" type="button" @click="emit('close')">Close</button> <button class="secondary-button" type="button" @click="emit('close')">关闭</button>
</div> </div>
<template v-if="mode === 'confirm'"> <template v-if="mode === 'confirm'">
<p class="modal-copy"> <p class="modal-copy">
This will remove {{ confirmSummary.extensionCount }} extension{{ 将从 {{ confirmSummary.profileCount }} 个资料中删除 {{ confirmSummary.extensionCount }} 个插件
confirmSummary.extensionCount === 1 ? "" : "s"
}} from {{ confirmSummary.profileCount }} profile{{
confirmSummary.profileCount === 1 ? "" : "s"
}}.
</p> </p>
<div class="modal-actions"> <div class="modal-actions">
<button class="secondary-button" type="button" @click="emit('close')">Cancel</button> <button class="secondary-button" type="button" @click="emit('close')">取消</button>
<button class="danger-button" type="button" :disabled="busy" @click="emit('confirm')"> <button class="danger-button" type="button" :disabled="busy" @click="emit('confirm')">
{{ busy ? "Deleting..." : "Confirm Delete" }} {{ busy ? "删除中..." : "确认删除" }}
</button> </button>
</div> </div>
</template> </template>
@@ -81,15 +77,11 @@ const resultSummary = computed(() => {
<template v-else> <template v-else>
<p v-if="generalError" class="result-banner error">{{ generalError }}</p> <p v-if="generalError" class="result-banner error">{{ generalError }}</p>
<p class="modal-copy"> <p class="modal-copy">
Successfully removed {{ resultSummary.successCount }} extension{{ 成功删除 {{ resultSummary.successCount }} 个插件失败 {{ resultSummary.failedCount }}
resultSummary.successCount === 1 ? "" : "s"
}}. Failed to remove {{ resultSummary.failedCount }} extension{{
resultSummary.failedCount === 1 ? "" : "s"
}}.
</p> </p>
<div class="modal-actions"> <div class="modal-actions">
<button class="primary-button" type="button" @click="emit('close')">Close</button> <button class="primary-button" type="button" @click="emit('close')">关闭</button>
</div> </div>
</template> </template>
</section> </section>

View File

@@ -47,7 +47,7 @@ function isSelected(extensionId: string) {
<path d="M3.5 8.2L6.4 11.1L12.5 4.9" /> <path d="M3.5 8.2L6.4 11.1L12.5 4.9" />
</svg> </svg>
</span> </span>
<span>Select All</span> <span>全选</span>
</label> </label>
<button <button
class="danger-button" class="danger-button"
@@ -55,16 +55,16 @@ function isSelected(extensionId: string) {
:disabled="!selectedExtensionIds.length || deleteBusy" :disabled="!selectedExtensionIds.length || deleteBusy"
@click="emit('deleteSelected')" @click="emit('deleteSelected')"
> >
{{ deleteBusy ? "Deleting..." : `Delete Selected (${selectedExtensionIds.length})` }} {{ deleteBusy ? "删除中..." : `删除所选(${selectedExtensionIds.length}` }}
</button> </button>
</div> </div>
<div class="data-table-header extensions-grid"> <div class="data-table-header extensions-grid">
<div class="header-cell checkbox-cell">Pick</div> <div class="header-cell checkbox-cell">选择</div>
<div class="header-cell icon-cell">Icon</div> <div class="header-cell icon-cell">图标</div>
<button class="header-cell sortable" :class="{ active: sortKey === 'name' }" type="button" @click="emit('update:sortKey', 'name')">Name</button> <button class="header-cell sortable" :class="{ active: sortKey === 'name' }" type="button" @click="emit('update:sortKey', 'name')">名称</button>
<button class="header-cell sortable" :class="{ active: sortKey === 'id' }" type="button" @click="emit('update:sortKey', 'id')">Extension ID</button> <button class="header-cell sortable" :class="{ active: sortKey === 'id' }" type="button" @click="emit('update:sortKey', 'id')">插件 ID</button>
<div class="header-cell actions-cell">Actions</div> <div class="header-cell actions-cell">操作</div>
</div> </div>
<div class="data-table-body styled-scrollbar"> <div class="data-table-body styled-scrollbar">
<article v-for="extension in extensions" :key="extension.id" class="data-table-row extensions-grid"> <article v-for="extension in extensions" :key="extension.id" class="data-table-row extensions-grid">
@@ -94,7 +94,7 @@ function isSelected(extensionId: string) {
<div class="row-cell muted-cell" :title="extension.id">{{ extension.id }}</div> <div class="row-cell muted-cell" :title="extension.id">{{ extension.id }}</div>
<div class="row-cell actions-cell"> <div class="row-cell actions-cell">
<button class="disclosure-button" type="button" @click="emit('showProfiles', extension.id)"> <button class="disclosure-button" type="button" @click="emit('showProfiles', extension.id)">
<span>View</span> <span>查看</span>
<span class="badge neutral">{{ extension.profileIds.length }}</span> <span class="badge neutral">{{ extension.profileIds.length }}</span>
</button> </button>
<button <button
@@ -103,14 +103,14 @@ function isSelected(extensionId: string) {
:disabled="deleteBusy" :disabled="deleteBusy"
@click="emit('deleteExtension', extension.id)" @click="emit('deleteExtension', extension.id)"
> >
Delete 删除
</button> </button>
</div> </div>
</article> </article>
</div> </div>
</div> </div>
<div v-else class="empty-card"> <div v-else class="empty-card">
<p>No extensions were discovered for this browser.</p> <p>这个浏览器没有扫描到任何插件</p>
</div> </div>
</section> </section>
</template> </template>

View File

@@ -37,7 +37,7 @@ const allSelected = computed(
); );
function statusLabel(status: CleanupFileStatus) { function statusLabel(status: CleanupFileStatus) {
return status === "found" ? "Found" : "Missing"; return status === "found" ? "存在" : "缺失";
} }
function statusClass(status: CleanupFileStatus) { function statusClass(status: CleanupFileStatus) {
@@ -79,7 +79,7 @@ function hasAnyHistoryFile(statuses: CleanupFileStatus[]) {
<path d="M3.5 8.2L6.4 11.1L12.5 4.9" /> <path d="M3.5 8.2L6.4 11.1L12.5 4.9" />
</svg> </svg>
</span> </span>
<span>Select All</span> <span>全选</span>
</label> </label>
<button <button
class="danger-button" class="danger-button"
@@ -87,19 +87,19 @@ function hasAnyHistoryFile(statuses: CleanupFileStatus[]) {
:disabled="!selectedProfileIds.length || cleanupBusy" :disabled="!selectedProfileIds.length || cleanupBusy"
@click="emit('cleanupSelected')" @click="emit('cleanupSelected')"
> >
{{ cleanupBusy ? "Cleaning..." : `Clean Selected (${selectedProfileIds.length})` }} {{ cleanupBusy ? "清理中..." : `清理所选(${selectedProfileIds.length}` }}
</button> </button>
</div> </div>
<div class="data-table-header history-grid"> <div class="data-table-header history-grid">
<div class="header-cell checkbox-cell">Pick</div> <div class="header-cell checkbox-cell">选择</div>
<div class="header-cell icon-cell">Avatar</div> <div class="header-cell icon-cell">头像</div>
<div class="header-cell">Profile</div> <div class="header-cell">资料</div>
<div class="header-cell">History</div> <div class="header-cell">历史记录</div>
<div class="header-cell">Top Sites</div> <div class="header-cell">热门站点</div>
<div class="header-cell">Visited Links</div> <div class="header-cell">访问链接</div>
<div class="header-cell">Sessions</div> <div class="header-cell">会话</div>
<div class="header-cell actions-cell">Action</div> <div class="header-cell actions-cell">操作</div>
</div> </div>
<div class="data-table-body styled-scrollbar"> <div class="data-table-body styled-scrollbar">
<article v-for="profile in profiles" :key="profile.id" class="data-table-row history-grid"> <article v-for="profile in profiles" :key="profile.id" class="data-table-row history-grid">
@@ -158,14 +158,14 @@ function hasAnyHistoryFile(statuses: CleanupFileStatus[]) {
:disabled="!isSelectable(profile) || cleanupBusy" :disabled="!isSelectable(profile) || cleanupBusy"
@click="emit('cleanupProfile', profile.id)" @click="emit('cleanupProfile', profile.id)"
> >
Clean 清理
</button> </button>
</div> </div>
</article> </article>
</div> </div>
</div> </div>
<div v-else class="empty-card"> <div v-else class="empty-card">
<p>No profile directories were found for this browser.</p> <p>这个浏览器没有找到任何用户资料目录</p>
</div> </div>
</section> </section>
</template> </template>

View File

@@ -22,14 +22,14 @@ const emit = defineEmits<{
<div class="modal-header"> <div class="modal-header">
<h3>{{ title }}</h3> <h3>{{ title }}</h3>
<button class="secondary-button modal-close-button" type="button" @click="emit('close')"> <button class="secondary-button modal-close-button" type="button" @click="emit('close')">
Close 关闭
</button> </button>
</div> </div>
<template v-if="mode === 'confirm'"> <template v-if="mode === 'confirm'">
<p class="modal-copy"> <p class="modal-copy">
The selected profiles will have <code>History</code>, <code>Top Sites</code>, and 将删除所选资料中的 <code>History</code><code>Top Sites</code><code>Visited Links</code>
<code>Visited Links</code> removed, and all files inside <code>Sessions</code> cleared. 并清空 <code>Sessions</code> 目录中的所有文件
</p> </p>
<div class="profile-list styled-scrollbar"> <div class="profile-list styled-scrollbar">
@@ -40,9 +40,9 @@ const emit = defineEmits<{
</div> </div>
<div class="modal-actions"> <div class="modal-actions">
<button class="secondary-button" type="button" @click="emit('close')">Cancel</button> <button class="secondary-button" type="button" @click="emit('close')">取消</button>
<button class="danger-button" type="button" :disabled="busy" @click="emit('confirm')"> <button class="danger-button" type="button" :disabled="busy" @click="emit('confirm')">
{{ busy ? "Cleaning..." : "Confirm Cleanup" }} {{ busy ? "清理中..." : "确认清理" }}
</button> </button>
</div> </div>
</template> </template>
@@ -60,19 +60,19 @@ const emit = defineEmits<{
<strong>{{ result.profileId }}</strong> <strong>{{ result.profileId }}</strong>
<p v-if="result.error">{{ result.error }}</p> <p v-if="result.error">{{ result.error }}</p>
<p v-else-if="result.deletedFiles.length"> <p v-else-if="result.deletedFiles.length">
Deleted {{ result.deletedFiles.join(", ") }} 已删除{{ result.deletedFiles.join("") }}
</p> </p>
<p v-else> <p v-else>
Nothing was deleted. 没有删除任何文件
</p> </p>
<p v-if="result.skippedFiles.length" class="muted-line"> <p v-if="result.skippedFiles.length" class="muted-line">
Missing {{ result.skippedFiles.join(", ") }} 已跳过不存在{{ result.skippedFiles.join("") }}
</p> </p>
</article> </article>
</div> </div>
<div class="modal-actions"> <div class="modal-actions">
<button class="primary-button" type="button" @click="emit('close')">Close</button> <button class="primary-button" type="button" @click="emit('close')">关闭</button>
</div> </div>
</template> </template>
</section> </section>

View File

@@ -16,9 +16,9 @@ const emit = defineEmits<{
<section class="table-section"> <section class="table-section">
<div v-if="passwordSites.length" class="data-table"> <div v-if="passwordSites.length" class="data-table">
<div class="data-table-header passwords-grid"> <div class="data-table-header passwords-grid">
<button class="header-cell sortable" :class="{ active: sortKey === 'domain' }" type="button" @click="emit('update:sortKey', 'domain')">Domain</button> <button class="header-cell sortable" :class="{ active: sortKey === 'domain' }" type="button" @click="emit('update:sortKey', 'domain')">域名</button>
<button class="header-cell sortable" :class="{ active: sortKey === 'url' }" type="button" @click="emit('update:sortKey', 'url')">URL</button> <button class="header-cell sortable" :class="{ active: sortKey === 'url' }" type="button" @click="emit('update:sortKey', 'url')">URL</button>
<div class="header-cell actions-cell">Profiles</div> <div class="header-cell actions-cell">关联资料</div>
</div> </div>
<div class="data-table-body styled-scrollbar"> <div class="data-table-body styled-scrollbar">
<article <article
@@ -32,7 +32,7 @@ const emit = defineEmits<{
<div class="row-cell muted-cell" :title="passwordSite.url">{{ passwordSite.url }}</div> <div class="row-cell muted-cell" :title="passwordSite.url">{{ passwordSite.url }}</div>
<div class="row-cell actions-cell"> <div class="row-cell actions-cell">
<button class="disclosure-button" type="button" @click="emit('showProfiles', passwordSite.url)"> <button class="disclosure-button" type="button" @click="emit('showProfiles', passwordSite.url)">
<span>View</span> <span>查看</span>
<span class="badge neutral">{{ passwordSite.profileIds.length }}</span> <span class="badge neutral">{{ passwordSite.profileIds.length }}</span>
</button> </button>
</div> </div>
@@ -40,7 +40,7 @@ const emit = defineEmits<{
</div> </div>
</div> </div>
<div v-else class="empty-card"> <div v-else class="empty-card">
<p>No saved login sites were discovered for this browser.</p> <p>这个浏览器没有扫描到任何已保存登录站点</p>
</div> </div>
</section> </section>
</template> </template>

View File

@@ -25,11 +25,11 @@ const emit = defineEmits<{
<div v-if="profiles.length" class="data-table"> <div v-if="profiles.length" class="data-table">
<div class="data-table-header profiles-grid"> <div class="data-table-header profiles-grid">
<div class="header-cell icon-cell">Avatar</div> <div class="header-cell icon-cell">头像</div>
<button class="header-cell sortable" :class="{ active: sortKey === 'name' }" type="button" @click="emit('update:sortKey', 'name')">Name</button> <button class="header-cell sortable" :class="{ active: sortKey === 'name' }" type="button" @click="emit('update:sortKey', 'name')">名称</button>
<button class="header-cell sortable" :class="{ active: sortKey === 'email' }" type="button" @click="emit('update:sortKey', 'email')">Email</button> <button class="header-cell sortable" :class="{ active: sortKey === 'email' }" type="button" @click="emit('update:sortKey', 'email')">邮箱</button>
<button class="header-cell sortable" :class="{ active: sortKey === 'id' }" type="button" @click="emit('update:sortKey', 'id')">Profile ID</button> <button class="header-cell sortable" :class="{ active: sortKey === 'id' }" type="button" @click="emit('update:sortKey', 'id')">资料 ID</button>
<div class="header-cell actions-cell">Action</div> <div class="header-cell actions-cell">操作</div>
</div> </div>
<div class="data-table-body styled-scrollbar"> <div class="data-table-body styled-scrollbar">
<article v-for="profile in profiles" :key="profile.id" class="data-table-row profiles-grid"> <article v-for="profile in profiles" :key="profile.id" class="data-table-row profiles-grid">
@@ -57,14 +57,14 @@ const emit = defineEmits<{
type="button" type="button"
@click="emit('openProfile', browserId, profile.id)" @click="emit('openProfile', browserId, profile.id)"
> >
{{ isOpeningProfile(browserId, profile.id) ? "Opening..." : "Open" }} {{ isOpeningProfile(browserId, profile.id) ? "打开中..." : "打开" }}
</button> </button>
</div> </div>
</article> </article>
</div> </div>
</div> </div>
<div v-else class="empty-card"> <div v-else class="empty-card">
<p>No profile directories were found for this browser.</p> <p>这个浏览器没有找到任何用户资料目录</p>
</div> </div>
</section> </section>
</template> </template>

View File

@@ -45,28 +45,28 @@ const iconOptions = computed(() =>
<div class="config-form-card"> <div class="config-form-card">
<div class="config-form-header collapsible"> <div class="config-form-header collapsible">
<div> <div>
<h3>Add Custom Browser</h3> <h3>添加自定义浏览器</h3>
</div> </div>
<button <button
class="secondary-button config-toggle-button" class="secondary-button config-toggle-button"
type="button" type="button"
@click="formExpanded = !formExpanded" @click="formExpanded = !formExpanded"
> >
{{ formExpanded ? "Collapse" : "Expand" }} {{ formExpanded ? "收起" : "展开" }}
</button> </button>
</div> </div>
<div v-if="formExpanded" class="config-form-fields compact"> <div v-if="formExpanded" class="config-form-fields compact">
<div class="config-inline-row"> <div class="config-inline-row">
<label class="field-group"> <label class="field-group">
<span>Name</span> <span>名称</span>
<input <input
:value="createConfigForm.name" :value="createConfigForm.name"
placeholder="Work Chrome" placeholder="例如:工作 Chrome"
@input="emit('updateName', ($event.target as HTMLInputElement).value)" @input="emit('updateName', ($event.target as HTMLInputElement).value)"
/> />
</label> </label>
<label class="field-group"> <label class="field-group">
<span>Icon</span> <span>图标</span>
<SortDropdown <SortDropdown
:model-value="createConfigForm.iconKey ?? 'chrome'" :model-value="createConfigForm.iconKey ?? 'chrome'"
:options="iconOptions" :options="iconOptions"
@@ -75,7 +75,7 @@ const iconOptions = computed(() =>
</label> </label>
</div> </div>
<label class="field-group"> <label class="field-group">
<span>Executable Path</span> <span>可执行文件路径</span>
<div class="path-input-row"> <div class="path-input-row">
<input <input
:value="createConfigForm.executablePath" :value="createConfigForm.executablePath"
@@ -83,12 +83,12 @@ const iconOptions = computed(() =>
@input="emit('updateExecutablePath', ($event.target as HTMLInputElement).value)" @input="emit('updateExecutablePath', ($event.target as HTMLInputElement).value)"
/> />
<button class="secondary-button" type="button" @click="emit('pickExecutablePath')"> <button class="secondary-button" type="button" @click="emit('pickExecutablePath')">
Browse File 选择文件
</button> </button>
</div> </div>
</label> </label>
<label class="field-group"> <label class="field-group">
<span>User Data Path</span> <span>用户资料路径</span>
<div class="path-input-row"> <div class="path-input-row">
<input <input
:value="createConfigForm.userDataPath" :value="createConfigForm.userDataPath"
@@ -96,7 +96,7 @@ const iconOptions = computed(() =>
@input="emit('updateUserDataPath', ($event.target as HTMLInputElement).value)" @input="emit('updateUserDataPath', ($event.target as HTMLInputElement).value)"
/> />
<button class="secondary-button" type="button" @click="emit('pickUserDataPath')"> <button class="secondary-button" type="button" @click="emit('pickUserDataPath')">
Browse Folder 选择文件夹
</button> </button>
</div> </div>
</label> </label>
@@ -107,14 +107,14 @@ const iconOptions = computed(() =>
:disabled="savingConfig" :disabled="savingConfig"
@click="emit('createConfig')" @click="emit('createConfig')"
> >
{{ savingConfig ? "Saving..." : "Add Config" }} {{ savingConfig ? "保存中..." : "添加配置" }}
</button> </button>
</div> </div>
</div> </div>
</div> </div>
<div v-if="configsLoading" class="empty-card"> <div v-if="configsLoading" class="empty-card">
<p>Loading browser configs...</p> <p>正在加载浏览器配置...</p>
</div> </div>
<div v-else class="stack-list"> <div v-else class="stack-list">
<article <article
@@ -145,16 +145,16 @@ const iconOptions = computed(() =>
:disabled="isDeletingConfig(config.id)" :disabled="isDeletingConfig(config.id)"
@click="emit('deleteConfig', config.id)" @click="emit('deleteConfig', config.id)"
> >
{{ isDeletingConfig(config.id) ? "Deleting..." : "Delete" }} {{ isDeletingConfig(config.id) ? "删除中..." : "删除" }}
</button> </button>
</div> </div>
<div class="config-meta"> <div class="config-meta">
<div class="config-meta-row"> <div class="config-meta-row">
<span class="config-label">Executable</span> <span class="config-label">可执行文件</span>
<p :title="config.executablePath">{{ config.executablePath || "Not resolved" }}</p> <p :title="config.executablePath">{{ config.executablePath || "未解析" }}</p>
</div> </div>
<div class="config-meta-row"> <div class="config-meta-row">
<span class="config-label">User Data</span> <span class="config-label">用户资料</span>
<p :title="config.userDataPath">{{ config.userDataPath }}</p> <p :title="config.userDataPath">{{ config.userDataPath }}</p>
</div> </div>
</div> </div>

View File

@@ -22,7 +22,7 @@ const emit = defineEmits<{
<aside class="sidebar"> <aside class="sidebar">
<div class="sidebar-toolbar"> <div class="sidebar-toolbar">
<div class="sidebar-title-group"> <div class="sidebar-title-group">
<h1>Browser Assistant</h1> <h1>浏览器助手</h1>
</div> </div>
<button class="refresh-icon-button" type="button" @click="emit('refresh')"> <button class="refresh-icon-button" type="button" @click="emit('refresh')">
<svg class="refresh-icon" viewBox="0 0 24 24" aria-hidden="true"> <svg class="refresh-icon" viewBox="0 0 24 24" aria-hidden="true">
@@ -35,7 +35,7 @@ const emit = defineEmits<{
stroke-width="2" stroke-width="2"
/> />
</svg> </svg>
<span class="sr-only">{{ loading || configsLoading ? "Refreshing..." : "Refresh" }}</span> <span class="sr-only">{{ loading || configsLoading ? "刷新中..." : "刷新" }}</span>
</button> </button>
</div> </div>
@@ -63,7 +63,7 @@ const emit = defineEmits<{
</div> </div>
<div v-else class="sidebar-empty"> <div v-else class="sidebar-empty">
<p>No supported Chromium browser data was found yet.</p> <p>暂未找到受支持的 Chromium 浏览器数据</p>
</div> </div>
<button <button
@@ -73,10 +73,10 @@ const emit = defineEmits<{
@click="emit('selectConfiguration')" @click="emit('selectConfiguration')"
> >
<div class="browser-nav-icon config-nav-icon"> <div class="browser-nav-icon config-nav-icon">
<img :src="configurationIconSrc" alt="Configuration icon" /> <img :src="configurationIconSrc" alt="配置图标" />
</div> </div>
<div class="browser-nav-body"> <div class="browser-nav-body">
<strong>Configuration</strong> <strong>配置</strong>
</div> </div>
</button> </button>
</aside> </aside>

View File

@@ -165,7 +165,7 @@ export function useBrowserManager() {
browserConfigs.value = result.configs; browserConfigs.value = result.configs;
} catch (loadError) { } catch (loadError) {
configError.value = configError.value =
loadError instanceof Error ? loadError.message : "Failed to load browser configs."; loadError instanceof Error ? loadError.message : "加载浏览器配置失败。";
} finally { } finally {
configsLoading.value = false; configsLoading.value = false;
} }
@@ -181,7 +181,7 @@ export function useBrowserManager() {
error.value = error.value =
scanError instanceof Error scanError instanceof Error
? scanError.message ? scanError.message
: "Failed to scan browser data."; : "扫描浏览器数据失败。";
} finally { } finally {
loading.value = false; loading.value = false;
} }
@@ -205,7 +205,7 @@ export function useBrowserManager() {
openProfileError.value = openProfileError.value =
openError instanceof Error openError instanceof Error
? openError.message ? openError.message
: "Failed to open the selected browser profile."; : "打开所选浏览器资料失败。";
} finally { } finally {
openingProfileKey.value = ""; openingProfileKey.value = "";
} }
@@ -229,7 +229,7 @@ export function useBrowserManager() {
await scanBrowsers(); await scanBrowsers();
} catch (saveError) { } catch (saveError) {
configError.value = configError.value =
saveError instanceof Error ? saveError.message : "Failed to create browser config."; saveError instanceof Error ? saveError.message : "创建浏览器配置失败。";
} finally { } finally {
savingConfig.value = false; savingConfig.value = false;
} }
@@ -247,7 +247,7 @@ export function useBrowserManager() {
await scanBrowsers(); await scanBrowsers();
} catch (deleteError) { } catch (deleteError) {
configError.value = configError.value =
deleteError instanceof Error ? deleteError.message : "Failed to delete browser config."; deleteError instanceof Error ? deleteError.message : "删除浏览器配置失败。";
} finally { } finally {
deletingConfigId.value = ""; deletingConfigId.value = "";
} }
@@ -348,7 +348,7 @@ export function useBrowserManager() {
if (!extension || !currentBrowser.value) return; if (!extension || !currentBrowser.value) return;
extensionModalSelectedProfileIds.value = []; extensionModalSelectedProfileIds.value = [];
associatedProfilesModal.value = { associatedProfilesModal.value = {
title: `${extension.name} Profiles`, title: extension.name,
browserId: currentBrowser.value.browserId, browserId: currentBrowser.value.browserId,
profiles: extension.profiles, profiles: extension.profiles,
isBookmark: false, isBookmark: false,
@@ -362,7 +362,7 @@ export function useBrowserManager() {
if (!bookmark || !currentBrowser.value) return; if (!bookmark || !currentBrowser.value) return;
bookmarkModalSelectedProfileIds.value = []; bookmarkModalSelectedProfileIds.value = [];
associatedProfilesModal.value = { associatedProfilesModal.value = {
title: `${bookmark.title} Profiles`, title: bookmark.title,
browserId: currentBrowser.value.browserId, browserId: currentBrowser.value.browserId,
profiles: bookmark.profiles, profiles: bookmark.profiles,
isBookmark: true, isBookmark: true,
@@ -374,7 +374,7 @@ export function useBrowserManager() {
const passwordSite = currentBrowser.value?.passwordSites.find((item) => item.url === url); const passwordSite = currentBrowser.value?.passwordSites.find((item) => item.url === url);
if (!passwordSite || !currentBrowser.value) return; if (!passwordSite || !currentBrowser.value) return;
associatedProfilesModal.value = { associatedProfilesModal.value = {
title: `${passwordSite.domain} Profiles`, title: passwordSite.domain,
browserId: currentBrowser.value.browserId, browserId: currentBrowser.value.browserId,
profiles: passwordSite.profiles, profiles: passwordSite.profiles,
isBookmark: false, isBookmark: false,
@@ -523,7 +523,7 @@ export function useBrowserManager() {
cleanupHistoryError.value = cleanupHistoryError.value =
cleanupErrorValue instanceof Error cleanupErrorValue instanceof Error
? cleanupErrorValue.message ? cleanupErrorValue.message
: "Failed to clean history files."; : "清理历史文件失败。";
historyCleanupResultOpen.value = true; historyCleanupResultOpen.value = true;
} finally { } finally {
historyCleanupBusy.value = false; historyCleanupBusy.value = false;
@@ -687,7 +687,7 @@ export function useBrowserManager() {
} else { } else {
associatedProfilesModal.value = { associatedProfilesModal.value = {
...associatedProfilesModal.value, ...associatedProfilesModal.value,
title: `${currentBookmark.title} Profiles`, title: currentBookmark.title,
profiles: currentBookmark.profiles, profiles: currentBookmark.profiles,
}; };
bookmarkModalSelectedProfileIds.value = bookmarkModalSelectedProfileIds.value.filter((id) => bookmarkModalSelectedProfileIds.value = bookmarkModalSelectedProfileIds.value.filter((id) =>
@@ -723,7 +723,7 @@ export function useBrowserManager() {
} catch (removeError) { } catch (removeError) {
resetBookmarkRemovalConfirmState(); resetBookmarkRemovalConfirmState();
bookmarkRemovalError.value = bookmarkRemovalError.value =
removeError instanceof Error ? removeError.message : "Failed to remove bookmarks."; removeError instanceof Error ? removeError.message : "删除书签失败。";
bookmarkRemovalResultOpen.value = true; bookmarkRemovalResultOpen.value = true;
} finally { } finally {
bookmarkDeleteBusy.value = false; bookmarkDeleteBusy.value = false;
@@ -932,7 +932,7 @@ export function useBrowserManager() {
} catch (removeError) { } catch (removeError) {
resetExtensionRemovalConfirmState(); resetExtensionRemovalConfirmState();
extensionRemovalError.value = extensionRemovalError.value =
removeError instanceof Error ? removeError.message : "Failed to remove extensions."; removeError instanceof Error ? removeError.message : "删除插件失败。";
extensionRemovalResultOpen.value = true; extensionRemovalResultOpen.value = true;
} finally { } finally {
extensionDeleteBusy.value = false; extensionDeleteBusy.value = false;