add remove sessions
This commit is contained in:
@@ -23,6 +23,7 @@ const selectableProfiles = computed(() =>
|
||||
profile.historyCleanup.history,
|
||||
profile.historyCleanup.topSites,
|
||||
profile.historyCleanup.visitedLinks,
|
||||
profile.historyCleanup.sessions,
|
||||
]),
|
||||
),
|
||||
);
|
||||
@@ -52,6 +53,7 @@ function isSelectable(profile: ProfileSummary) {
|
||||
profile.historyCleanup.history,
|
||||
profile.historyCleanup.topSites,
|
||||
profile.historyCleanup.visitedLinks,
|
||||
profile.historyCleanup.sessions,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -96,6 +98,7 @@ function hasAnyHistoryFile(statuses: CleanupFileStatus[]) {
|
||||
<div class="header-cell">History</div>
|
||||
<div class="header-cell">Top Sites</div>
|
||||
<div class="header-cell">Visited Links</div>
|
||||
<div class="header-cell">Sessions</div>
|
||||
<div class="header-cell actions-cell">Action</div>
|
||||
</div>
|
||||
<div class="data-table-body styled-scrollbar">
|
||||
@@ -143,6 +146,11 @@ function hasAnyHistoryFile(statuses: CleanupFileStatus[]) {
|
||||
{{ statusLabel(profile.historyCleanup.visitedLinks) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="row-cell">
|
||||
<span class="status-pill" :class="statusClass(profile.historyCleanup.sessions)">
|
||||
{{ statusLabel(profile.historyCleanup.sessions) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="row-cell actions-cell">
|
||||
<button
|
||||
class="danger-button action-button"
|
||||
@@ -284,7 +292,7 @@ function hasAnyHistoryFile(statuses: CleanupFileStatus[]) {
|
||||
|
||||
.history-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 52px 56px minmax(170px, 1fr) 118px 118px 128px 108px;
|
||||
grid-template-columns: 52px 56px minmax(170px, 1fr) 118px 118px 128px 118px 108px;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -401,7 +409,7 @@ function hasAnyHistoryFile(statuses: CleanupFileStatus[]) {
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.history-grid {
|
||||
grid-template-columns: 52px 56px minmax(160px, 1fr) 110px 110px 118px 100px;
|
||||
grid-template-columns: 52px 56px minmax(160px, 1fr) 110px 110px 118px 110px 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,7 +425,8 @@ function hasAnyHistoryFile(statuses: CleanupFileStatus[]) {
|
||||
|
||||
.history-grid > :nth-child(5),
|
||||
.history-grid > :nth-child(6),
|
||||
.history-grid > :nth-child(7) {
|
||||
.history-grid > :nth-child(7),
|
||||
.history-grid > :nth-child(8) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ const emit = defineEmits<{
|
||||
<template v-if="mode === 'confirm'">
|
||||
<p class="modal-copy">
|
||||
The selected profiles will have <code>History</code>, <code>Top Sites</code>, and
|
||||
<code>Visited Links</code> removed.
|
||||
<code>Visited Links</code> removed, and all files inside <code>Sessions</code> cleared.
|
||||
</p>
|
||||
|
||||
<div class="profile-list styled-scrollbar">
|
||||
|
||||
@@ -352,7 +352,8 @@ export function useBrowserManager() {
|
||||
return (
|
||||
cleanup.history === "found" ||
|
||||
cleanup.topSites === "found" ||
|
||||
cleanup.visitedLinks === "found"
|
||||
cleanup.visitedLinks === "found" ||
|
||||
cleanup.sessions === "found"
|
||||
);
|
||||
})
|
||||
.map((profile) => profile.id);
|
||||
@@ -373,7 +374,8 @@ export function useBrowserManager() {
|
||||
return (
|
||||
cleanup.history === "found" ||
|
||||
cleanup.topSites === "found" ||
|
||||
cleanup.visitedLinks === "found"
|
||||
cleanup.visitedLinks === "found" ||
|
||||
cleanup.sessions === "found"
|
||||
);
|
||||
})
|
||||
.map((profile) => profile.id);
|
||||
@@ -430,6 +432,9 @@ export function useBrowserManager() {
|
||||
if (deletedFiles.includes("Visited Links")) {
|
||||
profile.historyCleanup.visitedLinks = "missing";
|
||||
}
|
||||
if (deletedFiles.includes("Sessions")) {
|
||||
profile.historyCleanup.sessions = "missing";
|
||||
}
|
||||
}
|
||||
|
||||
browser.stats.historyCleanupProfileCount = cleanupProfileIdsWithHistory(browser).length;
|
||||
|
||||
@@ -46,6 +46,7 @@ export type HistoryCleanupSummary = {
|
||||
history: CleanupFileStatus;
|
||||
topSites: CleanupFileStatus;
|
||||
visitedLinks: CleanupFileStatus;
|
||||
sessions: CleanupFileStatus;
|
||||
};
|
||||
|
||||
export type CleanupFileStatus = "found" | "missing";
|
||||
|
||||
Reference in New Issue
Block a user