fungiorganic commited on
Commit
9a45aef
·
verified ·
1 Parent(s): 00a6818

Cover Charge prototype v0.3.12.80 (part 5)

Browse files
Files changed (2) hide show
  1. staff-app/index.html +8 -73
  2. staff-app/metadata.json +1 -0
staff-app/index.html CHANGED
@@ -1,10 +1,10 @@
1
  <!doctype html>
2
- <html lang="en-GB">
3
  <head>
4
- <meta charset="utf-8" /><!--og--><meta property="og:type" content="website"><meta property="og:site_name" content="CoverCharge"><meta property="og:title" content="CoverCharge"><meta property="og:description" content="All in 1 restaurant management app"><meta name="description" content="All in 1 restaurant management app"><meta property="og:image" content="https://covercharge-apps.static.hf.space/og/covercharge-card.png"><meta property="og:image:secure_url" content="https://covercharge-apps.static.hf.space/og/covercharge-card.png"><meta property="og:image:type" content="image/png"><meta property="og:image:width" content="1200"><meta property="og:image:height" content="630"><meta property="og:image:alt" content="CoverCharge: All in 1 restaurant management app"><meta property="og:image" content="https://covercharge-apps.static.hf.space/og/covercharge-square.png"><meta property="og:image:type" content="image/png"><meta property="og:image:width" content="600"><meta property="og:image:height" content="600"><meta property="og:image:alt" content="CoverCharge: All in 1 restaurant management app"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="CoverCharge"><meta name="twitter:description" content="All in 1 restaurant management app"><meta name="twitter:image" content="https://covercharge-apps.static.hf.space/og/covercharge-card.png"><meta name="twitter:image:alt" content="CoverCharge: All in 1 restaurant management app"><!--/og-->
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no, viewport-fit=cover" />
7
- <title>Anchorage Staff</title>
8
  <!-- The `react-native-web` recommended style reset: https://necolas.github.io/react-native-web/docs/setup/#root-element -->
9
  <style id="expo-reset">
10
  /* These styles make the body full-height */
@@ -23,78 +23,13 @@
23
  flex: 1;
24
  }
25
  </style>
26
- <link rel="icon" href="/staff-app/favicon.ico"/><link rel="manifest" href="/staff-app/manifest.webmanifest"/>
27
- <meta name="theme-color" content="#000000"/>
28
-
29
- <meta name="mobile-web-app-capable" content="yes"/>
30
- <meta name="apple-mobile-web-app-capable" content="yes"/>
31
- <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
32
- <meta name="apple-mobile-web-app-title" content="Anchorage"/>
33
- <link rel="apple-touch-icon" href="/staff-app/apple-touch-icon.png"/>
34
- <style>html,body{background:#0B0B0B}</style>
35
- <script>(function(){var p=location.pathname;if(/\/index\.html$/.test(p))history.replaceState(null,'',p.slice(0,-10)+location.search+location.hash);})();</script>
36
- <script>(function(){try{var r=sessionStorage.getItem('cc-redirect');if(!r)return;sessionStorage.removeItem('cc-redirect');var u=new URL(r,location.href);if(u.origin===location.origin&&u.pathname.indexOf('/staff-app/')===0&&u.pathname!==location.pathname)history.replaceState(null,'',u.pathname+u.search+u.hash);}catch(e){}})();</script>
37
- <script>/* v0.2.21 update prompt: 'A new version is ready' with an Update button (posts SKIP_WAITING; the page reloads once). v0.2.22: shown through the app's shared slider (window.ccSlider) once the app has loaded, so it queues with other notices; this plain copy is the fallback before then. */
38
- function ccShowUpdate(w){if(window.ccSlider){window.ccSlider({id:'app-update',title:'A new version of the app is ready.',testID:'cc-update',actions:[{label:'Update',testID:'cc-update-btn',keepOpen:true,onPress:function(){try{w.postMessage({type:'SKIP_WAITING'});}catch(e){location.reload();}setTimeout(function(){location.reload();},4000);}},{label:'Later',kind:'ghost'}]});return;}if(document.getElementById('cc-update'))return;var b=document.createElement('div');b.id='cc-update';b.setAttribute('role','status');b.style.cssText='position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:2147483000;max-width:520px;margin:0 auto;display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;background:#17140F;border:1px solid rgba(207,164,95,.55);box-shadow:0 10px 30px rgba(0,0,0,.6);animation:ccsl-in .45s cubic-bezier(.2,1,.3,1) both;font:500 15px system-ui,sans-serif;color:#F5F1E8';b.innerHTML='<style>@keyframes ccsl-in{from{opacity:0;transform:translate3d(0,110%,0)}to{opacity:1;transform:none}}@media (prefers-reduced-motion: reduce){#cc-update{animation:none!important}}</style><span style="flex:1">A new version of the app is ready.</span>';var u=document.createElement('button');u.textContent='Update';u.id='cc-update-btn';u.style.cssText='min-height:44px;padding:0 18px;border-radius:12px;border:0;background:#CFA45F;color:#17130D;font:700 15px system-ui,sans-serif;cursor:pointer';u.onclick=function(){u.textContent='Updating…';try{w.postMessage({type:'SKIP_WAITING'});}catch(e){location.reload();}setTimeout(function(){location.reload();},4000);};var l=document.createElement('button');l.textContent='Later';l.style.cssText='min-height:44px;padding:0 10px;border:0;background:transparent;color:#A89A80;font:500 14px system-ui,sans-serif;cursor:pointer';l.onclick=function(){b.remove();};b.appendChild(u);b.appendChild(l);document.body.appendChild(b);}
39
- function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdate(r.waiting);r.addEventListener('updatefound',function(){var n=r.installing;if(!n)return;n.addEventListener('statechange',function(){if(n.state==='installed'&&navigator.serviceWorker.controller)ccShowUpdate(n);});});}</script>
40
- <script>if('serviceWorker' in navigator){var hadSW=!!navigator.serviceWorker.controller,reloaded=false;navigator.serviceWorker.addEventListener('controllerchange',function(){if(hadSW&&!reloaded){reloaded=true;location.reload();}});window.addEventListener('load',function(){navigator.serviceWorker.register('/staff-app/sw.js',{scope:'/staff-app/',updateViaCache:'none'}).then(function(r){ccWatch(r);r.update().catch(function(){});setInterval(function(){r.update().catch(function(){});},30*60000);}).catch(function(e){console.warn('SW',e)});});}</script>
41
- <style>html,body,#root{overflow-x:hidden;max-width:100vw;overscroll-behavior:none}body{touch-action:pan-x pan-y}</style><script>document.addEventListener("gesturestart",function(e){e.preventDefault()},{passive:false});document.addEventListener("touchmove",function(e){if(e.touches&&e.touches.length>1)e.preventDefault()},{passive:false});</script></head>
42
 
