aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-client/src/preload.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-client/src/preload.js')
-rw-r--r--packages/meshbay-client/src/preload.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/meshbay-client/src/preload.js b/packages/meshbay-client/src/preload.js
index b390bfb..13d4f37 100644
--- a/packages/meshbay-client/src/preload.js
+++ b/packages/meshbay-client/src/preload.js
@@ -50,6 +50,11 @@ contextBridge.exposeInMainWorld('meshbay', {
// Labels are passed in because the main process has no i18n; see main.js.
minimizeToTray: (labels) => ipcRenderer.invoke('window:minimize-to-tray', labels),
+ // The tray now exists from launch, so its menu needs translating before
+ // anyone minimises into it. Sent once the interface has its catalogue, and
+ // again after a language change.
+ setTrayLabels: (labels) => ipcRenderer.invoke('tray:labels', labels),
+
// Ask the main process to call the hub. The renderer has an `app://` origin,
// which CORS refuses and which is not a credential anyway.
fetch: (url, init) => ipcRenderer.invoke('hub:fetch', url, init),