feat: move and delete

Signed-off-by: Sebastian <krupinski01@gmail.com>
This commit is contained in:
2026-04-16 20:36:25 -04:00
parent 509fbc2480
commit 31a9ab419c
5 changed files with 274 additions and 285 deletions

View File

@@ -23,7 +23,7 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits<{
'update:modelValue': [value: boolean]
select: [folder: CollectionObject]
select: [target: CollectionObject]
cancel: []
}>()
@@ -50,16 +50,13 @@ interface ServiceGroup {
}
const serviceGroups = computed<ServiceGroup[]>(() => {
const moveCandidate = mailStore.moveMessageCandidates[0]
const context = mailStore.moveDialogService
if (!moveCandidate) {
if (!context) {
return []
}
const service = servicesStore.services.find(entry =>
entry.provider === moveCandidate.provider &&
String(entry.identifier) === String(moveCandidate.service),
)
const service = servicesStore.serviceByIdentifier(mailStore.moveDialogService)
if (!service) {
return []
@@ -111,7 +108,7 @@ const canConfirm = computed(() => {
})
watch(
() => [props.modelValue, mailStore.moveMessageCandidates],
() => [props.modelValue, mailStore.moveDialogService],
([isOpen]) => {
if (!isOpen) {
return