Commit db2e25f2 authored by davelopez's avatar davelopez
Browse files

Remove unused `isPurged` prop in ContentOptions

parent bdb7f889
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@
                    :is-dataset="isDataset"
                    :is-deleted="item.deleted"
                    :is-history-item="isHistoryItem"
                    :is-purged="item.purged"
                    :is-visible="item.visible"
                    :state="state"
                    @delete="$emit('delete')"
+2 −11
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
            title="Delete"
            size="sm"
            variant="link"
            :disabled="isPurged"
            @click.stop="$emit('delete')">
            <icon icon="trash" />
        </b-button>
@@ -36,7 +35,6 @@
            title="Undelete"
            size="sm"
            variant="link"
            :disabled="isPurged"
            @click.stop="$emit('undelete')">
            <icon icon="trash-restore" />
        </b-button>
@@ -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);
        },
    },
};