Skip to content

Commit 9731ea2

Browse files
refactor: unify favicon for index.html and Electron (#4006)
In #3407 we already talked about unifying them. - Create SVG favicon (better then png) - Replace base64 placeholder in index.html with SVG favicon - Update electron.js to use SVG favicon instead of mm2.png - Add favicon.svg to server static routes - Remove mm2.png
1 parent 40301f2 commit 9731ea2

5 files changed

Lines changed: 8 additions & 3 deletions

File tree

favicon.svg

Lines changed: 5 additions & 0 deletions
Loading

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<meta name="format-detection" content="telephone=no" />
1111
<meta name="mobile-web-app-capable" content="yes" />
1212

13-
<link rel="icon" href="data:;base64,iVBORw0KGgo=" />
13+
<link rel="icon" href="favicon.svg" />
1414
<link rel="stylesheet" type="text/css" href="css/main.css" />
1515
<link rel="stylesheet" type="text/css" href="css/roboto.css" />
1616
<link rel="stylesheet" type="text/css" href="node_modules/animate.css/animate.min.css" />

js/electron.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function createWindow () {
4848
let electronOptionsDefaults = {
4949
width: electronSize.width,
5050
height: electronSize.height,
51-
icon: "mm2.png",
51+
icon: "favicon.svg",
5252
x: 0,
5353
y: 0,
5454
darkTheme: true,

js/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function Server (config) {
8989
app.use(helmet(config.httpHeaders));
9090
app.use("/js", express.static(__dirname));
9191

92-
let directories = ["/config", "/css", "/modules", "/node_modules/animate.css", "/node_modules/@fontsource", "/node_modules/@fortawesome", "/translations", "/tests/configs", "/tests/mocks"];
92+
let directories = ["/config", "/css", "/favicon.svg", "/modules", "/node_modules/animate.css", "/node_modules/@fontsource", "/node_modules/@fortawesome", "/translations", "/tests/configs", "/tests/mocks"];
9393
for (const [key, value] of Object.entries(vendor)) {
9494
const dirArr = value.split("/");
9595
if (dirArr[0] === "node_modules") directories.push(`/${dirArr[0]}/${dirArr[1]}`);

mm2.png

-6.78 KB
Binary file not shown.

0 commit comments

Comments
 (0)