Skip to content

Commit d1aa577

Browse files
committed
renderer: Set the icon src to a data: URL.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 13ce24b commit d1aa577

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/renderer/js/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {clipboard} from "electron/common";
2+
import fs from "node:fs";
23
import path from "node:path";
34
import process from "node:process";
45

@@ -362,7 +363,10 @@ export class ServerManagerView {
362363
this.tabs.push(
363364
new ServerTab({
364365
role: "server",
365-
icon: server.icon,
366+
icon: `data:application/octet-stream;base64,${fs.readFileSync(
367+
server.icon,
368+
"base64",
369+
)}`,
366370
name: server.alias,
367371
$root: this.$tabsContainer,
368372
onClick: this.activateLastTab.bind(this, index),

0 commit comments

Comments
 (0)