Skip to content

Commit ec7f8c6

Browse files
committed
fix(admin): prefer explicit admin.favicon over Site Icon
Address review: an explicitly configured build-time admin.favicon is admin-specific and should not be overridden by the more general Site Icon. Flip precedence to admin.favicon -> Site Icon -> bundled mark. The Site Icon still brands the admin for the common case where no admin.favicon is set.
1 parent 33006f1 commit ec7f8c6

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

.changeset/admin-site-icon.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"emdash": patch
33
---
44

5-
The admin shell now uses the Site Icon configured in Settings → General as its favicon, so the EmDash backend is branded like the public site. Falls back to the build-time `admin.favicon` config and then the default EmDash mark when no Site Icon is set.
5+
The admin shell now falls back to the Site Icon configured in Settings → General for its favicon, so the EmDash backend is branded like the public site. An explicit build-time `admin.favicon` still takes precedence, and the default EmDash mark is used when neither is set.

packages/core/src/astro/routes/admin.astro

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ const messages = await loadMessages(resolvedLocale);
2626
const adminConfig = Astro.locals.emdash?.config?.admin;
2727
const pageTitle = adminConfig?.siteName ? `${adminConfig.siteName} Admin` : "EmDash Admin";
2828
29-
// Prefer the Site Icon configured in Settings → General so the admin shell is
30-
// branded like the public site (WordPress-style Site Icon, which also brands
31-
// wp-admin). Falls back to the build-time `admin.favicon` config, then the
29+
// Favicon precedence: an explicit build-time `admin.favicon` is admin-specific
30+
// and always wins. Otherwise fall back to the Site Icon configured in
31+
// Settings → General, so the admin shell is branded like the public site
32+
// (WordPress-style Site Icon, which also brands wp-admin), and finally the
3233
// bundled EmDash mark below.
3334
const emdash = Astro.locals.emdash;
3435
let siteFavicon: string | undefined;
@@ -40,7 +41,7 @@ if (emdash?.db) {
4041
// Settings unavailable (e.g. pre-setup) — fall back to the config/default.
4142
}
4243
}
43-
const favicon = siteFavicon ?? adminConfig?.favicon;
44+
const favicon = adminConfig?.favicon ?? siteFavicon;
4445
---
4546

4647
<!doctype html>

0 commit comments

Comments
 (0)