Skip to content

Commit 777e52f

Browse files
committed
Improve PWA support
1 parent e142278 commit 777e52f

9 files changed

Lines changed: 44 additions & 4 deletions

File tree

cue-client/index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@
44
<link rel="manifest" href="/manifest.json" />
55
<meta charset="UTF-8" />
66
<link rel="icon" href="/favicon.svg" />
7-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<meta
8+
name="viewport"
9+
content="width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable:false"
10+
/>
811
<title>cue</title>
912
<link rel="preconnect" href="https://rsms.me/" />
1013
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
14+
<meta name="apple-mobile-web-app-capable" content="yes" />
15+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
16+
<link rel="icon" type="image/png" sizes="196x196" href="/favicon-196.png" />
17+
<link rel="apple-touch-icon" href="/apple-icon-180.png" />
18+
<meta name="apple-mobile-web-app-capable" content="yes" />
1119
</head>
1220
<body>
1321
<div id="root"></div>
4.72 KB
Loading

cue-client/public/favicon-196.png

5.15 KB
Loading
5.03 KB
Loading
15.3 KB
Loading

cue-client/public/manifest.json

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
11
{
22
"display": "standalone",
3-
"short_name": "Cue.is"
3+
"short_name": "cue.is",
4+
"icons": [
5+
{
6+
"src": "public/manifest-icon-192.maskable.png",
7+
"sizes": "192x192",
8+
"type": "image/png",
9+
"purpose": "any"
10+
},
11+
{
12+
"src": "public/manifest-icon-192.maskable.png",
13+
"sizes": "192x192",
14+
"type": "image/png",
15+
"purpose": "maskable"
16+
},
17+
{
18+
"src": "public/manifest-icon-512.maskable.png",
19+
"sizes": "512x512",
20+
"type": "image/png",
21+
"purpose": "any"
22+
},
23+
{
24+
"src": "public/manifest-icon-512.maskable.png",
25+
"sizes": "512x512",
26+
"type": "image/png",
27+
"purpose": "maskable"
28+
}
29+
]
430
}

cue-client/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function App() {
1313
return (
1414
<div id="app">
1515
<CollapsibleColumn />
16-
<main>
16+
<main className="standalone:pt-[env(safe-area-inset-top)]">
1717
<div className="flex gap-2 p-4">
1818
<Button variant="secondary" type="button" onClick={toggleSidebar}>
1919
<Menu size={16} strokeWidth={1.5} />

cue-client/src/components/sidebar/collapsible-column.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function CollapsibleColumn() {
1111
const { isSidebarOpen, closeSidebar } = useSidebar();
1212
return (
1313
<div
14-
className="z-10 absolute l-0 h-full bg-white md:static shadow"
14+
className="z-10 absolute l-0 h-full bg-white md:static shadow standalone:pt-[env(safe-area-inset-top)]"
1515
style={{ overflow: 'hidden', transition: 'all 0.2s ease-out', width: isSidebarOpen ? 260 : 0 }}
1616
>
1717
<div className="flex flex-col w-[260px] max-h-dvh overflow-y-auto p-3">

cue-client/src/index.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,9 @@ main #content {
274274
@apply bg-background text-foreground;
275275
}
276276
}
277+
278+
@custom-variant standalone {
279+
@media (display-mode: standalone) {
280+
@slot;
281+
}
282+
}

0 commit comments

Comments
 (0)