43
  <body>
44
  <!-- Use static rendering with Expo Router to support running without JavaScript. -->
45
  <noscript> You need to enable JavaScript to run this app. </noscript>
46
  <!-- The root element for your Expo app. -->
47
- <div id="root"><div id="cc-boot" style="position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#0B0B0B"><img src="/staff-app/brand-logo.png" alt="The Anchorage" width="180" height="180"/></div></div>
48
- <script src="/staff-app/_expo/static/js/web/__expo-metro-runtime-8c088df87a31e4e6accd81c554ec290d.js" defer></script><script src="/staff-app/_expo/static/js/web/__common-1a959de7bbc102f7ba4f900130f6b026.js" defer></script><script src="/staff-app/_expo/static/js/web/index-bac32a25b1d77519149a428dacff0c92.js" defer></script>
49
- <script>/* "Add to Home screen" hint for the Cover Charge web apps (injected into each app's index.html by tools/build_site.py).
50
- Chrome/Edge/Samsung: an Install button (beforeinstallprompt). Huawei Browser, Chrome without an install prompt,
51
- iPhone/iPad Safari: short menu steps. Shown once per app until dismissed; never inside the installed app. */
52
- (function () {
53
- var APP = 'Anchorage Staff', KEY = 'cc-install-hint:' + '/staff-app/';
54
- var standalone = (window.matchMedia && (matchMedia('(display-mode: standalone)').matches || matchMedia('(display-mode: fullscreen)').matches)) || navigator.standalone === true || /CoverChargeTablet|CoverChargePhone\//.test(navigator.userAgent);
55
- if (standalone || window.ccDesktop || /CoverChargeMac/.test(navigator.userAgent)) return;
56
- var bip = null, shown = false;
57
- window.addEventListener('beforeinstallprompt', function (e) { e.preventDefault(); bip = e; if (shown) render(); });
58
- window.addEventListener('appinstalled', function () { try { localStorage.setItem(KEY, 'installed'); } catch (e) {} close(); });
59
- var ua = navigator.userAgent, box, HUAWEI = /HuaweiBrowser|HBPC\//i.test(ua);
60
- function steps() {
61
- if (HUAWEI) return 'In Huawei Browser: tap <b>⋮</b> (or <b>☰</b>), then <b>Add to</b> › <b>Home screen</b> (on some versions <b>Add page to</b> › <b>Home screen</b>). If nothing appears, allow <b>Create shortcuts</b> for the browser in Settings › Apps › Huawei Browser › Permissions.';
62
- if (/iPhone|iPad|iPod/.test(ua)) return 'In Safari: tap <b>Share</b> (the square with an arrow), then <b>Add to Home Screen</b> › <b>Add</b>.';
63
- if (/SamsungBrowser/.test(ua)) return 'Tap <b>☰</b>, then <b>Add page to</b> › <b>Home screen</b>.';
64
- return 'In Chrome: tap <b>⋮</b>, then <b>Add to Home screen</b> or <b>Install app</b>. On Huawei phones also allow <b>Create shortcuts</b> for Chrome in Settings › Apps › Chrome › Permissions.';
65
- }
66
- function close() { if (box) { box.remove(); box = null; } }
67
- function render() {
68
- close(); shown = true;
69
- box = document.createElement('div'); box.id = 'cc-install-hint'; box.setAttribute('role', 'dialog'); box.setAttribute('aria-label', 'Add to Home screen');
70
- box.style.cssText = 'position:fixed;left:10px;right:10px;bottom:calc(76px + env(safe-area-inset-bottom));z-index:2147483000;max-width:520px;margin:0 auto;background:#141414;color:#F2EDE4;border:1px solid #CFA45F;border-radius:14px;padding:'+(innerWidth<600?'9px 12px':'12px 14px')+';font:'+(innerWidth<600?'13px/1.35':'14px/1.45')+' Poppins_400Regular,system-ui,sans-serif;box-shadow:0 6px 24px rgba(0,0,0,.6)';
71
- box.innerHTML = '<div style="font-weight:600;color:#CFA45F;margin-bottom:4px">Add ' + APP + ' to your Home screen</div>' +
72
- '<div>' + (bip && !HUAWEI ? 'It opens like a normal app, full screen, and works without a signal after the first visit.' : steps()) + '</div>' +
73
- '<div style="display:flex;gap:8px;justify-content:flex-end;margin-top:'+(innerWidth<600?'6px':'10px')+'">' +
74
- '<button type="button" data-x="later" style="background:none;border:1px solid #555;color:#F2EDE4;border-radius:10px;padding:7px 12px;font:inherit">Not now</button>' +
75
- (bip ? '<button type="button" data-x="install" style="background:#CFA45F;border:0;color:#000;border-radius:10px;padding:7px 14px;font:inherit;font-weight:600">Install</button>' : '') + '</div>';
76
- box.addEventListener('click', function (e) {
77
- var x = e.target && e.target.getAttribute && e.target.getAttribute('data-x');
78
- if (x === 'later') { try { localStorage.setItem(KEY, 'later'); } catch (er) {} close(); }
79
- if (x === 'install' && bip) { bip.prompt(); bip.userChoice.then(function () { bip = null; close(); }); }
80
- });
81
- place(); document.body.appendChild(box);
82
- }
83
- // v0.2.6: step aside while a sheet or dialog is open (it used to cover the Save button on the booking sheet).
84
- function place() {
85
- if (!box) return;
86
- box.style.display = busy() ? 'none' : '';
87
- }
88
- setInterval(place, 400);
89
- // Also keep out of the way of the first-run welcome and the clock-in privacy note: wait until the welcome has closed,
90
- // then a few seconds more.
91
- function busy() { return !!document.querySelector('[aria-modal="true"], [data-testid="invite-welcome"], [data-testid="invite-bad"]'); }
92
- var calm = 0, waiter = setInterval(function () {
93
- calm = busy() ? 0 : calm + 1;
94
- if (calm < 6) return;
95
- clearInterval(waiter); var s = null; try { s = localStorage.getItem(KEY); } catch (e) {} if (!s) render();
96
- }, 1000);
97
- })();
98
- </script>
99
  </body>
