Skip to content

Commit

Permalink
Added LaunchAtLogin.
Browse files Browse the repository at this point in the history
  • Loading branch information
YuhApps committed Oct 24, 2023
1 parent 337cc4f commit 530bb17
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "clippiez",
"productName": "Clippiez",
"version": "1.0.4",
"version": "1.0.5",
"description": "Clippiez app for Windows, Mac and Linux.",
"main": "src/app.js",
"scripts": {
Expand Down
44 changes: 43 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ ipcMain.on('unmaximize:main-window', () => mainWindow.unmaximize())
ipcMain.on('close:main-window', () => mainWindow.close())

function showAbout() {
let build_date = '(2023.10.17)'
let build_date = '(2023.10.24)'
dialog.showMessageBox(BrowserWindow.getFocusedWindow(), {
message: 'Clippiez',
detail: 'Version ' + app.getVersion() + ' ' + build_date + '\nDeveloped by YUH APPS',
Expand All @@ -139,6 +139,27 @@ function createAppMenu() {
{
type: 'separator'
},
{
label: 'Auto Launch ' + (process.platform === 'darwin' ? 'at Login' : 'on startup'),
submenu: [
{
label: 'On',
checked: app.getLoginItemSettings().openAtLogin,
type: 'radio',
click: (menuItem, browserWindow, event) => {
app.setLoginItemSettings({ openAtLogin: true })
}
},
{
label: 'Off',
checked: !app.getLoginItemSettings().openAtLogin,
type: 'radio',
click: (menuItem, browserWindow, event) => {
app.setLoginItemSettings({ openAtLogin: false })
}
}
]
},
{
label: 'Always on top',
submenu: [
Expand Down Expand Up @@ -348,6 +369,27 @@ function createAppOptionsMenu(bounds) {
{
type: 'separator'
},
{
label: 'Auto Launch ' + (process.platform === 'darwin' ? 'at Login' : 'on startup'),
submenu: [
{
label: 'On',
checked: app.getLoginItemSettings().openAtLogin,
type: 'radio',
click: (menuItem, browserWindow, event) => {
app.setLoginItemSettings({ openAtLogin: true })
}
},
{
label: 'Off',
checked: !app.getLoginItemSettings().openAtLogin,
type: 'radio',
click: (menuItem, browserWindow, event) => {
app.setLoginItemSettings({ openAtLogin: false })
}
}
]
},
{
label: 'Always on top',
submenu: [
Expand Down

0 comments on commit 530bb17

Please sign in to comment.