2016-04-05 08:11:09 +08:00
|
|
|
/* eslint no-unused-vars:0 */
|
|
|
|
|
|
|
|
import {ComponentRegistry, WorkspaceStore} from 'nylas-exports';
|
|
|
|
import ActivitySidebar from "./sidebar/activity-sidebar";
|
2016-09-20 08:11:52 +08:00
|
|
|
import TrialRemainingBlock from "./sidebar/trial-remaining-block";
|
2016-10-04 23:02:11 +08:00
|
|
|
import NotifWrapper from "./notif-wrapper";
|
|
|
|
|
|
|
|
import AccountErrorNotification from "./items/account-error-notif";
|
|
|
|
import DefaultClientNotification from "./items/default-client-notif";
|
2016-10-19 03:39:05 +08:00
|
|
|
import UnstableChannelNotification from "./items/unstable-channel-notif";
|
2016-10-04 23:02:11 +08:00
|
|
|
import DevModeNotification from "./items/dev-mode-notif";
|
|
|
|
import DisabledMailRulesNotification from "./items/disabled-mail-rules-notif";
|
|
|
|
import OfflineNotification from "./items/offline-notification";
|
|
|
|
import UpdateNotification from "./items/update-notification";
|
|
|
|
|
|
|
|
const notifications = [
|
|
|
|
AccountErrorNotification,
|
|
|
|
DefaultClientNotification,
|
2016-10-19 03:39:05 +08:00
|
|
|
UnstableChannelNotification,
|
2016-10-04 23:02:11 +08:00
|
|
|
DevModeNotification,
|
|
|
|
DisabledMailRulesNotification,
|
|
|
|
OfflineNotification,
|
|
|
|
UpdateNotification,
|
|
|
|
]
|
2016-04-05 08:11:09 +08:00
|
|
|
|
|
|
|
export function activate() {
|
|
|
|
ComponentRegistry.register(ActivitySidebar, {location: WorkspaceStore.Location.RootSidebar});
|
2016-10-04 23:02:11 +08:00
|
|
|
ComponentRegistry.register(NotifWrapper, {location: WorkspaceStore.Location.RootSidebar});
|
2016-09-20 08:11:52 +08:00
|
|
|
ComponentRegistry.register(TrialRemainingBlock, {location: WorkspaceStore.Location.RootSidebar});
|
2016-10-04 23:02:11 +08:00
|
|
|
|
|
|
|
for (const notification of notifications) {
|
|
|
|
ComponentRegistry.register(notification, {role: 'RootSidebar:Notifications'});
|
|
|
|
}
|
2016-04-05 08:11:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export function serialize() {}
|
|
|
|
|
|
|
|
export function deactivate() {
|
|
|
|
ComponentRegistry.unregister(ActivitySidebar);
|
2016-09-20 08:11:52 +08:00
|
|
|
ComponentRegistry.unregister(TrialRemainingBlock);
|
2016-10-04 23:02:11 +08:00
|
|
|
ComponentRegistry.unregister(NotifWrapper);
|
|
|
|
|
|
|
|
for (const notification of notifications) {
|
|
|
|
ComponentRegistry.unregister(notification)
|
|
|
|
}
|
2016-04-05 08:11:09 +08:00
|
|
|
}
|