Skip to content

Commit

Permalink
fix: use api to read input value
Browse files Browse the repository at this point in the history
The internal dom structure was changed by nextcloud-libraries/nextcloud-vue#3517

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
  • Loading branch information
kesselb committed Feb 14, 2023
1 parent f84b6ef commit 89b3f9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/components/NavigationAccount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@
</template>
{{ t('mail', 'Add mailbox') }}
</ActionButton>
<ActionInput v-if="editing" @submit.prevent.stop="createMailbox">
<ActionInput
v-if="editing"
:value.sync="createMailboxName"
@submit.prevent.stop="createMailbox">
<template #icon>
<IconFolderAdd
:size="20" />
Expand Down Expand Up @@ -187,6 +190,7 @@ export default {
editing: false,
showSaving: false,
showSettings: false,
createMailboxName: '',
}
},
computed: {
Expand Down Expand Up @@ -228,7 +232,7 @@ export default {
methods: {
createMailbox(e) {
this.editing = true
const name = e.target.elements[1].value
const name = this.createMailboxName
logger.info('creating mailbox ' + name)
this.menuOpen = false
this.$store
Expand Down
8 changes: 6 additions & 2 deletions src/components/NavigationMailbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@
</template>
{{ t('mail', 'Add submailbox') }}
</ActionButton>
<ActionInput v-if="editing" @submit.prevent.stop="createMailbox">
<ActionInput
v-if="editing"
:value.sync="createMailboxName"
@submit.prevent.stop="createMailbox">
<template #icon>
<IconFolderAdd
:size="20" />
Expand Down Expand Up @@ -298,6 +301,7 @@ export default {
showMoveModal: false,
hasDelimiter: !!this.mailbox.delimiter,
UNIFIED_INBOX_ID,
createMailboxName: '',
}
},
computed: {
Expand Down Expand Up @@ -479,7 +483,7 @@ export default {

async createMailbox(e) {
this.editing = true
const name = e.target.elements[1].value
const name = this.createMailboxName
const withPrefix = this.mailbox.name + this.mailbox.delimiter + name
logger.info(`creating mailbox ${withPrefix} as submailbox of ${this.mailbox.databaseId}`)
this.menuOpen = false
Expand Down

0 comments on commit 89b3f9c

Please sign in to comment.