Skip to content

Commit

Permalink
feat: change .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfuboy committed May 8, 2022
1 parent 932c9c4 commit ed6983e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ node_modules
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/connect.lock
/coverage
Expand Down
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"eslint.workingDirectories": [
{
"mode": "auto"
}
]
}
12 changes: 9 additions & 3 deletions src/app/electron-main/appView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class AppViews {
if (main_node.module && typeof main_node.module === 'object') {
const _fun = main_node.module;
_fun.setup({
appView: this.view
appView: this.view,
});
}
}
Expand All @@ -47,13 +47,19 @@ export class AppViews {
this.view = undefined;
this.mainModuleID = undefined;
}

rebuildBounds(sideWidth?: number) {
if (!this.view) {
return;
}
const windBounds = this.win.getContentBounds();
const _bounds: ViewBounds = getViewBounds(ViewZone.main, windBounds.width, windBounds.height, this.sidePosition, sideWidth);
const _bounds: ViewBounds = getViewBounds(
ViewZone.main,
windBounds.width,
windBounds.height,
this.sidePosition,
sideWidth
);
this.view.setBounds(_bounds);
}

Expand Down
4 changes: 2 additions & 2 deletions src/app/electron-main/coreView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class CoreViews {
constructor(private win: BrowserWindow) {
this.triggleEvent = this.triggleEvent.bind(this);
}

rebuildBounds() {
if (!this.view) {
return;
Expand Down Expand Up @@ -65,7 +65,7 @@ export class CoreViews {
* @param window
*/
remove() {
if(!this.view) return;
if (!this.view) return;
this.win.removeBrowserView(this.view);
this.view.webContents.closeDevTools();
ipcMain.removeListener('message', this.triggleEvent);
Expand Down
4 changes: 2 additions & 2 deletions src/app/electron-main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function createWindow(): BrowserWindow {
contextIsolation: false, // false if you want to run e2e test with Spectron
},
});
if (['serve'].includes(processEnv) ) {
if (['serve'].includes(processEnv)) {
require('electron-reload')(__dirname, {
electron: require(path.join(__dirname, '../node_modules/electron')),
});
Expand All @@ -59,7 +59,7 @@ function createWindow(): BrowserWindow {
mode: 'undocked',
});
UnitWorkerModule.setup({
view:win
view: win,
});
};
win.webContents.on('did-fail-load', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/platform/electron-browser/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ipcRenderer.on('storageCallback', (event, result) => {
storageCallback.get(result.callback)(result);
storageCallback.delete(result.callback);
} catch (e) {
storageCallback.delete(result.callback);
storageCallback.delete(result.callback);
}
}
});
Expand All @@ -30,7 +30,7 @@ window.eo.getModules = () => {
};
// 获取某个模块
window.eo.getModule = (moduleID) => {
return ipcRenderer.sendSync('eo-sync', { action: 'getModule', data: { moduleID: moduleID} });
return ipcRenderer.sendSync('eo-sync', { action: 'getModule', data: { moduleID: moduleID } });
};
// 获取App应用列表
window.eo.getAppModuleList = () => {
Expand Down

0 comments on commit ed6983e

Please sign in to comment.