diff --git a/packages/client/src/store/ContextOptionsStore.js b/packages/client/src/store/ContextOptionsStore.js index 2075123937..8f377b2392 100644 --- a/packages/client/src/store/ContextOptionsStore.js +++ b/packages/client/src/store/ContextOptionsStore.js @@ -477,31 +477,47 @@ class ContextOptionsStore { } : false; + const onlyViewVersionHistory = + !contextOptions.includes("finalize-version") && + contextOptions.includes("show-version-history"); + + console.log(onlyViewVersionHistory); + const versionActions = !isMedia ? !isMobile && !isMobileUtils() && !isTabletUtils() - ? [ - { - key: "version", - label: t("VersionHistory"), - icon: "images/history-finalized.react.svg", - items: [ - { - key: "finalize-version", - label: t("FinalizeVersion"), - icon: "images/history-finalized.react.svg", - onClick: () => this.finalizeVersion(item.id), - disabled: false, - }, - { - key: "show-version-history", - label: t("ShowVersionHistory"), - icon: "images/history.react.svg", - onClick: () => this.showVersionHistory(item.id), - disabled: false, - }, - ], - }, - ] + ? onlyViewVersionHistory + ? [ + { + key: "show-version-history", + label: t("ShowVersionHistory"), + icon: "images/history.react.svg", + onClick: () => this.showVersionHistory(item.id), + disabled: false, + }, + ] + : [ + { + key: "version", + label: t("VersionHistory"), + icon: "images/history-finalized.react.svg", + items: [ + { + key: "finalize-version", + label: t("FinalizeVersion"), + icon: "images/history-finalized.react.svg", + onClick: () => this.finalizeVersion(item.id), + disabled: false, + }, + { + key: "show-version-history", + label: t("ShowVersionHistory"), + icon: "images/history.react.svg", + onClick: () => this.showVersionHistory(item.id), + disabled: false, + }, + ], + }, + ] : [ { key: "finalize-version",