Unverified Commit 3a35c820 authored by Martin Cech's avatar Martin Cech Committed by GitHub
Browse files

Merge pull request #17980 from dannon/history-import-feedback

[24.0] History import - show user feedback on completion.
parents 8596522d 136ae754
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@
            <b-button
                v-if="userOwnsHistory"
                size="sm"
                variant="outline-info"
                :title="setAsCurrentTitle"
                :disabled="isSetAsCurrentDisabled"
                data-description="switch to history button"
@@ -20,13 +19,14 @@
                v-if="canImportHistory"
                v-b-modal:copy-history-modal
                size="sm"
                variant="outline-info"
                title="Import this history"
                data-description="import history button">
                Import this history
            </b-button>
        </div>

        <b-alert :show="copySuccess"> History imported and set to your active history. </b-alert>

        <CollectionPanel
            v-if="selectedCollections.length && selectedCollections[0].history_id == id"
            :history="history"
@@ -40,7 +40,7 @@
            filterable
            @view-collection="onViewCollection" />

        <CopyModal id="copy-history-modal" :history="history" />
        <CopyModal id="copy-history-modal" :history="history" @ok="copyOkay" />
    </div>
</template>

@@ -69,6 +69,7 @@ export default {
    data() {
        return {
            selectedCollections: [],
            copySuccess: false,
        };
    },
    computed: {
@@ -129,6 +130,9 @@ export default {
        onViewCollection(collection) {
            this.selectedCollections = [...this.selectedCollections, collection];
        },
        copyOkay() {
            this.copySuccess = true;
        },
    },
};
</script>