Skip to content

Commit 7d4ee50

Browse files
dorlugasigalCopilot
andcommitted
fix(pwa): add icon/manifest tags to login page and fix maskable purpose
Three issues preventing the PWA icon from displaying: 1. Login page HTML had no apple-touch-icon or manifest link tags. When users add to home screen from the login page, browsers couldn't discover the icon at all. 2. Manifest had a separate icon with purpose 'maskable' instead of 'any maskable'. This caused some browsers to skip it for display. 3. Added 180x180 icon to manifest and includeAssets for precaching. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f24e64d commit 7d4ee50

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/frontend/vite.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default defineConfig({
1313
injectManifest: {
1414
globPatterns: ['**/*.{js,css,ico,png,svg,woff2,ttf}'],
1515
},
16+
includeAssets: ['icons/icon-180.png', 'icons/icon-192.png', 'icons/icon-512.png'],
1617
manifest: {
1718
name: 'TermBeam',
1819
short_name: 'TermBeam',
@@ -22,13 +23,14 @@ export default defineConfig({
2223
background_color: '#1e1e1e',
2324
theme_color: '#1e1e1e',
2425
icons: [
26+
{ src: '/icons/icon-180.png', sizes: '180x180', type: 'image/png' },
2527
{ src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
2628
{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png' },
2729
{
2830
src: '/icons/icon-512.png',
2931
sizes: '512x512',
3032
type: 'image/png',
31-
purpose: 'maskable',
33+
purpose: 'any maskable',
3234
},
3335
],
3436
},

src/server/auth.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ const LOGIN_HTML = `<!DOCTYPE html>
99
<meta name="apple-mobile-web-app-capable" content="yes" />
1010
<meta name="mobile-web-app-capable" content="yes" />
1111
<meta name="theme-color" content="#1e1e1e" />
12+
<link rel="icon" type="image/png" href="/icons/icon-192.png" />
13+
<link rel="apple-touch-icon" sizes="180x180" href="/icons/icon-180.png" />
14+
<link rel="apple-touch-icon" sizes="192x192" href="/icons/icon-192.png" />
15+
<link rel="manifest" href="/manifest.webmanifest" />
1216
<title>TermBeam — Login</title>
1317
<style>
1418
:root { --bg:#1e1e1e; --surface:#252526; --border:#3c3c3c; --border-subtle:#474747;

0 commit comments

Comments
 (0)