100
  </html>
 
1
  <!doctype html>
2
+ <html lang="en">
3
  <head>
4
+ <meta charset="utf-8" />
5
+ <meta httpEquiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
7
+ <title>The Anchorage · Staff (prototype)</title>
8
  <!-- The `react-native-web` recommended style reset: https://necolas.github.io/react-native-web/docs/setup/#root-element -->
9
  <style id="expo-reset">
10
  /* These styles make the body full-height */
 
23
  flex: 1;
24
  }
25
  </style>
26
+ <link rel="icon" href="/staff-app/favicon.ico"/></head>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  <body>
29
  <!-- Use static rendering with Expo Router to support running without JavaScript. -->
30
  <noscript> You need to enable JavaScript to run this app. </noscript>
31
  <!-- The root element for your Expo app. -->
32
+ <div id="root"></div>
33
+ <script src="/staff-app/_expo/static/js/web/__expo-metro-runtime-8c088df87a31e4e6accd81c554ec290d.js" defer></script><script src="/staff-app/_expo/static/js/web/__common-4c4a28352355eb94209da6e925de2f88.js" defer></script><script src="/staff-app/_expo/static/js/web/index-54b989e287f6a539073f6dafc8bab72d.js" defer></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  </body>
35
  </html>
staff-app/metadata.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":0,"bundler":"metro","fileMetadata":{}}