From ad838086ed0bdc79ffe88610b229bf978e577c57 Mon Sep 17 00:00:00 2001 From: Julian Freeman Date: Fri, 17 Apr 2026 13:56:38 -0400 Subject: [PATCH] fix clean history ui --- src/App.vue | 10 + .../browser-data/BrowserDataView.vue | 30 ++- .../browser-data/HistoryCleanupList.vue | 143 ++++++++----- .../browser-data/HistoryCleanupModal.vue | 198 ++++++++++++++++++ src/composables/useBrowserManager.ts | 103 +++++++-- 5 files changed, 414 insertions(+), 70 deletions(-) create mode 100644 src/components/browser-data/HistoryCleanupModal.vue diff --git a/src/App.vue b/src/App.vue index c0c23fa..16c08f3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -21,12 +21,17 @@ const { cleanupHistoryResults, cleanupHistorySelectedProfiles, cleanupSelectedHistoryProfiles, + closeHistoryCleanupConfirm, + closeHistoryCleanupResult, + confirmHistoryCleanup, currentBrowser, deleteCustomBrowserConfig, error, extensionMonogram, extensionSortKey, historyCleanupBusy, + historyCleanupConfirmProfiles, + historyCleanupResultOpen, isDeletingConfig, isOpeningProfile, loading, @@ -119,6 +124,8 @@ const { :sorted-password-sites="sortedPasswordSites" :history-selected-profile-ids="cleanupHistorySelectedProfiles" :cleanup-history-busy="historyCleanupBusy" + :history-cleanup-confirm-profiles="historyCleanupConfirmProfiles" + :history-cleanup-result-open="historyCleanupResultOpen" :cleanup-history-error="cleanupHistoryError" :cleanup-history-results="cleanupHistoryResults" :open-profile-error="openProfileError" @@ -139,6 +146,9 @@ const { @toggle-all-history-profiles="toggleAllHistoryProfiles" @cleanup-selected-history="cleanupSelectedHistoryProfiles" @cleanup-history-for-profile="cleanupHistoryForProfile" + @confirm-history-cleanup="confirmHistoryCleanup" + @close-history-cleanup-confirm="closeHistoryCleanupConfirm" + @close-history-cleanup-result="closeHistoryCleanupResult" @close-associated-profiles="closeAssociatedProfilesModal" /> diff --git a/src/components/browser-data/BrowserDataView.vue b/src/components/browser-data/BrowserDataView.vue index b8facb3..c57fd93 100644 --- a/src/components/browser-data/BrowserDataView.vue +++ b/src/components/browser-data/BrowserDataView.vue @@ -14,6 +14,7 @@ import AssociatedProfilesModal from "./AssociatedProfilesModal.vue"; import BookmarksList from "./BookmarksList.vue"; import ExtensionsList from "./ExtensionsList.vue"; import HistoryCleanupList from "./HistoryCleanupList.vue"; +import HistoryCleanupModal from "./HistoryCleanupModal.vue"; import PasswordSitesList from "./PasswordSitesList.vue"; import ProfilesList from "./ProfilesList.vue"; @@ -30,6 +31,8 @@ defineProps<{ sortedPasswordSites: BrowserView["passwordSites"]; historySelectedProfileIds: string[]; cleanupHistoryBusy: boolean; + historyCleanupConfirmProfiles: BrowserView["profiles"]; + historyCleanupResultOpen: boolean; cleanupHistoryError: string; cleanupHistoryResults: CleanupHistoryResult[]; openProfileError: string; @@ -58,6 +61,9 @@ const emit = defineEmits<{ toggleAllHistoryProfiles: []; cleanupSelectedHistory: []; cleanupHistoryForProfile: [profileId: string]; + confirmHistoryCleanup: []; + closeHistoryCleanupConfirm: []; + closeHistoryCleanupResult: []; closeAssociatedProfiles: []; }>(); @@ -151,13 +157,10 @@ const emit = defineEmits<{ + + + + import { computed } from "vue"; -import type { - CleanupHistoryResult, - CleanupFileStatus, - ProfileSummary, -} from "../../types/browser"; +import type { CleanupFileStatus, ProfileSummary } from "../../types/browser"; import { profileAvatarSrc } from "../../utils/icons"; const props = defineProps<{ - browserId: string; browserFamilyId: string | null; profiles: ProfileSummary[]; selectedProfileIds: string[]; cleanupBusy: boolean; - cleanupError: string; - cleanupResults: CleanupHistoryResult[]; }>(); const emit = defineEmits<{ @@ -69,36 +62,20 @@ function hasAnyHistoryFile(statuses: CleanupFileStatus[]) {