Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/assets/appicon.png" />
<link rel="icon" type="image/png" href="/assets/appicon32.png" />
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="manifest" href="manifest.webmanifest" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Comify</title>
</head>
Expand Down
8,567 changes: 5,487 additions & 3,080 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"changelog-debug": "auto-changelog --template changelog.hbs -p --template json --output changelog-data.json",
"review": "npm run compile && npm run lint && npm run test",
"rebuild": "npm run clean && npm run build && npm run standalone",

"standalone": "jitar start --env-file=development.env --service=services/standalone.json --http-body-limit=512000",
"repository": "jitar start --env-file=development.env --service=services/repository.json",
"proxy": "jitar start --env-file=development.env --service=services/proxy.json --http-body-limit=512000",
Expand Down Expand Up @@ -69,6 +68,7 @@
"tsc-alias": "^1.8.10",
"typescript": "5.6.2",
"vite": "^5.4.6",
"vite-plugin-pwa": "^0.20.5",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.1.1"
},
Expand Down
2 changes: 1 addition & 1 deletion services/standalone.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"segments": ["bff"],

"serveIndexOnNotFound": true,
"assets": ["index.html", "main.js", "assets/**/*", "webui/**/*"]
"assets": ["index.html", "main.js", "assets/**/*", "webui/**/*", "registerSW.js", "sw.js", "workbox-*.js", "manifest.webmanifest" ]
}
}
Binary file added src/assets/appicon192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added src/assets/appicon512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions src/webui/public/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

{
"name": "Comify",
"short_name": "Comify",
"theme_color": "#ffffff",

"icons": [

{
"src": "/assets/appicon32.png",
"type": "image/png",
"sizes": "32x32"
},

{
"src": "/assets/appicon192.png",
"type": "image/png",
"sizes": "192x192"
},

{
"src": "/assets/appicon512.png",
"type": "image/png",
"sizes": "512x512"
}

],

"start_url": "/",

"id": "/",

"display": "standalone"

}
8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import jitar, { JitarConfig } from '@jitar/plugin-vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
import tsconfigPaths from 'vite-tsconfig-paths';

const JITAR_URL = 'http://localhost:3000';
Expand All @@ -24,6 +25,13 @@ export default defineConfig({
},
plugins: [
react(),
VitePWA({
strategies: 'generateSW',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the registerSW.js is not available in the offline cache.

Screenshot 2024-11-22 at 21 48 18

Reproduction:

  • Open a incognito window
  • Open Comify
  • Go offline (in dev-tools)
  • Refresh

manifest: false,
workbox: {
globPatterns: ['/', 'index.html', 'assets/*', 'webui/**/*.{js,css,html,png,svg}']
},
}),
tsconfigPaths(),
jitar(jitarConfig)
]
Expand Down