File size: 1,863 Bytes
ce534b9
 
 
 
a512f4a
ce534b9
1dc6a03
91bf78d
 
1dc6a03
 
 
 
 
91bf78d
 
 
1dc6a03
91bf78d
f7c5d4e
1dc6a03
 
91bf78d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1dc6a03
 
 
ce534b9
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>PromptAid Vision</title>

    <!-- App meta -->
    <meta name="description" content="A comprehensive vision analysis platform for crisis mapping and drone image processing" />
    <meta name="theme-color" content="#000000" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="apple-mobile-web-app-title" content="PromptAid" />

    <!-- PWA manifest -->
    <link rel="manifest" href="/manifest.webmanifest" />
    <link rel="dns-prefetch" href="//huggingface.co" />

    <!-- Service Worker registration -->
    <script>
      if ('serviceWorker' in navigator) {
        // Clean up any old SW registered under /static (from previous deploys)
        navigator.serviceWorker.getRegistrations?.().then(regs => {
          for (const r of regs) {
            if (r.scope && r.scope.includes('/static/')) r.unregister();
          }
        });

        // Register the current SW at the root
        window.addEventListener('load', async () => {
          try {
            const reg = await navigator.serviceWorker.register('/sw.js', { scope: '/' });
            // Enable navigation preload (faster navigations)
            if ('navigationPreload' in reg) {
              try { await reg.navigationPreload.enable(); } catch {}
            }
            console.log('SW registered:', reg);
          } catch (err) {
            console.log('SW registration failed:', err);
          }
        });
      }
    </script>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.tsx"></script>
  </body>
</html>