feat(desktop): scope tabs to windows (#34669)

This commit is contained in:
Brendan Allan 2026-07-01 15:02:10 +08:00 committed by GitHub
commit af72cec799
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 185 additions and 42 deletions

View file

@ -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)

View file

@ -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