add Properties
This commit is contained in:
1 parent
31d986c5d2
commit
d0690f0398
8 files changed
+181
-36
No files matched your search
@@ -1,13 +1,14 @@
|
||||
import { app, BrowserWindow, Menu, MenuItem, dialog, nativeTheme } from 'electron';
|
||||
import AppMenu from './AppMenu'
|
||||
import Settings from './Settings';
|
||||
import MainEventType from '../common/MainEventType';
|
||||
|
||||
export class MainProcess {
|
||||
mainWindow: BrowserWindow;
|
||||
appMenu: AppMenu;
|
||||
settings: Settings;
|
||||
constructor() {
|
||||
nativeTheme.themeSource = 'dark';
|
||||
nativeTheme.themeSource = 'dark';
|
||||
app.on('ready', () => {
|
||||
this.createWindow();
|
||||
})
|
||||
@@ -23,7 +24,7 @@ export class MainProcess {
|
||||
});
|
||||
}
|
||||
|
||||
createWindow (){
|
||||
createWindow() {
|
||||
this.settings = new Settings();
|
||||
this.mainWindow = new BrowserWindow({
|
||||
width: 1280,
|
||||
@@ -41,6 +42,11 @@ export class MainProcess {
|
||||
});
|
||||
this.appMenu = new AppMenu(this);
|
||||
this.rebuildMenu();
|
||||
|
||||
const lastWorkspace = this.settings.recentWorkspaces[0];
|
||||
if(lastWorkspace) {
|
||||
this.mainWindow.webContents.send(MainEventType.OPEN_WORKSPACE, lastWorkspace);
|
||||
}
|
||||
}
|
||||
|
||||
rebuildMenu() {
|
||||
|
||||
Reference in new issue
Block a user