mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
35 lines
855 B
Text
35 lines
855 B
Text
|
import {SystemStartService, WorkspaceStore, ComponentRegistry} from 'nylas-exports';
|
||
|
import OnboardingRoot from './onboarding-root';
|
||
|
|
||
|
export function activate() {
|
||
|
WorkspaceStore.defineSheet('Main', {root: true}, {list: ['Center']});
|
||
|
|
||
|
ComponentRegistry.register(OnboardingRoot, {
|
||
|
location: WorkspaceStore.Location.Center,
|
||
|
});
|
||
|
|
||
|
const accounts = NylasEnv.config.get('nylas.accounts') || [];
|
||
|
|
||
|
if (accounts.length === 0) {
|
||
|
const startService = new SystemStartService();
|
||
|
startService.checkAvailability().then((available) => {
|
||
|
if (!available) {
|
||
|
return;
|
||
|
}
|
||
|
startService.doesLaunchOnSystemStart().then((launchesOnStart) => {
|
||
|
if (!launchesOnStart) {
|
||
|
startService.configureToLaunchOnSystemStart();
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export function deactivate() {
|
||
|
|
||
|
}
|
||
|
|
||
|
export function serialize() {
|
||
|
|
||
|
}
|