feat(desktop): scope tabs to windows (#34669)
This commit is contained in:
parent
55552c521f
commit
af72cec799
14 changed files with 185 additions and 42 deletions
|
|
@ -73,6 +73,7 @@ const api: ElectronAPI = {
|
|||
storeLength: (name) => ipcRenderer.invoke("store-length", name),
|
||||
|
||||
getWindowCount: () => ipcRenderer.invoke("get-window-count"),
|
||||
getWindowID: () => ipcRenderer.invoke("get-window-id"),
|
||||
onMenuCommand: (cb) => {
|
||||
const handler = (_: unknown, id: string) => cb(id)
|
||||
ipcRenderer.on("menu-command", handler)
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ export type ElectronAPI = {
|
|||
storeLength: (name: string) => Promise<number>
|
||||
|
||||
getWindowCount: () => Promise<number>
|
||||
getWindowID: () => Promise<string>
|
||||
onMenuCommand: (cb: (id: string) => void) => () => void
|
||||
onDeepLink: (cb: (urls: string[]) => void) => () => void
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue