refactor: standardize manager design #9
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 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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ export class ProviderObject implements ProviderInterface {
|
||||
|
||||
constructor() {
|
||||
this._data = {
|
||||
'@type': 'mail.provider',
|
||||
'@type': 'mail:provider',
|
||||
identifier: '',
|
||||
label: '',
|
||||
capabilities: {},
|
||||
|
||||
Reference in New Issue
Block a user