2016-09-13 14:23:39 +08:00
|
|
|
import {ComponentRegistry, WorkspaceStore} from 'nylas-exports';
|
|
|
|
import {HasTutorialTip} from 'nylas-component-kit';
|
|
|
|
|
|
|
|
import ModeToggle from './mode-toggle';
|
|
|
|
|
|
|
|
const ToggleWithTutorialTip = HasTutorialTip(ModeToggle, {
|
2016-09-15 02:16:19 +08:00
|
|
|
title: 'Compose with context',
|
2016-09-13 14:23:39 +08:00
|
|
|
instructions: "N1 shows you everything about your contacts right inside your inbox. See LinkedIn profiles, Twitter bios, message history, and more.",
|
|
|
|
});
|
|
|
|
|
|
|
|
// NOTE: this is a hack to allow ComponentRegistry
|
|
|
|
// to register the same component multiple times in
|
|
|
|
// different areas. if we do this more than once, let's
|
|
|
|
// dry this out.
|
|
|
|
class ToggleWithTutorialTipList extends ToggleWithTutorialTip {
|
|
|
|
static displayName = 'ModeToggleList'
|
|
|
|
}
|
|
|
|
|
|
|
|
export function activate() {
|
|
|
|
ComponentRegistry.register(ToggleWithTutorialTipList, {
|
|
|
|
location: WorkspaceStore.Sheet.Thread.Toolbar.Right,
|
|
|
|
modes: ['list'],
|
|
|
|
});
|
|
|
|
|
|
|
|
ComponentRegistry.register(ToggleWithTutorialTip, {
|
|
|
|
location: WorkspaceStore.Sheet.Threads.Toolbar.Right,
|
|
|
|
modes: ['split'],
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export function deactivate() {
|
|
|
|
ComponentRegistry.unregister(ToggleWithTutorialTip);
|
|
|
|
ComponentRegistry.unregister(ToggleWithTutorialTipList);
|
|
|
|
}
|