aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src/components/FileEntry/FileEntryName.vue
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/src/components/FileEntry/FileEntryName.vue')
-rw-r--r--apps/files/src/components/FileEntry/FileEntryName.vue17
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/files/src/components/FileEntry/FileEntryName.vue b/apps/files/src/components/FileEntry/FileEntryName.vue
index fdd3c215a98..5e9036ad63d 100644
--- a/apps/files/src/components/FileEntry/FileEntryName.vue
+++ b/apps/files/src/components/FileEntry/FileEntryName.vue
@@ -37,7 +37,7 @@
</template>
<script lang="ts">
-import type { Node, View } from '@nextcloud/files'
+import type { Node } from '@nextcloud/files'
import type { PropType } from 'vue'
import { showError, showSuccess } from '@nextcloud/dialogs'
@@ -46,10 +46,11 @@ import { FileType, NodeStatus, Permission } from '@nextcloud/files'
import { loadState } from '@nextcloud/initial-state'
import { translate as t } from '@nextcloud/l10n'
import axios, { isAxiosError } from '@nextcloud/axios'
-import Vue, { defineComponent } from 'vue'
+import { defineComponent } from 'vue'
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
+import { useNavigation } from '../../composables/useNavigation'
import { useRenamingStore } from '../../store/renaming.ts'
import logger from '../../logger.js'
@@ -90,17 +91,17 @@ export default defineComponent({
},
setup() {
+ const { currentView } = useNavigation()
const renamingStore = useRenamingStore()
+
return {
+ currentView,
+
renamingStore,
}
},
computed: {
- currentView(): View {
- return this.$navigation.active as View
- },
-
isRenaming() {
return this.renamingStore.renamingNode === this.source
},
@@ -282,7 +283,7 @@ export default defineComponent({
}
// Set loading state
- Vue.set(this.source, 'status', NodeStatus.LOADING)
+ this.$set(this.source, 'status', NodeStatus.LOADING)
// Update node
this.source.rename(newName)
@@ -327,7 +328,7 @@ export default defineComponent({
// Unknown error
showError(t('files', 'Could not rename "{oldName}"', { oldName }))
} finally {
- Vue.set(this.source, 'status', undefined)
+ this.$set(this.source, 'status', undefined)
}
},