refactor: standardize manager design
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
23
src/main.ts
23
src/main.ts
@@ -1,17 +1,13 @@
|
|||||||
import type { App as Vue } from 'vue'
|
/**
|
||||||
|
* Mail Manager Module Boot
|
||||||
|
*/
|
||||||
|
|
||||||
import routes from '@/routes'
|
import routes from '@/routes'
|
||||||
import integrations from '@/integrations'
|
import integrations from '@/integrations'
|
||||||
|
|
||||||
/**
|
console.log('[Mail Manager] Booting module...')
|
||||||
* 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('[MailManager] Booting Mail Manager module...')
|
console.log('[Mail Manager] Module booted successfully...')
|
||||||
|
|
||||||
console.log('[MailManager] Mail Manager module booted successfully')
|
|
||||||
|
|
||||||
// CSS will be injected by build process
|
// CSS will be injected by build process
|
||||||
export const css = ['__CSS_FILENAME_PLACEHOLDER__']
|
export const css = ['__CSS_FILENAME_PLACEHOLDER__']
|
||||||
@@ -30,10 +26,3 @@ export { useMailSync } from '@/composables/useMailSync'
|
|||||||
// Export components for external use
|
// Export components for external use
|
||||||
export { default as AddAccountDialog } from '@/components/AddAccountDialog.vue'
|
export { default as AddAccountDialog } from '@/components/AddAccountDialog.vue'
|
||||||
export { default as EditAccountDialog } from '@/components/EditAccountDialog.vue'
|
export { default as EditAccountDialog } from '@/components/EditAccountDialog.vue'
|
||||||
|
|
||||||
// Default export for Vue plugin installation
|
|
||||||
export default {
|
|
||||||
install(app: Vue) {
|
|
||||||
// Module initialization if needed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -17,16 +17,7 @@ export class CollectionObject implements CollectionInterface {
|
|||||||
signature: null,
|
signature: null,
|
||||||
created: null,
|
created: null,
|
||||||
modified: null,
|
modified: null,
|
||||||
properties: {
|
properties: new CollectionPropertiesObject(),
|
||||||
'@type': 'mail.collection',
|
|
||||||
version: 1,
|
|
||||||
total: 0,
|
|
||||||
unread: 0,
|
|
||||||
label: '',
|
|
||||||
role: null,
|
|
||||||
rank: 0,
|
|
||||||
subscribed: true,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,8 +25,6 @@ export class CollectionObject implements CollectionInterface {
|
|||||||
this._data = data;
|
this._data = data;
|
||||||
if (data.properties) {
|
if (data.properties) {
|
||||||
this._data.properties = new CollectionPropertiesObject().fromJson(data.properties as CollectionPropertiesInterface);
|
this._data.properties = new CollectionPropertiesObject().fromJson(data.properties as CollectionPropertiesInterface);
|
||||||
} else {
|
|
||||||
this._data.properties = new CollectionPropertiesObject();
|
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -114,12 +103,12 @@ export class CollectionPropertiesObject implements CollectionPropertiesInterface
|
|||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this._data = {
|
this._data = {
|
||||||
'@type': 'mail.collection',
|
'@type': 'mail:collection',
|
||||||
version: 1,
|
version: 1,
|
||||||
total: 0,
|
total: 0,
|
||||||
unread: 0,
|
unread: 0,
|
||||||
label: '',
|
|
||||||
role: null,
|
role: null,
|
||||||
|
label: '',
|
||||||
rank: 0,
|
rank: 0,
|
||||||
subscribed: true,
|
subscribed: true,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export class ProviderObject implements ProviderInterface {
|
|||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this._data = {
|
this._data = {
|
||||||
'@type': 'mail.provider',
|
'@type': 'mail:provider',
|
||||||
identifier: '',
|
identifier: '',
|
||||||
label: '',
|
label: '',
|
||||||
capabilities: {},
|
capabilities: {},
|
||||||
|
|||||||
Reference in New Issue
Block a user