2016-04-01 06:52:03 +08:00
|
|
|
import {PreferencesUIStore,
|
|
|
|
WorkspaceStore,
|
|
|
|
ComponentRegistry} from 'nylas-exports';
|
|
|
|
|
|
|
|
import PreferencesRoot from './preferences-root';
|
|
|
|
import PreferencesGeneral from './tabs/preferences-general';
|
|
|
|
import PreferencesAccounts from './tabs/preferences-accounts';
|
|
|
|
import PreferencesAppearance from './tabs/preferences-appearance';
|
|
|
|
import PreferencesKeymaps from './tabs/preferences-keymaps';
|
|
|
|
import PreferencesMailRules from './tabs/preferences-mail-rules';
|
2016-05-28 05:05:27 +08:00
|
|
|
import PreferencesIdentity from './tabs/preferences-identity';
|
2016-04-01 06:52:03 +08:00
|
|
|
|
|
|
|
export function activate() {
|
|
|
|
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
|
|
|
|
tabId: 'General',
|
|
|
|
displayName: 'General',
|
|
|
|
component: PreferencesGeneral,
|
|
|
|
order: 1,
|
|
|
|
}))
|
|
|
|
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
|
|
|
|
tabId: 'Accounts',
|
|
|
|
displayName: 'Accounts',
|
|
|
|
component: PreferencesAccounts,
|
|
|
|
order: 2,
|
|
|
|
}))
|
2016-05-28 05:05:27 +08:00
|
|
|
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
|
|
|
|
tabId: 'Subscription',
|
|
|
|
displayName: 'Subscription',
|
|
|
|
component: PreferencesIdentity,
|
|
|
|
order: 3,
|
|
|
|
}))
|
2016-04-01 06:52:03 +08:00
|
|
|
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
|
|
|
|
tabId: 'Appearance',
|
|
|
|
displayName: 'Appearance',
|
|
|
|
component: PreferencesAppearance,
|
2016-05-28 05:05:27 +08:00
|
|
|
order: 4,
|
2016-04-01 06:52:03 +08:00
|
|
|
}))
|
|
|
|
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
|
|
|
|
tabId: 'Shortcuts',
|
|
|
|
displayName: 'Shortcuts',
|
|
|
|
component: PreferencesKeymaps,
|
2016-05-28 05:05:27 +08:00
|
|
|
order: 5,
|
2016-04-01 06:52:03 +08:00
|
|
|
}))
|
|
|
|
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
|
|
|
|
tabId: 'Mail Rules',
|
|
|
|
displayName: 'Mail Rules',
|
|
|
|
component: PreferencesMailRules,
|
2016-05-28 05:05:27 +08:00
|
|
|
order: 6,
|
2016-04-01 06:52:03 +08:00
|
|
|
}))
|
|
|
|
|
|
|
|
WorkspaceStore.defineSheet('Preferences', {}, {
|
|
|
|
split: ['Preferences'],
|
|
|
|
list: ['Preferences'],
|
|
|
|
});
|
|
|
|
|
|
|
|
ComponentRegistry.register(PreferencesRoot, {
|
|
|
|
location: WorkspaceStore.Location.Preferences,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export function deactivate() {
|
|
|
|
}
|
|
|
|
|
|
|
|
export function serialize() {
|
|
|
|
return this.state;
|
|
|
|
}
|