Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@
<!-- footer buttons -->
<template #bottom>
<VSpacer />
<KCircularLoader v-if="moveHereButtonDisabled && moveNodesInProgress" :size="20" />
<VBtn flat exact data-test="cancel" @click="dialog = false">
{{ $tr("cancel") }}
</VBtn>
<VBtn
color="primary"
data-test="move"
:disabled="!movingFromTrash && currentLocationId === targetNodeId"
:disabled="moveHereButtonDisabled"
@click="moveNodes"
>
{{ $tr("moveHere") }}
Expand Down Expand Up @@ -179,6 +180,7 @@
return {
showNewTopicModal: false,
loading: false,
moveNodesInProgress: false,
targetNodeId: null,
previewNodeId: null,
};
Expand All @@ -202,6 +204,14 @@
moveHeader() {
return this.$tr('moveItems', this.getTopicAndResourceCounts(this.moveNodeIds));
},
moveHereButtonDisabled() {
if (this.moveNodesInProgress) {
return true;
} else if (!this.movingFromTrash && this.currentLocationId === this.targetNodeId) {
return true;
}
return false;
},
currentLocationId() {
// If opening modal from inside TrashModal, begin navigation at root node
if (this.movingFromTrash) {
Expand Down Expand Up @@ -271,6 +281,7 @@
});
},
moveNodes() {
this.moveNodesInProgress = true;
this.$emit('target', this.targetNodeId);
},
/*
Expand All @@ -284,6 +295,7 @@
actionText: this.$tr('goToLocationButton'),
actionCallback: this.goToLocation,
});
this.moveNodesInProgress = false;
},
},
$trs: {
Expand Down