Skip to content

Commit

Permalink
Add the posibility to move mailboxes
Browse files Browse the repository at this point in the history
Signed-off-by: GretaD <gretadoci@gmail.com>
  • Loading branch information
GretaD committed Oct 26, 2020
1 parent aee5b07 commit b5db39d
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/components/NavigationMailbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@
<ActionText v-if="showSaving" icon="icon-loading-small">
{{ t('mail', 'Saving') }}
</ActionText>

<ActionButton v-if="!account.isUnified && !mailbox.specialRole"
icon="icon-external"
:close-after-click="true"
@click.prevent="onOpenMoveModal">
{{ t('mail', 'Move') }}
</ActionButton>
<ActionButton
v-if="debug && !account.isUnified && mailbox.specialRole !== 'flagged'"
icon="icon-settings"
Expand Down Expand Up @@ -105,7 +110,10 @@
<AppNavigationCounter v-if="mailbox.unread" slot="counter">
{{ mailbox.unread }}
</AppNavigationCounter>

<MoveModal v-if="showMoveModal"
:account="account"
:envelopes="[]"
@close="onCloseMoveModal" />
<!-- submailboxes -->
<NavigationMailbox
v-for="subMailbox in subMailboxes"
Expand All @@ -123,6 +131,7 @@ import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import ActionCheckbox from '@nextcloud/vue/dist/Components/ActionCheckbox'
import ActionInput from '@nextcloud/vue/dist/Components/ActionInput'
import ActionText from '@nextcloud/vue/dist/Components/ActionText'
import MoveModal from './MoveModal'

import { clearCache } from '../service/MessageService'
import { getMailboxStatus } from '../service/MailboxService'
Expand All @@ -140,6 +149,7 @@ export default {
ActionButton,
ActionCheckbox,
ActionInput,
MoveModal,
},
props: {
account: {
Expand Down Expand Up @@ -175,6 +185,7 @@ export default {
renameLabel: true,
renameInput: false,
mailboxName: this.mailbox.displayName,
showMoveModal: false,

}
},
Expand Down Expand Up @@ -424,6 +435,12 @@ export default {
this.renameInput = true
this.showSaving = false
},
onOpenMoveModal() {
this.showMoveModal = true
},
onCloseMoveModal() {
this.showMoveModal = false
},
},
}
</script>

0 comments on commit b5db39d

Please sign in to comment.