+
Whitelisted Shops
+Shops listed here bypass subscription checks and get full app access.
+
-
@@ -493,7 +541,6 @@ async function doLogout() {
await api('POST', '/logout');
document.getElementById('dashboard').style.display = 'none';
document.getElementById('login-screen').style.display = 'flex';
- document.getElementById('login-bg').style.display = 'block';
document.getElementById('inp-user').value = '';
document.getElementById('inp-pass').value = '';
}
@@ -501,7 +548,6 @@ async function doLogout() {
// ── SHOW DASHBOARD ──────────────────────────────────────────────────────────
function showDashboard() {
document.getElementById('login-screen').style.display = 'none';
- document.getElementById('login-bg').style.display = 'none';
document.getElementById('dashboard').style.display = 'block';
loadShops();
}
@@ -513,26 +559,28 @@ async function loadShops() {
if (!r.ok) { wrap.innerHTML = ''; return; }
const shops = r.data.shops || [];
- document.getElementById('shops-count').textContent = shops.length + ' shop' + (shops.length !== 1 ? 's' : '');
+ const countLabel = shops.length + ' shop' + (shops.length !== 1 ? 's' : '');
+ document.getElementById('shops-count').textContent = countLabel;
+ document.getElementById('shops-count-table').textContent = countLabel;
if (shops.length === 0) {
- wrap.innerHTML = '';
+ wrap.innerHTML = '';
return;
}
const rows = shops.map(s => {
const statusTag = s.expired
- ? 'Expired'
+ ? 'Expired'
: s.permanent
- ? 'Permanent'
- : 'Active';
+ ? 'Permanent'
+ : 'Active';
const expiryDisplay = s.expiresAt
- ? '' + new Date(s.expiresAt).toLocaleDateString(undefined,{year:'numeric',month:'short',day:'numeric'}) + ''
- : 'Never';
+ ? '' + new Date(s.expiresAt).toLocaleDateString(undefined,{year:'numeric',month:'short',day:'numeric'}) + ''
+ : 'Never';
const grantedDisplay = s.grantedAt
- ? '' + new Date(s.grantedAt).toLocaleDateString(undefined,{year:'numeric',month:'short',day:'numeric'}) + ''
+ ? '' + new Date(s.grantedAt).toLocaleDateString(undefined,{year:'numeric',month:'short',day:'numeric'}) + ''
: '—';
return \`
➕ Grant Free Access to a Shop
+
+
+
+
+ Grant Free Access
+Add a shop domain and optional expiry date.
+
-
+
-
+
@@ -430,11 +478,11 @@ function adminHtml() {
-
🏪 Whitelisted Shops
- 0 shops +Active Whitelist
+ 0 shops
-
+
Failed to load shops
🏪
No shops added yet.
Use the form above to grant free access.
Use the form above to grant free access.
🏪
No shops added yet.
Use the form above to grant free access to a shop.