refactor: reimplement mobile simulator UI using DaisyUI and Tailwind CSS, replacing custom styling and adding a night theme.
This commit is contained in:
@@ -1,105 +1,12 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en" data-theme="night">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>SecureCam Mobile Simulator</title>
|
<title>SecureCam Mobile Simulator</title>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||||
<style>
|
<style>
|
||||||
:root {
|
|
||||||
--bg: #0b1220;
|
|
||||||
--panel: #111b2e;
|
|
||||||
--panel-2: #17243a;
|
|
||||||
--line: #23324d;
|
|
||||||
--text: #e5ecf7;
|
|
||||||
--muted: #9fb0cd;
|
|
||||||
--accent: #14b8a6;
|
|
||||||
--accent-2: #0d9488;
|
|
||||||
--danger: #ef4444;
|
|
||||||
--warn: #f59e0b;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
|
|
||||||
background: linear-gradient(160deg, #08101d 0%, #0b1220 45%, #091425 100%);
|
|
||||||
color: var(--text);
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app {
|
|
||||||
max-width: 430px;
|
|
||||||
margin: 0 auto;
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
border-left: 1px solid rgba(255, 255, 255, 0.06);
|
|
||||||
border-right: 1px solid rgba(255, 255, 255, 0.06);
|
|
||||||
background: radial-gradient(circle at 80% -30%, #1a2a49 0%, transparent 40%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.topbar {
|
|
||||||
padding: 14px 14px 10px;
|
|
||||||
border-bottom: 1px solid var(--line);
|
|
||||||
background: rgba(9, 16, 30, 0.92);
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toprow {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand {
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chip {
|
|
||||||
font-size: 11px;
|
|
||||||
border: 1px solid var(--line);
|
|
||||||
background: #102039;
|
|
||||||
color: var(--muted);
|
|
||||||
border-radius: 999px;
|
|
||||||
padding: 4px 9px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chip.online {
|
|
||||||
color: #22c55e;
|
|
||||||
border-color: #14532d;
|
|
||||||
background: #052e16;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chip.offline {
|
|
||||||
color: #fca5a5;
|
|
||||||
border-color: #7f1d1d;
|
|
||||||
background: #3f0e16;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subtitle {
|
|
||||||
margin: 6px 0 0;
|
|
||||||
color: var(--muted);
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
flex: 1;
|
|
||||||
overflow: auto;
|
|
||||||
padding: 14px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.screen {
|
.screen {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -108,250 +15,228 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.mock-block {
|
||||||
background: linear-gradient(180deg, var(--panel) 0%, #0f182a 100%);
|
white-space: pre-wrap;
|
||||||
border: 1px solid var(--line);
|
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
||||||
border-radius: 14px;
|
|
||||||
padding: 12px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
p {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: 18px;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
font-size: 14px;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p,
|
|
||||||
label,
|
|
||||||
small {
|
|
||||||
color: var(--muted);
|
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
.chip.online {
|
||||||
display: block;
|
--badge-color: color-mix(in oklab, var(--color-success) 35%, transparent);
|
||||||
margin-top: 8px;
|
--badge-fg: var(--color-success-content);
|
||||||
}
|
}
|
||||||
|
|
||||||
input,
|
.chip.offline {
|
||||||
select,
|
--badge-color: color-mix(in oklab, var(--color-error) 35%, transparent);
|
||||||
button {
|
--badge-fg: var(--color-error-content);
|
||||||
width: 100%;
|
|
||||||
border: 1px solid #31476d;
|
|
||||||
background: #0a1527;
|
|
||||||
color: var(--text);
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 10px;
|
|
||||||
font-size: 13px;
|
|
||||||
margin-top: 6px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
.chip {
|
||||||
cursor: pointer;
|
background: var(--badge-color);
|
||||||
font-weight: 700;
|
color: var(--badge-fg);
|
||||||
border-color: #0f766e;
|
border: 1px solid color-mix(in oklab, currentColor 35%, transparent);
|
||||||
background: linear-gradient(180deg, #10b7a6 0%, #0d9488 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
button.alt {
|
|
||||||
border-color: #3a4f73;
|
|
||||||
background: linear-gradient(180deg, #2c3f5f 0%, #21324f 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
button.warn {
|
|
||||||
border-color: #92400e;
|
|
||||||
background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
button.danger {
|
|
||||||
border-color: #991b1b;
|
|
||||||
background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.row {
|
|
||||||
display: flex;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.row > * {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.muted-block {
|
|
||||||
background: #091224;
|
|
||||||
border: 1px solid #203252;
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 10px;
|
|
||||||
color: #c7d5ef;
|
|
||||||
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
||||||
font-size: 11px;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
border-top: 1px solid var(--line);
|
position: sticky;
|
||||||
background: rgba(9, 16, 30, 0.95);
|
bottom: 0;
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
gap: 8px;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav button {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hidden {
|
|
||||||
display: none !important;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="min-h-screen bg-base-300 p-4">
|
||||||
<div class="app">
|
<div class="mx-auto max-w-md">
|
||||||
<header class="topbar">
|
<div class="mockup-phone border-primary/30 bg-base-100 shadow-2xl">
|
||||||
<div class="toprow">
|
<div class="camera"></div>
|
||||||
<div class="brand">SecureCam Mobile</div>
|
<div class="display">
|
||||||
<div class="toprow" style="gap: 6px">
|
<div class="artboard artboard-demo phone-1 bg-base-200">
|
||||||
<span id="authChip" class="chip offline">signed out</span>
|
<div class="flex h-full flex-col">
|
||||||
<span id="socketChip" class="chip offline">offline</span>
|
<header class="navbar border-b border-base-300 bg-base-100/90 px-3 py-2">
|
||||||
|
<div class="flex-1">
|
||||||
|
<div>
|
||||||
|
<h1 class="text-sm font-semibold tracking-wide">SecureCam Mobile</h1>
|
||||||
|
<p id="topSubtitle" class="text-xs text-base-content/70">Open app to continue</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p id="topSubtitle" class="subtitle">Open app to continue</p>
|
<div class="flex items-center gap-1">
|
||||||
|
<span id="authChip" class="chip badge badge-sm offline">signed out</span>
|
||||||
|
<span id="socketChip" class="chip badge badge-sm offline">offline</span>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="content">
|
<main class="flex-1 space-y-3 overflow-auto p-3">
|
||||||
<section id="screen-auth" class="screen active">
|
<section id="screen-auth" class="screen active">
|
||||||
<div class="card">
|
<div class="card border border-base-300 bg-base-100 shadow-sm">
|
||||||
<h2>Welcome</h2>
|
<div class="card-body gap-2 p-4">
|
||||||
<p>Sign in or create an account to use this phone as a camera or client.</p>
|
<h2 class="card-title text-lg">Welcome</h2>
|
||||||
<label>Name</label>
|
<p class="text-sm text-base-content/70">Sign in or create an account to use this phone as a camera or client.</p>
|
||||||
<input id="authName" placeholder="Optional" />
|
|
||||||
<label>Email</label>
|
<label class="form-control w-full">
|
||||||
<input id="authEmail" placeholder="you@example.com" />
|
<span class="label-text text-xs">Name</span>
|
||||||
<label>Password</label>
|
<input id="authName" class="input input-bordered w-full" placeholder="Optional" />
|
||||||
<input id="authPassword" type="password" placeholder="password" />
|
</label>
|
||||||
<div class="row" style="margin-top: 8px">
|
|
||||||
<button id="signUpBtn" class="alt">Create Account</button>
|
<label class="form-control w-full">
|
||||||
<button id="signInBtn">Sign In</button>
|
<span class="label-text text-xs">Email</span>
|
||||||
|
<input id="authEmail" class="input input-bordered w-full" placeholder="you@example.com" />
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="form-control w-full">
|
||||||
|
<span class="label-text text-xs">Password</span>
|
||||||
|
<input id="authPassword" type="password" class="input input-bordered w-full" placeholder="password" />
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="mt-1 grid grid-cols-2 gap-2">
|
||||||
|
<button id="signUpBtn" class="btn btn-outline btn-primary">Create Account</button>
|
||||||
|
<button id="signInBtn" class="btn btn-primary">Sign In</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="screen-onboarding" class="screen">
|
<section id="screen-onboarding" class="screen">
|
||||||
<div class="card">
|
<div class="card border border-base-300 bg-base-100 shadow-sm">
|
||||||
<h2>Set Up This Phone</h2>
|
<div class="card-body gap-2 p-4">
|
||||||
<p>Choose how this phone should behave in your home security setup.</p>
|
<h2 class="card-title text-lg">Set Up This Phone</h2>
|
||||||
<label>Device Name</label>
|
<p class="text-sm text-base-content/70">Choose how this phone should behave in your home security setup.</p>
|
||||||
<input id="deviceName" placeholder="e.g. Hallway iPhone" />
|
|
||||||
<label>Mode</label>
|
<label class="form-control w-full">
|
||||||
<select id="role">
|
<span class="label-text text-xs">Device Name</span>
|
||||||
|
<input id="deviceName" class="input input-bordered w-full" placeholder="e.g. Hallway iPhone" />
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="form-control w-full">
|
||||||
|
<span class="label-text text-xs">Mode</span>
|
||||||
|
<select id="role" class="select select-bordered w-full">
|
||||||
<option value="client">Client (viewer)</option>
|
<option value="client">Client (viewer)</option>
|
||||||
<option value="camera">Camera (records)</option>
|
<option value="camera">Camera (records)</option>
|
||||||
</select>
|
</select>
|
||||||
<label>Push Token (optional)</label>
|
</label>
|
||||||
<input id="pushToken" placeholder="simulated push token" />
|
|
||||||
<button id="registerBtn" style="margin-top: 10px">Finish Setup</button>
|
<label class="form-control w-full">
|
||||||
<button id="loadSavedBtn" class="alt">Load Existing Device</button>
|
<span class="label-text text-xs">Push Token (optional)</span>
|
||||||
|
<input id="pushToken" class="input input-bordered w-full" placeholder="simulated push token" />
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<button id="registerBtn" class="btn btn-primary mt-1">Finish Setup</button>
|
||||||
|
<button id="loadSavedBtn" class="btn btn-outline">Load Existing Device</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="screen-home-client" class="screen">
|
<section id="screen-home-client" class="screen">
|
||||||
<div class="card">
|
<div class="card border border-base-300 bg-base-100 shadow-sm">
|
||||||
<h2>Client Home</h2>
|
<div class="card-body gap-2 p-4">
|
||||||
<p>Monitor cameras and request live streams.</p>
|
<h2 class="card-title text-lg">Client Home</h2>
|
||||||
<div class="row" style="margin-top: 10px">
|
<p class="text-sm text-base-content/70">Monitor cameras and request live streams.</p>
|
||||||
<button id="connectBtn">Go Online</button>
|
|
||||||
<button id="disconnectBtn" class="alt">Go Offline</button>
|
<div class="grid grid-cols-2 gap-2">
|
||||||
|
<button id="connectBtn" class="btn btn-success">Go Online</button>
|
||||||
|
<button id="disconnectBtn" class="btn btn-outline">Go Offline</button>
|
||||||
</div>
|
</div>
|
||||||
<label>Camera Device ID</label>
|
|
||||||
<input id="targetCameraId" placeholder="camera uuid" />
|
<label class="form-control w-full">
|
||||||
<div class="row">
|
<span class="label-text text-xs">Camera Device ID</span>
|
||||||
<button id="linkBtn" class="alt">Link Camera</button>
|
<input id="targetCameraId" class="input input-bordered w-full" placeholder="camera uuid" />
|
||||||
<button id="requestStreamBtn">Request Live View</button>
|
</label>
|
||||||
|
|
||||||
|
<div class="grid grid-cols-2 gap-2">
|
||||||
|
<button id="linkBtn" class="btn btn-outline btn-primary">Link Camera</button>
|
||||||
|
<button id="requestStreamBtn" class="btn btn-primary">Request Live View</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<button id="fetchSubscribeBtn" class="alt">Subscribe Credentials</button>
|
<div class="grid grid-cols-2 gap-2">
|
||||||
<button id="fetchPlaybackBtn" class="alt">Playback Token</button>
|
<button id="fetchSubscribeBtn" class="btn btn-outline">Subscribe Credentials</button>
|
||||||
|
<button id="fetchPlaybackBtn" class="btn btn-outline">Playback Token</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid grid-cols-2 gap-2">
|
||||||
|
<button id="listRecordingsBtn" class="btn btn-outline">My Recordings</button>
|
||||||
|
<button id="downloadLatestRecordingBtn" class="btn btn-outline">Latest Download URL</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<button id="listRecordingsBtn" class="alt">My Recordings</button>
|
|
||||||
<button id="downloadLatestRecordingBtn" class="alt">Latest Download URL</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="screen-home-camera" class="screen">
|
<section id="screen-home-camera" class="screen">
|
||||||
<div class="card">
|
<div class="card border border-base-300 bg-base-100 shadow-sm">
|
||||||
<h2>Camera Home</h2>
|
<div class="card-body gap-2 p-4">
|
||||||
<p>Detect motion, stream live, and finalize recordings.</p>
|
<h2 class="card-title text-lg">Camera Home</h2>
|
||||||
<div class="row" style="margin-top: 10px">
|
<p class="text-sm text-base-content/70">Detect motion, stream live, and finalize recordings.</p>
|
||||||
<button id="connectBtnCam">Go Online</button>
|
|
||||||
<button id="disconnectBtnCam" class="alt">Go Offline</button>
|
<div class="grid grid-cols-2 gap-2">
|
||||||
|
<button id="connectBtnCam" class="btn btn-success">Go Online</button>
|
||||||
|
<button id="disconnectBtnCam" class="btn btn-outline">Go Offline</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<button id="startMotionBtn" class="warn">Start Motion</button>
|
<div class="grid grid-cols-2 gap-2">
|
||||||
<button id="endMotionBtn" class="danger">End Motion</button>
|
<button id="startMotionBtn" class="btn btn-warning">Start Motion</button>
|
||||||
|
<button id="endMotionBtn" class="btn btn-error">End Motion</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid grid-cols-2 gap-2">
|
||||||
|
<button id="fetchPublishBtn" class="btn btn-outline">Publish Credentials</button>
|
||||||
|
<button id="finalizeRecordingBtn" class="btn btn-outline">Finalize Latest Recording</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<button id="fetchPublishBtn" class="alt">Publish Credentials</button>
|
|
||||||
<button id="finalizeRecordingBtn" class="alt">Finalize Latest Recording</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="screen-activity" class="screen">
|
<section id="screen-activity" class="screen">
|
||||||
<div class="card">
|
<div class="card border border-base-300 bg-base-100 shadow-sm">
|
||||||
<h2>Activity</h2>
|
<div class="card-body gap-2 p-4">
|
||||||
<p>Realtime events and push inbox.</p>
|
<h2 class="card-title text-lg">Activity</h2>
|
||||||
<div class="row">
|
<p class="text-sm text-base-content/70">Realtime events and push inbox.</p>
|
||||||
<button id="pollPushInboxBtn" class="alt">Refresh Push Inbox</button>
|
|
||||||
<button id="markLatestPushReadBtn" class="alt">Mark Latest Read</button>
|
<div class="grid grid-cols-2 gap-2">
|
||||||
|
<button id="pollPushInboxBtn" class="btn btn-outline">Refresh Push Inbox</button>
|
||||||
|
<button id="markLatestPushReadBtn" class="btn btn-outline">Mark Latest Read</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<button id="dispatchPushWorkerBtn" class="alt">Dispatch Push Worker</button>
|
<div class="grid grid-cols-2 gap-2">
|
||||||
<button id="fetchAuditBtn" class="alt">My Audit Logs</button>
|
<button id="dispatchPushWorkerBtn" class="btn btn-outline">Dispatch Push Worker</button>
|
||||||
|
<button id="fetchAuditBtn" class="btn btn-outline">My Audit Logs</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="activityState" class="mock-block rounded-box border border-base-300 bg-base-200 p-3"></div>
|
||||||
|
<div id="eventLog" class="mock-block rounded-box max-h-72 overflow-auto border border-base-300 bg-base-200 p-3"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="activityState" class="muted-block" style="margin-top: 10px"></div>
|
|
||||||
<div id="eventLog" class="muted-block" style="margin-top: 10px; max-height: 280px; overflow: auto"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="screen-account" class="screen">
|
<section id="screen-account" class="screen">
|
||||||
<div class="card">
|
<div class="card border border-base-300 bg-base-100 shadow-sm">
|
||||||
<h2>Account</h2>
|
<div class="card-body gap-2 p-4">
|
||||||
<div class="row">
|
<h2 class="card-title text-lg">Account</h2>
|
||||||
<button id="sessionBtn" class="alt">Check Session</button>
|
|
||||||
<button id="signOutBtn" class="danger">Sign Out</button>
|
<div class="grid grid-cols-2 gap-2">
|
||||||
|
<button id="sessionBtn" class="btn btn-outline">Check Session</button>
|
||||||
|
<button id="signOutBtn" class="btn btn-error">Sign Out</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<button id="checkLiveBtn" class="alt">Ops Live</button>
|
<div class="grid grid-cols-3 gap-2">
|
||||||
<button id="checkReadyBtn" class="alt">Ops Ready</button>
|
<button id="checkLiveBtn" class="btn btn-outline btn-sm">Ops Live</button>
|
||||||
<button id="checkMetricsBtn" class="alt">Ops Metrics</button>
|
<button id="checkReadyBtn" class="btn btn-outline btn-sm">Ops Ready</button>
|
||||||
|
<button id="checkMetricsBtn" class="btn btn-outline btn-sm">Ops Metrics</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="accountState" class="mock-block rounded-box border border-base-300 bg-base-200 p-3"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="accountState" class="muted-block" style="margin-top: 10px"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<nav id="bottomNav" class="nav hidden">
|
<nav id="bottomNav" class="nav hidden border-t border-base-300 bg-base-100 p-2">
|
||||||
<button id="navHome">Home</button>
|
<div class="grid grid-cols-3 gap-2">
|
||||||
<button id="navActivity" class="alt">Activity</button>
|
<button id="navHome" class="btn btn-primary btn-sm">Home</button>
|
||||||
<button id="navAccount" class="alt">Account</button>
|
<button id="navActivity" class="btn btn-outline btn-sm">Activity</button>
|
||||||
|
<button id="navAccount" class="btn btn-outline btn-sm">Account</button>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script src="/socket.io/socket.io.js"></script>
|
<script src="/socket.io/socket.io.js"></script>
|
||||||
<script src="/sim/mobile-sim.js" defer></script>
|
<script src="/sim/mobile-sim.js" defer></script>
|
||||||
|
|||||||
@@ -50,11 +50,13 @@
|
|||||||
const updateTop = () => {
|
const updateTop = () => {
|
||||||
const signedIn = Boolean(state.session?.session);
|
const signedIn = Boolean(state.session?.session);
|
||||||
$('authChip').textContent = signedIn ? 'signed in' : 'signed out';
|
$('authChip').textContent = signedIn ? 'signed in' : 'signed out';
|
||||||
$('authChip').className = `chip ${signedIn ? 'online' : 'offline'}`;
|
$('authChip').classList.toggle('online', signedIn);
|
||||||
|
$('authChip').classList.toggle('offline', !signedIn);
|
||||||
|
|
||||||
const socketConnected = Boolean(state.socket?.connected);
|
const socketConnected = Boolean(state.socket?.connected);
|
||||||
$('socketChip').textContent = socketConnected ? 'online' : 'offline';
|
$('socketChip').textContent = socketConnected ? 'online' : 'offline';
|
||||||
$('socketChip').className = `chip ${socketConnected ? 'online' : 'offline'}`;
|
$('socketChip').classList.toggle('online', socketConnected);
|
||||||
|
$('socketChip').classList.toggle('offline', !socketConnected);
|
||||||
|
|
||||||
if (!signedIn) {
|
if (!signedIn) {
|
||||||
$('topSubtitle').textContent = 'Sign in to continue';
|
$('topSubtitle').textContent = 'Sign in to continue';
|
||||||
|
|||||||
Reference in New Issue
Block a user