aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src/components/FileEntry/FileEntryName.vue
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-02-22 13:25:18 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2025-02-25 02:16:56 +0100
commite712104e58db906d8d0859d2f920c74b78825089 (patch)
tree1d6c5ce3cb023081a0e80258b4f29a466d2a75cd /apps/files/src/components/FileEntry/FileEntryName.vue
parentb0653e956c4a2751b1ff7f1660c1369c7d73a747 (diff)
downloadnextcloud-server-e712104e58db906d8d0859d2f920c74b78825089.tar.gz
nextcloud-server-e712104e58db906d8d0859d2f920c74b78825089.zip
feat(files): allow to ignore warning to change file type
* Missing pieces of https://github.com/nextcloud/server/issues/46528 * Add checkbox to not show this dialog again * Add user config as suggested by designers in files settings to reenable or diable this behavior. * Fix behavior of dialog: It says "keep .ext" but it does not keep the extension but cancels the operation. From the button label the user expects that the operation is continued but with the old extension. * Added more test coverage by adding component tests. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files/src/components/FileEntry/FileEntryName.vue')
-rw-r--r--apps/files/src/components/FileEntry/FileEntryName.vue13
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/files/src/components/FileEntry/FileEntryName.vue b/apps/files/src/components/FileEntry/FileEntryName.vue
index bc6b61ad54c..2fec9e5d556 100644
--- a/apps/files/src/components/FileEntry/FileEntryName.vue
+++ b/apps/files/src/components/FileEntry/FileEntryName.vue
@@ -23,7 +23,6 @@
<component :is="linkTo.is"
v-else
ref="basename"
- :aria-hidden="isRenaming"
class="files-list__row-name-link"
data-cy-files-list-row-name-link
v-bind="linkTo.params">
@@ -117,11 +116,11 @@ export default defineComponent({
return this.isRenaming && this.filesListWidth < 512
},
newName: {
- get() {
- return this.renamingStore.newName
+ get(): string {
+ return this.renamingStore.newNodeName
},
- set(newName) {
- this.renamingStore.newName = newName
+ set(newName: string) {
+ this.renamingStore.newNodeName = newName
},
},
@@ -249,7 +248,9 @@ export default defineComponent({
try {
const status = await this.renamingStore.rename()
if (status) {
- showSuccess(t('files', 'Renamed "{oldName}" to "{newName}"', { oldName, newName }))
+ showSuccess(
+ t('files', 'Renamed "{oldName}" to "{newName}"', { oldName, newName: this.source.basename }),
+ )
this.$nextTick(() => {
const nameContainer = this.$refs.basename as HTMLElement | undefined
nameContainer?.focus()