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
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