Spaces:
Running
Running
File size: 6,648 Bytes
51877df b5c0b66 51877df b5c0b66 51877df b5c0b66 51877df b5c0b66 09e2ef4 51877df b5c0b66 | 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-GB"><head><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-->
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<meta name="robots" content="noindex,nofollow"><meta name="referrer" content="no-referrer">
<meta name="apple-mobile-web-app-capable" content="yes"><meta name="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="CoverCharge">
<link rel="apple-touch-icon" href="../staff-app/apple-touch-icon.png">
<meta property="og:title" content="CoverCharge"><meta property="og:description" content="Your personal restaurant app">
<title>CoverCharge</title>
<style>html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#0d0b08;color:#f3ead8;font:18px system-ui}#opening{position:absolute;inset:0;display:grid;place-content:center;text-align:center;padding:24px}iframe{position:absolute;inset:0;border:0;width:100%;height:100%;height:100dvh;visibility:hidden}#opening small{display:block;max-width:30em;color:#d6a84a;margin-top:14px;font-size:16px}button{min-height:44px;min-width:44px;background:#171510;color:#d6a84a;border:1px solid #d6a84a;padding:12px;font:18px system-ui}</style>
<!-- No manifest and no top-level navigation: Home Screen retains the complete fragment across storage purges.
This private bearer capability is required even before first use; never put it into HTTP queries. -->
</head><body><div id="opening" role="status">Opening your CoverCharge app…<small>You are signed in automatically. No password or sign-in step.</small></div>
<script>(function(){'use strict';
// Opening a different personal link can be a same-document fragment navigation in Safari. Re-run the gate before showing anyone.
if(window.addEventListener)window.addEventListener('hashchange',function(){if(frame)frame.style.visibility='hidden';location.reload()});
var q=new URLSearchParams(location.hash.slice(1)),t=q.get('i'),d=q.get('d'),opening=document.getElementById('opening');
var app=new URLSearchParams(location.search).get('a');if(!/^(owner|chef|staff)$/.test(app||''))app='staff';
var key='cc-iphone-launch:v1:'+app;
// A restored Safari tab can omit its fragment. Repair it from this app's saved launcher, never another person's partial link.
if(!location.hash){try{var saved=JSON.parse(localStorage.getItem(key)||'null');if(saved){t=saved.token;d=saved.device;
if(/^[A-Za-z0-9_-]{16,64}$/.test(t||'')&&/^[A-Za-z0-9_-]{16,64}$/.test(d||''))window.history.replaceState(window.history.state,'',location.pathname+location.search+'#i='+encodeURIComponent(t)+'&d='+encodeURIComponent(d));
}}catch(e){}}
if(!/^[A-Za-z0-9_-]{16,64}$/.test(t||'')||!/^[A-Za-z0-9_-]{16,64}$/.test(d||'')){
opening.textContent='Open your complete personal link from the message. Your account opens automatically.';return;
}
function seed(){try{localStorage.setItem('covercharge-device-id',d);localStorage.setItem(key,JSON.stringify({token:t,device:d}));return true}catch(e){opening.textContent='Please allow website storage so your app can remember you.';return false}}
if(!seed())return;
var frame=document.createElement('iframe');frame.title='Your CoverCharge app';frame.allow='geolocation; microphone; camera; clipboard-write';
function launch(){seed();frame.src='../'+app+'-app/index.html#invite='+encodeURIComponent(t)}
function ready(){try{
var doc=frame.contentDocument,body=doc&&doc.body,text=body?body.innerText:'';
var sync=frame.contentWindow.__ccSync&&frame.contentWindow.__ccSync();
var header=doc&&doc.querySelector&&doc.querySelector('[data-testid="header-me"]');
var headerText=header&&(header.innerText||header.textContent||'')||'';
var preview=/\(preview\)/i.test(headerText);
var signedHeader=header&&headerText.trim()&&!preview&&/^Signed in as\b/.test(header.getAttribute('aria-label')||'');
if(sync&&sync.kind==='staff'&&sync.staffRef&&!preview&&(signedHeader||/Signed in as\b/.test(text))){
frame.style.visibility='visible';opening.style.display='none';return true;
}
// Refusals must be visible rather than hidden behind an endless opening message.
if(/This link can.t be used here|This person is no longer|This app is signed out/.test(text)){frame.style.visibility='visible';opening.style.display='none';return true}
return false;
}catch(e){return false}}
frame.addEventListener('load',function(){ready();try{new MutationObserver(ready).observe(frame.contentDocument.documentElement,{childList:true,subtree:true,characterData:true})}catch(e){}});
launch();document.body.appendChild(frame);
window.addEventListener('online',function(){if(!ready())launch()});
var n=0,timer=setInterval(function(){if(ready()){clearInterval(timer);return}if(++n===60){opening.innerHTML='Still connecting to CoverCharge…<small>Your personal link signs you in automatically when the connection returns. Keep this page open.</small>';var retry=document.createElement('button');retry.id='retry';retry.textContent='Try again';retry.onclick=function(){n=0;launch()};opening.appendChild(retry)}},500);
})();</script><noscript>Enable JavaScript in Safari to open your personal CoverCharge app.</noscript></body></html>
|