Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
leoding86 committed Dec 30, 2020
1 parent e7e8811 commit 5d84df7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/main/modules/SettingStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ class SettingStorage extends EventEmitter {

Object.assign(this.settings, settings);

fs.writeJsonSync(this.getSettingsFile(this.getUserMode()), this.settings);
let configFile = this.getSettingsFile(this.getUserMode());

fs.createFileSync(configFile);
fs.writeJsonSync(configFile, this.settings);

this.emit('change', settings, oldSettings);

Expand Down
2 changes: 1 addition & 1 deletion src/main/modules/Utils/GetPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export default {

installation() {
return isDev ? path.join(app.getAppPath(), '..', 'fake_installation') :
app.getAppPath();
path.join(app.getAppPath(), '../..');
}
}
10 changes: 6 additions & 4 deletions src/main/modules/WindowManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class WindowManager {
this.cacheWindowBounds(name);
});

window.on('close', () => {
window.on('closed', () => {
this.removeWindow(name);
});

Expand Down Expand Up @@ -180,16 +180,18 @@ class WindowManager {
this.setWindowResizeTimeout(name, () => {
let cache = fs.readJSONSync(this.cacheFile);
try {
let window = this.getWindow(name);
let window = this.getWindow(name),
isMaximized = window.isMaximized(),
bounds = window.getBounds();

if (window) {
if (!cache[name]) {
cache[name] = {};
}

cache[name] = {
isMaximized: window.isMaximized(),
bounds: window.getBounds()
isMaximized,
bounds
}

fs.writeJSONSync(this.cacheFile, cache);
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/About.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="app-about">
<div class="app-about-row">
<p class="app-about-icon"><img :src="require('@/../../build/icon.png').default"><span>{{packageInfo.productName}}</span></p>
<p class="app-about-icon"><img :src="require('@/../../build/icon.png')"><span>{{packageInfo.productName}}</span></p>
</div>
<div class="app-about-row">
<div class="app-version-info">
Expand Down

0 comments on commit 5d84df7

Please sign in to comment.