Skip to content

Commit

Permalink
fix: allow clients to disable the tray menu
Browse files Browse the repository at this point in the history
  • Loading branch information
starpit committed Sep 30, 2022
1 parent 6d5e038 commit 25c19b6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/plugin-codeflare/src/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ import { Capabilities } from "@kui-shell/core"
*/
export default async function codeflarePreload() {
if (!Capabilities.isHeadless()) {
const { ipcRenderer } = await import("electron")
import("./tray/renderer").then((_) => _.default(ipcRenderer))
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { tray } = require("@kui-shell/client/config.d/client.json")
if (tray !== false) {
const { ipcRenderer } = await import("electron")
import("./tray/renderer").then((_) => _.default(ipcRenderer))
}
}
}

0 comments on commit 25c19b6

Please sign in to comment.