commit 4c40942e452621ee8fa0a43c6ab39acce1be2b57
parent 361f4a6abe513c8b8dbecad9158b2e7f39904a10
Author: notamitgamer2 <notamitgamer2@users.noreply.github.com>
Date: Wed, 26 Aug 2026 04:29:44 +0000
Use the real app logo instead of the placeholder brand mark
- Copies icon.svg from the WhatsApp-Logger-Self-Hosted- frontend repo
into public/icon.svg here, so both projects share the same logo.
- Serves it via express.static('public'), mounted unauthenticated
(before any login check) so it's visible on the login page.
- Swaps the placeholder green 'W' square in the login/status pages
for the real logo.
- Also wires it up as the browser tab favicon on every page
(login, status, logs).
No route/behavior changes elsewhere. Verified: node --check passes,
booted the server and confirmed GET /icon.svg returns 200 with
image/svg+xml and byte-identical content to the source file, and
that the login page's markup references it correctly.
Diffstat:
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/index.js b/index.js
@@ -15,6 +15,8 @@ const statusRoutes = require('./src/routes/status');
const app = express();
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
+// Static assets (favicon/logo) — served unauthenticated, before any login check
+app.use(express.static('public'));
app.use((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*");
diff --git a/public/icon.svg b/public/icon.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" rx="30" fill="#006C4C"/><path d="M30 35C30 32.2386 32.2386 30 35 30H65C67.7614 30 70 32.2386 70 35V55C70 57.7614 67.7614 60 65 60H45L30 70V35Z" fill="white"/><circle cx="42" cy="45" r="3" fill="#006C4C"/><circle cx="50" cy="45" r="3" fill="#006C4C"/><circle cx="58" cy="45" r="3" fill="#006C4C"/></svg>
+\ No newline at end of file
diff --git a/src/views/pages.js b/src/views/pages.js
@@ -50,16 +50,10 @@ const BASE_STYLES = `
.brand-mark {
width: 36px;
height: 36px;
- border-radius: 10px;
- background: var(--accent);
- display: flex;
- align-items: center;
- justify-content: center;
- color: white;
- font-weight: 700;
- font-size: 18px;
flex-shrink: 0;
+ display: block;
}
+ .brand-mark img { width: 100%; height: 100%; display: block; }
.brand-text { text-align: left; }
.brand-text h1 { font-size: 17px; margin: 0; line-height: 1.2; }
.brand-text .version { font-size: 12px; color: var(--muted); }
@@ -195,6 +189,7 @@ function layout({ title, refresh, content, wide }) {
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <link rel="icon" href="/icon.svg" type="image/svg+xml">
<title>${title}</title>
${refresh ? `<meta http-equiv="refresh" content="${refresh}">` : ''}
<style>${BASE_STYLES}${wide ? ' .page { max-width: 560px; }' : ''}</style>
@@ -207,7 +202,7 @@ function layout({ title, refresh, content, wide }) {
const brand = `
<div class="brand">
- <div class="brand-mark">W</div>
+ <div class="brand-mark"><img src="/icon.svg" alt="WhatsApp Logger"></div>
<div class="brand-text">
<h1>WhatsApp Logger</h1>
<div class="version">v${VERSION}</div>
@@ -395,6 +390,7 @@ function logsPage(logBuffer) {
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <link rel="icon" href="/icon.svg" type="image/svg+xml">
<meta http-equiv="refresh" content="5">
<title>System Logs</title>
<style>