refactor: cleanup codes

This commit is contained in:
leejooy96 committed 2025-06-23 16:14:21 +09:00
1 parent a3b18472e3
commit ab74b7ed2e
2 files changed
+16 -5

No files matched your search

+1 -1
View File
@@ -78,7 +78,7 @@ export const createMainWindow = async (): Promise<BrowserWindow> => {
}) })
mainWindow.webContents.on('did-frame-finish-load', (): void => { mainWindow.webContents.on('did-frame-finish-load', (): void => {
if (Constants.IS_DEV_ENV && Constants.IS_DEVTOOLS) { if (Constants.IS_DEV_ENV && Constants.FEAT_OPEN_DEV_TOOLS_AT_START) {
mainWindow.webContents.openDevTools() mainWindow.webContents.openDevTools()
} }
}) })
+15 -4
View File
@@ -14,6 +14,21 @@ export interface TrayOptions {
} }
export default class Constants { export default class Constants {
/* ------------------------------------------------------
* Vutron app feature list
*
* This template includes examples so you can try out several Electron features.
* To remove them from your project, you'll need to disable the features below, or find and delete the related code.
* ------------------------------------------------------ */
static FEAT_APP_LOGGER = true
// To show devtools at startup. It requires IS_DEV_ENV=true.
// Note: For debugging purpose, window won't be closed if click elsewhere, if devtools is open.
static FEAT_OPEN_DEV_TOOLS_AT_START = true
/* ------------------------------------------------------
* END OF FEATURES
* ------------------------------------------------------ */
// Display app name (uppercase first letter) // Display app name (uppercase first letter)
static APP_NAME = name.charAt(0).toUpperCase() + name.slice(1) static APP_NAME = name.charAt(0).toUpperCase() + name.slice(1)
@@ -25,10 +40,6 @@ export default class Constants {
? resolve(__dirname, '../../src/public') ? resolve(__dirname, '../../src/public')
: resolve(__dirname, '..') : resolve(__dirname, '..')
// To show devtools at startup. It requires IS_DEV_ENV=true.
// Note: For debugging purpose, window won't be closed if click elsewhere, if devtools is open.
static IS_DEVTOOLS = true
static IS_MAC = process.platform === 'darwin' static IS_MAC = process.platform === 'darwin'
static DEFAULT_WEB_PREFERENCES = { static DEFAULT_WEB_PREFERENCES = {