fix: favicon + weird title errors

This commit is contained in:
diced 2025-01-10 12:24:05 -08:00
parent 863d68695f
commit 84d5066b1b
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1
5 changed files with 5 additions and 11 deletions

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 KiB

View file

@ -39,12 +39,10 @@ export default function App({
<>
<Head>
<title>
{pageProps?.config?.website?.title ?? 'Zipline'}
{Component.title ? ` ${Component.title}` : ''}
{`${pageProps?.config?.website?.title ?? 'Zipline'}${Component.title ? ` ${Component.title}` : ''}`}
</title>
<meta name='viewport' content='minimum-scale=1, initial-scale=1, width=device-width' />
<link rel='manifest' href='/manifest.json' />
<link rel='icon' type='image/png' href='/favicon' />
</Head>
<SWRConfig

View file

@ -21,9 +21,7 @@ export default function DashboardAdminUsersId({
return (
<>
<Head>
<title>
{config.website.title ?? 'Zipline'} {user.username}&quot;s files
</title>
<title>{`${config.website.title ?? 'Zipline'} ${user.username}'s files`}</title>
</Head>
<Layout config={config}>
<ViewFiles user={user} />

View file

@ -16,9 +16,7 @@ export default function ViewFolderId({
return (
<>
<Head>
<title>
{config.website.title ?? 'Zipline'} {folder.name}
</title>
<title>{`${config.website.title ?? 'Zipline'} ${folder.name}`}</title>
</Head>
<Container>
<Title order={1}>{folder.name}</Title>

View file

@ -1,11 +1,11 @@
import fastifyPlugin from 'fastify-plugin';
import { join } from 'path';
export const PATH = '/favicon';
export const PATH = '/favicon.ico';
export default fastifyPlugin(
(server, _, done) => {
server.get(PATH, (_, res) => {
return res.sendFile('favicon-32x32.png', join(process.cwd(), 'public'));
return res.sendFile('favicon.ico', join(process.cwd(), 'public'));
});
done();