mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(app): redraw the favicon badge when branding changes (#3314)
This commit is contained in:
1 parent
4ecbe9603c
commit
4b1afc953f
2 files changed
+46
-9
No files matched your search
@@ -77,10 +77,15 @@ function applyDocumentBranding(productName: string, faviconUrl: string | null, t
|
||||
}
|
||||
}
|
||||
|
||||
export function getDocumentFaviconUrl(appPublic: InstanceAppPublic | null): string | null {
|
||||
if (appPublic === null) return DEFAULT_APP_SHELL_BRANDING.faviconUrl;
|
||||
return appPublic.branding.favicon_url ?? appPublic.branding.icon_url;
|
||||
}
|
||||
|
||||
export function applyRuntimeDocumentBranding(appPublic: InstanceAppPublic): void {
|
||||
applyDocumentBranding(
|
||||
appPublic.branding.product_name,
|
||||
appPublic.branding.favicon_url ?? appPublic.branding.icon_url,
|
||||
getDocumentFaviconUrl(appPublic),
|
||||
appPublic.branding.theme_color,
|
||||
);
|
||||
}
|
||||
@@ -88,7 +93,7 @@ export function applyRuntimeDocumentBranding(appPublic: InstanceAppPublic): void
|
||||
export function applyDefaultAppShellDocumentBranding(): void {
|
||||
applyDocumentBranding(
|
||||
DEFAULT_APP_SHELL_BRANDING.productName,
|
||||
DEFAULT_APP_SHELL_BRANDING.faviconUrl,
|
||||
getDocumentFaviconUrl(null),
|
||||
DEFAULT_APP_SHELL_BRANDING.themeColor,
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user