Skip to content
Merged
Show file tree
Hide file tree
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
Fix UX of renaming token
Now this get's instant applied and escaping will reset to the previous
state

Signed-off-by: Carl Schwan <[email protected]>
  • Loading branch information
CarlSchwan authored and backportbot-nextcloud[bot] committed Nov 24, 2022
commit ba9eb1308de716c7fdfa531a49131b468ca699f9
5 changes: 4 additions & 1 deletion apps/settings/src/components/AuthToken.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
v-model="newName"
type="text"
@keyup.enter="rename"
@blur="cancelRename"
@change="rename"
@keyup.esc="cancelRename">
<span v-else>{{ iconName.name }}</span>
<span v-if="wiping" class="wiping-warning">({{ t('settings', 'Marked for remote wipe') }})</span>
Expand Down Expand Up @@ -173,6 +173,7 @@ export default {
showMore: this.token.canScope || this.token.canDelete,
renaming: false,
newName: '',
oldName: '',
actionOpen: false,
}
},
Expand Down Expand Up @@ -232,6 +233,7 @@ export default {
// Close action (popover menu)
this.actionOpen = false

this.oldName = this.token.name
this.newName = this.token.name
this.renaming = true
this.$nextTick(() => {
Expand All @@ -240,6 +242,7 @@ export default {
},
cancelRename() {
this.renaming = false
this.$emit('rename', this.token, this.oldName)
},
revoke() {
this.actionOpen = false
Expand Down
Loading