Create a new sync window.

This commit is contained in:
Karim Hamidou 2016-11-22 14:28:57 -08:00
parent 70173d0187
commit 6314cb74ce
4 changed files with 23 additions and 2 deletions

1
.gitignore vendored
View file

@ -39,5 +39,6 @@ internal_packages/open-tracking
internal_packages/send-later
internal_packages/send-reminders
internal_packages/thread-sharing
internal_packages/local-sync
/dist
/dump.rdb

View file

@ -63,6 +63,12 @@ function installPrivateResources() {
unlinkIfExistsSync(to);
fs.symlinkSync(from, to, 'dir');
}
// link local-sync
const localSyncDir = path.resolve(path.join('src', 'K2', 'local-sync'))
const destination = path.join(path.resolve('internal_packages'), 'local-sync');
unlinkIfExistsSync(destination);
fs.symlinkSync(localSyncDir, destination, 'dir');
}
npm('install', {cwd: 'build'})
@ -70,6 +76,6 @@ npm('install', {cwd: 'build'})
.then(() => npm('dedupe', {cwd: path.join('apm', 'node_modules', 'npm'), env: 'apm'}))
.then(() => npm('install', {cwd: '.', env: 'electron'}))
.then(() => npm('dedupe', {cwd: '.', env: 'electron'}))
.then(() => npm('install', {cwd: 'src/K2', env: 'electron'}))
.then(() => npm('dedupe', {cwd: 'src/K2', env: 'electron'}))
.then(() => npm('install', {cwd: path.join('src', 'K2'), env: 'electron'}))
.then(() => npm('dedupe', {cwd: path.join('src', 'K2'), env: 'electron'}))
.then(() => installPrivateResources())

View file

@ -184,6 +184,8 @@ export default class Application extends EventEmitter {
});
this.windowManager.ensureWindow(WindowManager.WORK_WINDOW);
}
this.windowManager.ensureWindow(WindowManager.SYNC_WINDOW);
}
_relaunchToInitialWindows = ({resetConfig, resetDatabase} = {}) => {

View file

@ -4,6 +4,7 @@ import WindowLauncher from './window-launcher';
const MAIN_WINDOW = "default"
const WORK_WINDOW = "work"
const SYNC_WINDOW = "sync"
const SPEC_WINDOW = "spec"
const ONBOARDING_WINDOW = "onboarding"
const CALENDAR_WINDOW = "calendar"
@ -195,6 +196,16 @@ export default class WindowManager {
initializeInBackground: this.initializeInBackground,
};
coreWinOpts[WindowManager.SYNC_WINDOW] = {
windowKey: WindowManager.SYNC_WINDOW,
windowType: WindowManager.SYNC_WINDOW,
title: "Sync Window",
hidden: true,
neverClose: true,
width: 800,
height: 400,
};
coreWinOpts[WindowManager.WORK_WINDOW] = {
windowKey: WindowManager.WORK_WINDOW,
windowType: WindowManager.WORK_WINDOW,
@ -238,6 +249,7 @@ export default class WindowManager {
WindowManager.MAIN_WINDOW = MAIN_WINDOW;
WindowManager.WORK_WINDOW = WORK_WINDOW;
WindowManager.SYNC_WINDOW = SYNC_WINDOW;
WindowManager.SPEC_WINDOW = SPEC_WINDOW;
WindowManager.CALENDAR_WINDOW = CALENDAR_WINDOW;
WindowManager.ONBOARDING_WINDOW = ONBOARDING_WINDOW;