Loading client/src/components/History/Content/ContentItem.vue +6 −1 Original line number Diff line number Diff line Loading @@ -41,11 +41,16 @@ <span>:</span> <span class="content-title name">{{ name }}</span> </span> <span v-if="item.purged" class="align-self-start btn-group p-1"> <b-badge variant="secondary" title="This dataset has been permanently deleted"> <icon icon="burn" /> Purged </b-badge> </span> <ContentOptions v-else :is-dataset="isDataset" :is-deleted="item.deleted" :is-history-item="isHistoryItem" :is-purged="item.purged" :is-visible="item.visible" :state="state" @delete="$emit('delete')" Loading client/src/components/History/Content/ContentOptions.vue +2 −11 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ title="Delete" size="sm" variant="link" :disabled="isPurged" @click.stop="$emit('delete')"> <icon icon="trash" /> </b-button> Loading @@ -36,7 +35,6 @@ title="Undelete" size="sm" variant="link" :disabled="isPurged" @click.stop="$emit('undelete')"> <icon icon="trash-restore" /> </b-button> Loading @@ -58,34 +56,27 @@ export default { isDataset: { type: Boolean, required: true }, isDeleted: { type: Boolean, default: false }, isHistoryItem: { type: Boolean, required: true }, isPurged: { type: Boolean, default: false }, isVisible: { type: Boolean, default: true }, state: { type: String, default: "" }, }, computed: { displayButtonTitle() { if (this.isPurged) { return "Cannot display datasets removed from disk."; } if (this.displayDisabled) { return "This dataset is not yet viewable."; } return "Display"; }, displayDisabled() { return this.isPurged || ["discarded", "new", "upload"].includes(this.state); return ["discarded", "new", "upload"].includes(this.state); }, editButtonTitle() { if (this.isPurged) { return "Cannot edit attributes of datasets removed from disk."; } if (this.editDisabled) { return "This dataset is not yet editable."; } return "Edit attributes"; }, editDisabled() { return this.isPurged || ["discarded", "new", "upload", "queued", "running", "waiting"].includes(this.state); return ["discarded", "new", "upload", "queued", "running", "waiting"].includes(this.state); }, }, }; Loading Loading
client/src/components/History/Content/ContentItem.vue +6 −1 Original line number Diff line number Diff line Loading @@ -41,11 +41,16 @@ <span>:</span> <span class="content-title name">{{ name }}</span> </span> <span v-if="item.purged" class="align-self-start btn-group p-1"> <b-badge variant="secondary" title="This dataset has been permanently deleted"> <icon icon="burn" /> Purged </b-badge> </span> <ContentOptions v-else :is-dataset="isDataset" :is-deleted="item.deleted" :is-history-item="isHistoryItem" :is-purged="item.purged" :is-visible="item.visible" :state="state" @delete="$emit('delete')" Loading
client/src/components/History/Content/ContentOptions.vue +2 −11 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ title="Delete" size="sm" variant="link" :disabled="isPurged" @click.stop="$emit('delete')"> <icon icon="trash" /> </b-button> Loading @@ -36,7 +35,6 @@ title="Undelete" size="sm" variant="link" :disabled="isPurged" @click.stop="$emit('undelete')"> <icon icon="trash-restore" /> </b-button> Loading @@ -58,34 +56,27 @@ export default { isDataset: { type: Boolean, required: true }, isDeleted: { type: Boolean, default: false }, isHistoryItem: { type: Boolean, required: true }, isPurged: { type: Boolean, default: false }, isVisible: { type: Boolean, default: true }, state: { type: String, default: "" }, }, computed: { displayButtonTitle() { if (this.isPurged) { return "Cannot display datasets removed from disk."; } if (this.displayDisabled) { return "This dataset is not yet viewable."; } return "Display"; }, displayDisabled() { return this.isPurged || ["discarded", "new", "upload"].includes(this.state); return ["discarded", "new", "upload"].includes(this.state); }, editButtonTitle() { if (this.isPurged) { return "Cannot edit attributes of datasets removed from disk."; } if (this.editDisabled) { return "This dataset is not yet editable."; } return "Edit attributes"; }, editDisabled() { return this.isPurged || ["discarded", "new", "upload", "queued", "running", "waiting"].includes(this.state); return ["discarded", "new", "upload", "queued", "running", "waiting"].includes(this.state); }, }, }; Loading