Skip to content

Commit

Permalink
feat: add FDP link to App tray menu (#458)
Browse files Browse the repository at this point in the history
* feat: update to bee-dashboard v0.31.0

* feat: add FDP link to Apps tray menu

---------

Co-authored-by: Ferenc Sárai <[email protected]>
  • Loading branch information
ferencsarai and Ferenc Sárai authored Jan 15, 2025
1 parent 173fbc2 commit 378f39d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ export function openDashboardInBrowser() {
export function openUrl(url: string) {
shell.openExternal(url)
}

export function openPath(path: string) {
shell.openExternal(`http://localhost:${port.value}/dashboard/?#${path}`)
}
6 changes: 5 additions & 1 deletion src/electron.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { app, BrowserWindow, Menu, nativeTheme, Tray } from 'electron'
import opener from 'opener'
import { openDashboardInBrowser, openUrl } from './browser'
import { openDashboardInBrowser, openUrl, openPath } from './browser'
import { runLauncher } from './launcher'
import { BeeManager } from './lifecycle'
import { createNotification } from './notify'
Expand Down Expand Up @@ -35,6 +35,10 @@ export function rebuildElectronTray() {
type: 'submenu',
label: 'Apps',
submenu: [
{
label: 'FDP',
click: () => openPath('/fdp'),
},
{
label: 'Datafund App',
click: () => openUrl('https://app.datafund.io'),
Expand Down

0 comments on commit 378f39d

Please sign in to comment.