From 65435b526cb0f7cf7a57c3602233455d790265d5 Mon Sep 17 00:00:00 2001 From: Sebastian Krupinski Date: Wed, 25 Feb 2026 00:18:28 -0500 Subject: [PATCH] refactor: standardize manager design Signed-off-by: Sebastian Krupinski --- src/main.ts | 23 ++++++----------------- src/models/collection.ts | 17 +++-------------- src/models/provider.ts | 2 +- 3 files changed, 10 insertions(+), 32 deletions(-) diff --git a/src/main.ts b/src/main.ts index 47e9d78..7dc32b8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,17 +1,13 @@ -import type { App as Vue } from 'vue' +/** + * Mail Manager Module Boot + */ + import routes from '@/routes' import integrations from '@/integrations' -/** - * Mail Manager Module Boot Script - * - * This script is executed when the mail_manager module is loaded. - * It initializes the stores which manage mail providers, services, collections, and messages. - */ +console.log('[Mail Manager] Booting module...') -console.log('[MailManager] Booting Mail Manager module...') - -console.log('[MailManager] Mail Manager module booted successfully') +console.log('[Mail Manager] Module booted successfully...') // CSS will be injected by build process export const css = ['__CSS_FILENAME_PLACEHOLDER__'] @@ -30,10 +26,3 @@ export { useMailSync } from '@/composables/useMailSync' // Export components for external use export { default as AddAccountDialog } from '@/components/AddAccountDialog.vue' export { default as EditAccountDialog } from '@/components/EditAccountDialog.vue' - -// Default export for Vue plugin installation -export default { - install(app: Vue) { - // Module initialization if needed - } -} diff --git a/src/models/collection.ts b/src/models/collection.ts index 08f68a9..6cda4a8 100644 --- a/src/models/collection.ts +++ b/src/models/collection.ts @@ -17,16 +17,7 @@ export class CollectionObject implements CollectionInterface { signature: null, created: null, modified: null, - properties: { - '@type': 'mail.collection', - version: 1, - total: 0, - unread: 0, - label: '', - role: null, - rank: 0, - subscribed: true, - }, + properties: new CollectionPropertiesObject(), }; } @@ -34,8 +25,6 @@ export class CollectionObject implements CollectionInterface { this._data = data; if (data.properties) { this._data.properties = new CollectionPropertiesObject().fromJson(data.properties as CollectionPropertiesInterface); - } else { - this._data.properties = new CollectionPropertiesObject(); } return this; } @@ -114,12 +103,12 @@ export class CollectionPropertiesObject implements CollectionPropertiesInterface constructor() { this._data = { - '@type': 'mail.collection', + '@type': 'mail:collection', version: 1, total: 0, unread: 0, - label: '', role: null, + label: '', rank: 0, subscribed: true, }; diff --git a/src/models/provider.ts b/src/models/provider.ts index 0f171a7..8702afd 100644 --- a/src/models/provider.ts +++ b/src/models/provider.ts @@ -13,7 +13,7 @@ export class ProviderObject implements ProviderInterface { constructor() { this._data = { - '@type': 'mail.provider', + '@type': 'mail:provider', identifier: '', label: '', capabilities: {}, -- 2.39.5