Skip to content

Commit afae72b

Browse files
authored
Merge pull request #35370 from nextcloud/fix/renaming-token
Fix UX of renaming token
2 parents b414f5e + 2b4f225 commit afae72b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

apps/settings/src/components/AuthToken.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
v-model="newName"
3232
type="text"
3333
@keyup.enter="rename"
34-
@blur="cancelRename"
34+
@change="rename"
3535
@keyup.esc="cancelRename">
3636
<span v-else>{{ iconName.name }}</span>
3737
<span v-if="wiping" class="wiping-warning">({{ t('settings', 'Marked for remote wipe') }})</span>
@@ -173,6 +173,7 @@ export default {
173173
showMore: this.token.canScope || this.token.canDelete,
174174
renaming: false,
175175
newName: '',
176+
oldName: '',
176177
actionOpen: false,
177178
}
178179
},
@@ -232,6 +233,7 @@ export default {
232233
// Close action (popover menu)
233234
this.actionOpen = false
234235
236+
this.oldName = this.token.name
235237
this.newName = this.token.name
236238
this.renaming = true
237239
this.$nextTick(() => {
@@ -240,6 +242,7 @@ export default {
240242
},
241243
cancelRename() {
242244
this.renaming = false
245+
this.$emit('rename', this.token, this.oldName)
243246
},
244247
revoke() {
245248
this.actionOpen = false

0 commit comments

Comments
 (0)