Show apps for mailboxowners, which have recvmail addon

This commit is contained in:
Johannes Zellner
2025-09-25 08:56:35 +02:00
parent f16662bcc0
commit 7fd49be682
2 changed files with 11 additions and 7 deletions
+8 -4
View File
@@ -10,12 +10,14 @@ import { prettyDecimalSize } from '@cloudron/pankow/utils';
import { eachLimit } from 'async';
import Section from '../components/Section.vue';
import MailboxDialog from '../components/MailboxDialog.vue';
import AppsModel from '../models/AppsModel.js';
import DomainsModel from '../models/DomainsModel.js';
import MailModel from '../models/MailModel.js';
import GroupsModel from '../models/GroupsModel.js';
import UsersModel from '../models/UsersModel.js';
import MailboxesModel from '../models/MailboxesModel.js';
const appsModel = AppsModel.create();
const domainsModel = DomainsModel.create();
const mailModel = MailModel.create();
const groupsModel = GroupsModel.create();
@@ -72,6 +74,7 @@ const busy = ref(true);
const mailboxes = ref([]);
const mailboxesUsage = ref(0);
const domains = ref([]);
const apps = ref([]);
const users = ref([]);
const groups = ref([]);
const searchFilter = ref('');
@@ -182,17 +185,18 @@ onMounted(async () => {
let [error, result] = await domainsModel.list();
if (error) return console.error(error);
domains.value = result;
[error, result] = await appsModel.list();
if (error) return console.error(error);
apps.value = result.filter(a => !!a.manifest?.addons?.recvmail);
[error, result] = await usersModel.list();
if (error) return console.error(error);
users.value = result;
[error, result] = await groupsModel.list();
if (error) return console.error(error);
groups.value = result;
await refresh();
@@ -223,7 +227,7 @@ onMounted(async () => {
</div>
</Dialog>
<MailboxDialog ref="mailboxDialog" :users="users" :groups="groups" :domains="domains" @success="refresh()"/>
<MailboxDialog ref="mailboxDialog" :apps="apps" :users="users" :groups="groups" :domains="domains" @success="refresh()"/>
<Section :title="$t('email.incoming.mailboxes.title')">
<template #header-title-extra>