Skip to content

Commit

Permalink
Inform users why some actions for histories might be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed May 27, 2024
1 parent a8db810 commit 23bb000
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions client/src/components/History/CurrentHistory/HistoryNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ const canEditHistory = computed(() => {
return canMutateHistory(props.history);
});
const historyState = computed(() => {
if (props.history.purged) {
return "purged";
} else if (props.history.deleted) {
return "deleted";
} else if (props.history.archived) {
return "archived";
} else {
return "active";
}
});
function onDelete() {
if (purgeHistory.value) {
historyStore.deleteHistory(props.history.id, true);
Expand Down Expand Up @@ -164,6 +176,14 @@ function userTitle(title: string) {

<BDropdownDivider />

<BDropdownText v-if="!canEditHistory">
This history has been <span class="font-weight-bold">{{ historyState }}</span
>.
<span v-localize>Some actions might not be available.</span>
</BDropdownText>

<BDropdownDivider v-if="!canEditHistory" />

<BDropdownItem
:disabled="!canEditHistory"
:title="localize('Resume all Paused Jobs in this History')"
Expand Down

0 comments on commit 23bb000

Please sign in to comment.