Skip to content

Commit 92ee491

Browse files
committed
Apple web app capable changes
1 parent b5e6a34 commit 92ee491

File tree

10 files changed

+32
-13
lines changed

10 files changed

+32
-13
lines changed
16.4 KB
Loading
49.6 KB
Loading

src/app/apple-icon.png

15.2 KB
Loading

src/app/favicon.ico

-10.6 KB
Binary file not shown.

src/app/icon.png

7.1 KB
Loading

src/app/icon.svg

Lines changed: 1 addition & 0 deletions
Loading

src/app/layout.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import Script from "next/script";
66
export const metadata: Metadata = {
77
title: "OpenReader WebUI",
88
description: "A modern web interface for reading and managing documents",
9+
appleWebApp: {
10+
capable: true,
11+
statusBarStyle: "black-translucent",
12+
}
913
};
1014

1115
export default function RootLayout({

src/app/manifest.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "OpenReader WebUI",
3+
"short_name": "OpenReader",
4+
"icons": [
5+
{
6+
"src": "/web-app-manifest-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png",
9+
"purpose": "maskable"
10+
},
11+
{
12+
"src": "/web-app-manifest-512x512.png",
13+
"sizes": "512x512",
14+
"type": "image/png",
15+
"purpose": "maskable"
16+
}
17+
],
18+
"display": "standalone"
19+
}

src/app/pdf/[id]/page.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Link from 'next/link';
77
import { useCallback, useEffect, useState } from 'react';
88
import { PDFSkeleton } from '@/components/PDFSkeleton';
99
import { useTTS } from '@/contexts/TTSContext';
10+
import { Button } from '@headlessui/react';
1011

1112
// Dynamic import for client-side rendering only
1213
const PDFViewer = dynamic(
@@ -83,24 +84,24 @@ export default function PDFViewerPage() {
8384
Documents
8485
</Link>
8586
<div className="bg-offbase px-2 py-0.5 rounded-full flex items-center gap-2">
86-
<button
87+
<Button
8788
onClick={handleZoomOut}
8889
className="text-xs hover:text-accent transition-colors"
8990
aria-label="Zoom out"
9091
>
9192
92-
</button>
93+
</Button>
9394
<span className="text-xs">{zoomLevel}%</span>
94-
<button
95+
<Button
9596
onClick={handleZoomIn}
9697
className="text-xs hover:text-accent transition-colors"
9798
aria-label="Zoom in"
9899
>
99100
100-
</button>
101+
</Button>
101102
</div>
102103
</div>
103-
<h1 className="mr-2 text-md font-semibold text-foreground">
104+
<h1 className="mr-2 text-md font-semibold text-foreground truncate">
104105
{isLoading ? 'Loading...' : currDocName}
105106
</h1>
106107
</div>

src/contexts/TTSContext.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,9 @@ export function TTSProvider({ children }: { children: React.ReactNode }) {
242242
useEffect(() => {
243243
if ('mediaSession' in navigator) {
244244
navigator.mediaSession.metadata = new MediaMetadata({
245-
title: 'Text to Speech',
245+
title: 'Text-to-Speech',
246246
artist: 'OpenReader WebUI',
247-
album: 'Current Reading',
248-
artwork: [
249-
{
250-
src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=',
251-
type: 'image/png',
252-
},
253-
],
247+
album: 'Current Document',
254248
});
255249

256250
navigator.mediaSession.setActionHandler('play', () => togglePlay());

0 commit comments

Comments
 (0)