wrolpi/app/public/index.html

51 lines
2.3 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
Fixing changes before merge. Moving FilesRefreshButton and DirectoryRefreshButton out of browser file. Moving file fetching tino FileBrowser. Removing sub-folders from Files display when any parent folder is clicked. Using closed captioning for vtt/srt file icon. Using my own react-semantic-toasts-2 to use toasts in Node 18. Fixing bug where more than the last page was displayed. Upgrading yt-dlp. Fixing sub-folder file selection. Adding rowKey to SortableTable to give React a key for each row. Renaming key to path. Removing duplicate urls. Unifying file modals. Displaying modals for image and text files. Handling refresh loading in FileBrowser. Creating refreshing_directory flag. Removing accidental commit. Sorting by url_count. Using SortableTable on Domains page. Using SortableTable for Channels page. Created new FileBrowser which allows browsing of files in the media directory. Using Node 18 in pi-gen. Creating new FileBrowser to replace outdated react-keyed-file-browser. Returning mimetype with file list. Do not display 'Do not download' on Channel download in Dashboard. Allowing null channel download frequency so user can stop downloading a channel. Bumping version for Node 18. Using my own semantic-ui-offline to avoid pulling Google fonts. Upgrading app docker container to use Node 18. This requires the removal of several npm packages. File browser will require re-write. It now pulls fonts from Google, this will need to be fixed. Testing DownloadsToggle click. Testing trinary states of DownloadsToggle. Installing @testing-library/user-event for testing App.
2023-01-31 18:08:07 -07:00
<html lang="en" style="height: 100%">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#000000"/>
Add PWA: installable app, offline calculators, read-only Inventory Make the React app an installable PWA whose app shell, calculators (incl. the One Time Pad), and Inventory work offline. Driving use case: reference an inventory (e.g. Fasteners) from an iPhone with no connection. Phase 1 — service worker (Workbox InjectManifest, production build only): - service-worker.js: precache the shell (calculators work offline), NavigationRoute for deep links, NetworkFirst cache of GET /api/inventory and /api/inventory/catalog (wrolpi-inventory), NetworkOnly /api/status. - serviceWorkerRegistration.js + registration in index.js. - Add workbox-* runtime deps (pinned 6.5.4 to match CRA's bundled plugin). Phase 2 — offline hardening + read-only Inventory: - api.js maps offline fetch failures (TypeError / timeout / !navigator.onLine) to ApiDownError so the existing nav apiDown indicator lights up. - toast.js wrapper swallows error toasts while offline; repoint the toast import in the 13 files that raise them (App.js container left as-is). - PwaContext (usePwa() -> {offline, isStandalone}), provider mounted in App.js inside StatusProvider. Default offline:false so components render without the provider in tests. - Inventory is read-only offline: InventoryRoute disables the edit buttons and shows a banner; InventoryTable hides the new-item row, checkboxes and delete, and disables click-to-edit. Values stay visible for reference. Phase 3 — iOS Add-to-Home-Screen meta tags in public/index.html. Verified end-to-end against the real API: SW caches the inventory, then with the origin stopped the cached inventory still renders read-only (reactively and on cold reload). All 676 Jest tests pass (incl. new InventoryTable offline tests). Media "Save for offline" + a Downloads list are intentionally deferred. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 15:21:25 -06:00
<!-- iOS: allow standalone "Add to Home Screen" launch so the PWA shell + cached inventory work offline. -->
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
<meta name="apple-mobile-web-app-title" content="WROLPi"/>
<meta
name="description"
content="The WROLPI webapp"
/>
<link rel="icon" href="%PUBLIC_URL%/favicon.ico"/>
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon-16x16.png">
<link rel="mask-icon" href="%PUBLIC_URL%/safari-pinned-tab.svg" color="#5bbad5">
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json"/>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>WROLPi: Create your own off-grid library</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>