ADD: Community button
This commit is contained in:
@@ -49,7 +49,10 @@
|
||||
</MenubarContent>
|
||||
</MenubarMenu>
|
||||
<MenubarMenu>
|
||||
<MenubarTrigger class="app-titlebar-button text-muted-foreground">About</MenubarTrigger>
|
||||
<MenubarTrigger
|
||||
class="app-titlebar-button text-muted-foreground"
|
||||
@click="electron.openExternal('https://discord.gg/jgRd77YN5T')">Community
|
||||
</MenubarTrigger>
|
||||
</MenubarMenu>
|
||||
<MenubarMenu>
|
||||
<MenubarTrigger class="app-titlebar-button text-muted-foreground">Help</MenubarTrigger>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { app, BrowserWindow, globalShortcut } from 'electron'
|
||||
import { app, BrowserWindow, globalShortcut, shell } from 'electron'
|
||||
import path from 'path'
|
||||
import ess from 'electron-squirrel-startup'
|
||||
import { ipcMain } from 'electron'
|
||||
@@ -75,6 +75,7 @@ app.whenReady().then(() => {
|
||||
}
|
||||
})
|
||||
ipcMain.on('electron:closeWindow', () => mainWindow.close())
|
||||
ipcMain.on('electron:openExternal', (_event, url) => shell.openExternal(url))
|
||||
nanodevices.onAttach((device) => {
|
||||
console.log('Attached device', device)
|
||||
mainWindow.webContents.send('nanodevice-attached', device)
|
||||
|
||||
@@ -46,4 +46,5 @@ contextBridge.exposeInMainWorld('electron', {
|
||||
minimizeWindow: () => ipcRenderer.send('electron:minimizeWindow'),
|
||||
toggleMaximizeWindow: () => ipcRenderer.send('electron:toggleMaximizeWindow'),
|
||||
closeWindow: () => ipcRenderer.send('electron:closeWindow'),
|
||||
openExternal: (url) => ipcRenderer.send('electron:openExternal', url),
|
||||
})
|
||||
Reference in New Issue
Block a user