File tree Expand file tree Collapse file tree 7 files changed +37
-1
lines changed
Expand file tree Collapse file tree 7 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 33
44< head >
55 < meta charset ="UTF-8 " />
6- < link rel ="icon " type ="image/svg+xml " href ="/vite.svg " />
6+ < link rel ="manifest " href ="/open-latex/manifest.json ">
7+ < link rel ="icon " type ="image/svg+xml " href ="/open-latex/favicon.png " />
78 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
89 < title > open-latex</ title >
910</ head >
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " OpenLatex" ,
3+ "short_name" : " OpenLatex" ,
4+ "description" : " OpenLatex" ,
5+ "start_url" : " /OpenLatex/" ,
6+ "display" : " standalone" ,
7+ "background_color" : " #333333" ,
8+ "theme_color" : " #333333" ,
9+ "icons" : [
10+ {
11+ "src" : " icons/icon-192.png" ,
12+ "sizes" : " 192x192" ,
13+ "type" : " image/png"
14+ },
15+ {
16+ "src" : " icons/icon-512.png" ,
17+ "sizes" : " 512x512" ,
18+ "type" : " image/png"
19+ }
20+ ]
21+ }
Original file line number Diff line number Diff line change 1+ self . addEventListener ( 'install' , event => {
2+ self . skipWaiting ( ) ;
3+ } ) ;
4+
5+ self . addEventListener ( 'fetch' , event => {
6+ // PWA mínimo: apenas responde normalmente
7+ } ) ;
Original file line number Diff line number Diff line change @@ -3,6 +3,13 @@ import { createRoot } from 'react-dom/client';
33import './index.css' ;
44import App from './App.tsx' ;
55
6+ if ( 'serviceWorker' in navigator ) {
7+ window . addEventListener ( 'load' , ( ) => {
8+ navigator . serviceWorker . register ( '/open-latex/sw.js' )
9+ . catch ( err => console . error ( 'error on registering SW' , err ) ) ;
10+ } ) ;
11+ }
12+
613createRoot ( document . getElementById ( 'root' ) ! ) . render (
714 < StrictMode >
815 < App />
You can’t perform that action at this time.
0 commit comments