-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved "Start Minimized" to the tray menu
Changes to be committed: modified: src/app.html modified: src/app.js modified: src/main.js new file: src/utils/start_minimized_handler.js
- Loading branch information
Showing
4 changed files
with
46 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const Store = require('electron-store'); | ||
const store = new Store(); | ||
|
||
class startMinimizedHandler { | ||
constructor(app) { | ||
this.app = app; | ||
this.MV_MIN_LSID = 'mechvibes-start-minimized'; | ||
} | ||
|
||
get is_enabled() { | ||
return store.get(this.MV_MIN_LSID); | ||
} | ||
|
||
enable() { | ||
store.set(this.MV_MIN_LSID, true); | ||
} | ||
|
||
disable() { | ||
store.set(this.MV_MIN_LSID, false); | ||
} | ||
|
||
toggle() { | ||
if (this.is_enabled) { | ||
this.disable(); | ||
} else { | ||
this.enable(); | ||
} | ||
} | ||
} | ||
|
||
module.exports = startMinimizedHandler; |