update: in the app, add missing favicons and use dynamic title (#508)

* update: adds multiple favicon options to the app

* update: uses the current workbook name in as page title

* update: replace favicons in assets
This commit is contained in:
Daniel González-Albo
2025-11-05 20:54:39 +01:00
committed by GitHub
parent 68a33a5f87
commit 3d265bba27
9 changed files with 16 additions and 1 deletions

View File

@@ -2,7 +2,12 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/ironcalc.svg" />
<link rel="icon" type="image/x-icon" href="/favicon.ico?v=1" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=1" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=1" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=1" />
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png?v=1" />
<link rel="icon" type="image/png" sizes="512x512" href="/android-chrome-512x512.png?v=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- <meta name="theme-color" content="#1bb566"> -->
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#F2994A" />

View File

@@ -75,6 +75,16 @@ function App() {
start();
}, []);
// biome-ignore lint/correctness/useExhaustiveDependencies: localStorageId needed to detect name changes (model mutates internally)
useEffect(() => {
if (model) {
const workbookName = model.getName();
document.title = workbookName ? `${workbookName} - IronCalc` : "IronCalc";
} else {
document.title = "IronCalc";
}
}, [model, localStorageId]);
if (!model) {
return (
<Loading>