diff --git a/client/src/components/History/CurrentHistory/HistoryNavigation.vue b/client/src/components/History/CurrentHistory/HistoryNavigation.vue index e433f5a5738..7b31df06ecf 100644 --- a/client/src/components/History/CurrentHistory/HistoryNavigation.vue +++ b/client/src/components/History/CurrentHistory/HistoryNavigation.vue @@ -30,9 +30,9 @@ import { BSpinner, } from "bootstrap-vue"; import { storeToRefs } from "pinia"; -import { ref } from "vue"; +import { computed, ref } from "vue"; -import type { HistorySummary } from "@/api"; +import { canMutateHistory, type HistorySummary } from "@/api"; import { iframeRedirect } from "@/components/plugins/legacyNavigation"; import { useHistoryStore } from "@/stores/historyStore"; import { useUserStore } from "@/stores/userStore"; @@ -80,6 +80,10 @@ const historyStore = useHistoryStore(); const { isAnonymous } = storeToRefs(userStore); const { totalHistoryCount } = storeToRefs(historyStore); +const canEditHistory = computed(() => { + return canMutateHistory(props.history); +}); + function onDelete() { if (purgeHistory.value) { historyStore.deleteHistory(props.history.id, true); @@ -161,6 +165,7 @@ function userTitle(title: string) { @@ -198,7 +203,7 @@ function userTitle(title: string) { @@ -225,7 +230,7 @@ function userTitle(title: string) { @@ -234,7 +239,7 @@ function userTitle(title: string) { @@ -243,7 +248,7 @@ function userTitle(title: string) { Make Private