Skip to content

Commit 25c19b6

Browse files
committed
fix: allow clients to disable the tray menu
1 parent 6d5e038 commit 25c19b6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: plugins/plugin-codeflare/src/preload.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ import { Capabilities } from "@kui-shell/core"
2424
*/
2525
export default async function codeflarePreload() {
2626
if (!Capabilities.isHeadless()) {
27-
const { ipcRenderer } = await import("electron")
28-
import("./tray/renderer").then((_) => _.default(ipcRenderer))
27+
// eslint-disable-next-line @typescript-eslint/no-var-requires
28+
const { tray } = require("@kui-shell/client/config.d/client.json")
29+
if (tray !== false) {
30+
const { ipcRenderer } = await import("electron")
31+
import("./tray/renderer").then((_) => _.default(ipcRenderer))
32+
}
2933
}
3034
}

0 commit comments

Comments
 (0)