Skip to content

Commit

Permalink
fix: setting
Browse files Browse the repository at this point in the history
  • Loading branch information
whes1015 committed Dec 1, 2024
1 parent 6452b74 commit b1db62d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/js/index/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,6 @@ if (TREM.constant.SHOW_TREM_EEW) {
TREM.constant.EEW_AUTHOR = TREM.constant.EEW_AUTHOR.filter((author) => author != 'cwa');
}

localStorage.setItem('constant', JSON.stringify(TREM));

module.exports = TREM;
2 changes: 2 additions & 0 deletions src/js/setting/require.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
TREM = JSON.parse(localStorage.getItem('constant'));

const EventEmitter = require('events');

TREM.variable.events = new EventEmitter();

const logger = require('../js/core/utils/logger');
Expand Down
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function createSettingWindow() {
height: 590,
show: false,
frame: false,
transparent: true,
transparent: is_mac ? false : true,
resizable: false,
...(is_mac && {
vibrancy: 'ultra-dark',
Expand All @@ -180,6 +180,7 @@ function createSettingWindow() {
require('@electron/remote/main').enable(SettingWindow.webContents);
SettingWindow.loadFile('./src/view/setting.html');
SettingWindow.setMenu(null);
SettingWindow.webContents.openDevTools({ mode: 'detach' });
SettingWindow.webContents.on('did-finish-load', () => SettingWindow.show());
SettingWindow.on('close', () => {
SettingWindow = null;
Expand Down

0 comments on commit b1db62d

Please sign in to comment.