-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve app UX and simplify interface #17
base: main
Are you sure you want to change the base?
Changes from all commits
180254a
dc63fdf
829939d
e05791f
d2b0316
84d0621
d8316b5
4991728
dc91f21
1bd0ee1
317abb1
5a03463
3a5ac69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
require("update-electron-app")(); | ||
const electronReload = require("electron-reload"); | ||
|
||
const { menubar } = require("menubar"); | ||
const Nucleus = require("nucleus-analytics"); | ||
|
@@ -18,6 +19,10 @@ const image = nativeImage.createFromPath( | |
path.join(__dirname, `images/newiconTemplate.png`) | ||
); | ||
|
||
require("electron-reload")(__dirname, { | ||
electron: path.join(__dirname, "node_modules", ".bin", "electron"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this compatible with |
||
}); | ||
|
||
app.on("ready", () => { | ||
Nucleus.init("638d9ccf4a5ed2dae43ce122"); | ||
|
||
|
@@ -31,8 +36,9 @@ app.on("ready", () => { | |
webviewTag: true, | ||
// nativeWindowOpen: true, | ||
}, | ||
width: 450, | ||
height: 550, | ||
minWidth: 400, | ||
width: 500, | ||
height: 650, | ||
}, | ||
tray, | ||
showOnAllWorkspaces: true, | ||
|
@@ -43,8 +49,7 @@ app.on("ready", () => { | |
|
||
mb.on("ready", () => { | ||
const { window } = mb; | ||
|
||
|
||
window.setAlwaysOnTop(true, "floating", 1); | ||
if (process.platform !== "darwin") { | ||
window.setSkipTaskbar(true); | ||
} else { | ||
|
@@ -94,9 +99,15 @@ app.on("ready", () => { | |
mb.tray.popUpContextMenu(Menu.buildFromTemplate(contextMenuTemplate)); | ||
}); | ||
|
||
tray.on("click", (e) => { | ||
//check if ctrl or meta key is pressed while clicking | ||
e.ctrlKey || e.metaKey | ||
? mb.tray.popUpContextMenu(Menu.buildFromTemplate(contextMenuTemplate)) | ||
: null; | ||
}); | ||
const menu = new Menu(); | ||
|
||
globalShortcut.register("CommandOrControl+Shift+g", () => { | ||
globalShortcut.register("CommandOrControl+Alt+g", () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would be cautious about making this change, as it isn't backwards-compatible and people may already be accustomed to the current shortcut. Additionally, I believe the new one is already used by Google Drive. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The original shortcut is honestly easier to press on both Win and Mac (for my hand anyway) |
||
if (window.isVisible()) { | ||
mb.hideWindow(); | ||
} else { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable declaration?