diff --git a/client/src/components/History/CurrentHistory/HistoryNavigation.vue b/client/src/components/History/CurrentHistory/HistoryNavigation.vue index 79e730bd4faa..1caa443ec266 100644 --- a/client/src/components/History/CurrentHistory/HistoryNavigation.vue +++ b/client/src/components/History/CurrentHistory/HistoryNavigation.vue @@ -24,6 +24,7 @@ import { BDropdownDivider, BDropdownItem, BDropdownText, + BFormCheckbox, BModal, BSpinner, } from "bootstrap-vue"; @@ -63,12 +64,13 @@ interface Props { historiesLoading?: boolean; } -withDefaults(defineProps(), { +const props = withDefaults(defineProps(), { title: "Histories", historiesLoading: false, }); const showSwitchModal = ref(false); +const purgeHistory = ref(false); const userStore = useUserStore(); const historyStore = useHistoryStore(); @@ -76,6 +78,14 @@ const historyStore = useHistoryStore(); const { isAnonymous } = storeToRefs(userStore); const { totalHistoryCount } = storeToRefs(historyStore); +function onDelete() { + if (purgeHistory.value) { + historyStore.deleteHistory(props.history.id, true); + } else { + historyStore.deleteHistory(props.history.id, false); + } +} + function userTitle(title: string) { if (isAnonymous.value) { return localize("Log in to") + " " + localize(title); @@ -264,16 +274,14 @@ function userTitle(title: string) { id="delete-history-modal" title="Delete History?" title-tag="h2" - @ok="historyStore.deleteHistory(history.id, false)"> -

Really delete the current history?

- - - -

Really delete the current history permanently? This cannot be undone.

+ @ok="onDelete" + @show="purgeHistory = false"> +

+ Do you also want to permanently delete the history {{ history.name }} +

+ + Yes, permanently delete this history. +