-
Notifications
You must be signed in to change notification settings - Fork 269
/
Copy pathActionFileinto.vue
56 lines (54 loc) · 1.11 KB
/
ActionFileinto.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!--
- SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<MailboxInlinePicker v-model="selectedMailbox" :account="account" />
</template>
<script>
import { mapStores } from 'pinia'
import useMainStore from '../../store/mainStore.js'
import MailboxInlinePicker from '../MailboxInlinePicker.vue'
import logger from '../../logger.js'
export default {
name: 'ActionFileinto',
components: {
MailboxInlinePicker,
},
props: {
action: {
type: Object,
required: true,
},
account: {
type: Object,
required: true,
},
},
data() {
return {
currentSelectedMailboxId: null,
}
},
computed: {
...mapStores(useMainStore),
mailbox() {
return this.action.mailbox ?? undefined
},
selectedMailbox: {
get() {
return this.currentSelectedMailboxId
},
set(selectedMailboxId) {
logger.debug('Selected mailbox set to', selectedMailboxId)
this.currentSelectedMailboxId = selectedMailboxId
},
},
},
methods: {
onInput(value) {
this.$emit('update-action', { mailbox: value })
},
},
}
</script>