mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 18:23:21 +08:00
a1b5a23273
Summary: Moved events into metadata. Removed a lot of code Test Plan: todo Reviewers: juan, bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D2866
56 lines
1.9 KiB
JavaScript
56 lines
1.9 KiB
JavaScript
import ProposedTimeEvent from './calendar/proposed-time-event'
|
|
import ProposedTimePicker from './calendar/proposed-time-picker'
|
|
import NewEventCardContainer from './composer/new-event-card-container'
|
|
import SchedulerComposerButton from './composer/scheduler-composer-button';
|
|
import ProposedTimeCalendarStore from './proposed-time-calendar-store'
|
|
import ProposedTimeMainWindowStore from './proposed-time-main-window-store'
|
|
import SchedulerComposerExtension from './composer/scheduler-composer-extension';
|
|
|
|
import {
|
|
WorkspaceStore,
|
|
ComponentRegistry,
|
|
ExtensionRegistry,
|
|
} from 'nylas-exports'
|
|
|
|
export function activate() {
|
|
if (NylasEnv.getWindowType() === 'calendar') {
|
|
ProposedTimeCalendarStore.activate()
|
|
|
|
NylasEnv.getCurrentWindow().setMinimumSize(480, 250)
|
|
WorkspaceStore.defineSheet('Main', {root: true},
|
|
{popout: ['Center']})
|
|
|
|
ComponentRegistry.register(ProposedTimeEvent,
|
|
{role: 'Calendar:Event'});
|
|
|
|
ComponentRegistry.register(ProposedTimePicker,
|
|
{location: WorkspaceStore.Location.Center})
|
|
} else {
|
|
if (NylasEnv.isMainWindow()) {
|
|
ProposedTimeMainWindowStore.activate()
|
|
}
|
|
ComponentRegistry.register(NewEventCardContainer,
|
|
{role: 'Composer:Footer'});
|
|
|
|
ComponentRegistry.register(SchedulerComposerButton,
|
|
{role: 'Composer:ActionButton'});
|
|
|
|
ExtensionRegistry.Composer.register(SchedulerComposerExtension)
|
|
}
|
|
}
|
|
|
|
export function serialize() {
|
|
}
|
|
|
|
export function deactivate() {
|
|
if (NylasEnv.getWindowType() === 'calendar') {
|
|
ProposedTimeCalendarStore.deactivate()
|
|
ProposedTimeMainWindowStore.deactivate()
|
|
ComponentRegistry.unregister(ProposedTimeEvent);
|
|
ComponentRegistry.unregister(ProposedTimePicker);
|
|
} else {
|
|
ComponentRegistry.unregister(NewEventCardContainer);
|
|
ComponentRegistry.unregister(SchedulerComposerButton);
|
|
ExtensionRegistry.Composer.unregister(SchedulerComposerExtension);
|
|
}
|
|
}
|