Update public/admin/index.html
Browse files- public/admin/index.html +153 -137
public/admin/index.html
CHANGED
|
@@ -9,166 +9,182 @@
|
|
| 9 |
<body>
|
| 10 |
<div id="root">
|
| 11 |
|
| 12 |
-
<!--
|
| 13 |
-
<
|
| 14 |
-
<div id="
|
| 15 |
-
|
| 16 |
-
<
|
| 17 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
</div>
|
| 19 |
-
</
|
| 20 |
|
| 21 |
-
<!--
|
| 22 |
-
<
|
| 23 |
-
<button class="tab-btn active" data-tab="notifications">NOTIFICATIONS</button>
|
| 24 |
-
<button class="tab-btn" data-tab="devices">DEVICES</button>
|
| 25 |
-
</nav>
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
<input id="f-name" type="text" placeholder="e.g. promo-sept-24" />
|
| 37 |
-
</div>
|
| 38 |
-
<div class="form-group">
|
| 39 |
-
<label for="f-heading">Heading</label>
|
| 40 |
-
<input id="f-heading" type="text" placeholder="Notification heading" />
|
| 41 |
-
</div>
|
| 42 |
-
<div class="form-group">
|
| 43 |
-
<label for="f-body">Body</label>
|
| 44 |
-
<textarea id="f-body" rows="4" placeholder="Notification body text..."></textarea>
|
| 45 |
-
</div>
|
| 46 |
-
<div class="form-group">
|
| 47 |
-
<label for="f-hyperlink">Hyperlink</label>
|
| 48 |
-
<input id="f-hyperlink" type="url" placeholder="https://..." />
|
| 49 |
-
</div>
|
| 50 |
-
<div class="form-group">
|
| 51 |
-
<label for="f-sound">Sound</label>
|
| 52 |
-
<select id="f-sound">
|
| 53 |
-
<option value="">β No Sound β</option>
|
| 54 |
-
</select>
|
| 55 |
-
</div>
|
| 56 |
-
<div class="form-group">
|
| 57 |
-
<label>Upload Sound File</label>
|
| 58 |
-
<div id="sound-upload-area">
|
| 59 |
-
<input id="f-sound-file" type="file" accept="audio/*" hidden />
|
| 60 |
-
<button id="sound-upload-btn" class="btn-outline" type="button">
|
| 61 |
-
β² UPLOAD AUDIO
|
| 62 |
-
</button>
|
| 63 |
-
<span id="sound-file-name">No file chosen</span>
|
| 64 |
-
</div>
|
| 65 |
-
<input id="f-sound-name" type="text" placeholder="Sound name (required for upload)" style="margin-top:8px" />
|
| 66 |
-
</div>
|
| 67 |
-
<button id="create-notif-btn" class="btn-create">CREATE NOTIFICATION</button>
|
| 68 |
-
</aside>
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
<div id="notif-list">
|
| 74 |
-
<div class="empty-state">No notifications yet.</div>
|
| 75 |
-
</div>
|
| 76 |
-
</main>
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
<div class="
|
| 82 |
-
<
|
| 83 |
-
<
|
| 84 |
</div>
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
</div>
|
| 90 |
-
<
|
| 91 |
-
<
|
| 92 |
-
|
| 93 |
-
<div id="schedule-controls">
|
| 94 |
-
<div class="toggle-row">
|
| 95 |
-
<label class="toggle-label" for="now-toggle">NOW</label>
|
| 96 |
-
<label class="toggle-switch">
|
| 97 |
-
<input type="checkbox" id="now-toggle" />
|
| 98 |
-
<span class="toggle-track"><span class="toggle-thumb"></span></span>
|
| 99 |
-
</label>
|
| 100 |
</div>
|
| 101 |
-
<
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
</div>
|
| 106 |
-
<div
|
| 107 |
-
<
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
</div>
|
|
|
|
| 110 |
</div>
|
| 111 |
-
<button id="schedule-btn" class="btn-schedule">SCHEDULE</button>
|
| 112 |
</div>
|
| 113 |
-
</
|
| 114 |
-
</section>
|
| 115 |
|
|
|
|
| 116 |
</div>
|
| 117 |
-
</div>
|
| 118 |
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
<div id="device-list">
|
| 127 |
-
<div class="empty-state">No devices connected yet.</div>
|
| 128 |
-
</div>
|
| 129 |
-
</aside>
|
| 130 |
-
|
| 131 |
-
<!-- Device Detail -->
|
| 132 |
-
<main id="device-detail-panel">
|
| 133 |
-
<div id="device-empty-state" class="select-hint">
|
| 134 |
-
<div class="select-hint-icon">β</div>
|
| 135 |
-
<p>Select a device<br>to manage it</p>
|
| 136 |
-
</div>
|
| 137 |
-
<div id="device-detail" style="display:none">
|
| 138 |
-
<div id="device-header">
|
| 139 |
-
<div id="device-status-indicator" class="indicator"></div>
|
| 140 |
-
<div>
|
| 141 |
-
<div id="detail-device-name-display" class="device-detail-name"></div>
|
| 142 |
-
<div id="detail-device-uuid" class="device-detail-uuid"></div>
|
| 143 |
-
</div>
|
| 144 |
-
<div id="device-name-edit-area">
|
| 145 |
-
<input id="device-name-input" type="text" placeholder="Device name..." />
|
| 146 |
-
<button id="device-name-save" class="btn-sm">SAVE NAME</button>
|
| 147 |
-
</div>
|
| 148 |
</div>
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
<div id="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
</div>
|
| 159 |
-
<div
|
| 160 |
-
<
|
| 161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
</div>
|
| 163 |
</div>
|
| 164 |
-
</
|
| 165 |
-
</
|
| 166 |
-
|
| 167 |
</div>
|
| 168 |
-
|
|
|
|
| 169 |
|
| 170 |
</div><!-- /#root -->
|
| 171 |
|
| 172 |
<script src="/admin/script.js"></script>
|
| 173 |
</body>
|
| 174 |
-
</html>
|
|
|
|
| 9 |
<body>
|
| 10 |
<div id="root">
|
| 11 |
|
| 12 |
+
<!-- ββ LOGIN SCREEN ββ -->
|
| 13 |
+
<div id="login-screen">
|
| 14 |
+
<div id="login-box">
|
| 15 |
+
<div id="login-logo">DISPATCH</div>
|
| 16 |
+
<div id="login-subtitle">ADMIN ACCESS</div>
|
| 17 |
+
<div id="login-form">
|
| 18 |
+
<div class="form-group">
|
| 19 |
+
<label for="login-password">ACCESS KEY</label>
|
| 20 |
+
<input id="login-password" type="password" placeholder="Enter key..." autocomplete="current-password" />
|
| 21 |
+
</div>
|
| 22 |
+
<div id="login-error"></div>
|
| 23 |
+
<button id="login-btn" class="btn-create">AUTHENTICATE</button>
|
| 24 |
+
</div>
|
| 25 |
+
<div id="login-connecting" style="display:none">
|
| 26 |
+
<div class="spinner"></div>
|
| 27 |
+
<span>Connecting...</span>
|
| 28 |
+
</div>
|
| 29 |
</div>
|
| 30 |
+
</div>
|
| 31 |
|
| 32 |
+
<!-- ββ MAIN APP (hidden until authenticated) ββ -->
|
| 33 |
+
<div id="app" style="display:none">
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
<!-- Top Bar -->
|
| 36 |
+
<header id="topbar">
|
| 37 |
+
<div id="topbar-logo">DISPATCH</div>
|
| 38 |
+
<div id="topbar-status">
|
| 39 |
+
<span id="ws-indicator" class="indicator offline"></span>
|
| 40 |
+
<span id="ws-label">OFFLINE</span>
|
| 41 |
+
<button id="logout-btn" class="btn-logout">LOGOUT</button>
|
| 42 |
+
</div>
|
| 43 |
+
</header>
|
| 44 |
|
| 45 |
+
<!-- Tabs -->
|
| 46 |
+
<nav id="tabs">
|
| 47 |
+
<button class="tab-btn active" data-tab="notifications">NOTIFICATIONS</button>
|
| 48 |
+
<button class="tab-btn" data-tab="devices">DEVICES</button>
|
| 49 |
+
</nav>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
+
<!-- ββ NOTIFICATIONS TAB ββ -->
|
| 52 |
+
<div id="tab-notifications" class="tab-panel active">
|
| 53 |
+
<div id="notif-layout">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
+
<!-- LEFT: Create Notification Form -->
|
| 56 |
+
<aside id="create-panel">
|
| 57 |
+
<h2 class="panel-title">NEW NOTIFICATION</h2>
|
| 58 |
+
<div class="form-group">
|
| 59 |
+
<label for="f-name">Internal Name</label>
|
| 60 |
+
<input id="f-name" type="text" placeholder="e.g. promo-sept-24" />
|
| 61 |
</div>
|
| 62 |
+
<div class="form-group">
|
| 63 |
+
<label for="f-heading">Heading</label>
|
| 64 |
+
<input id="f-heading" type="text" placeholder="Notification heading" />
|
| 65 |
+
</div>
|
| 66 |
+
<div class="form-group">
|
| 67 |
+
<label for="f-body">Body</label>
|
| 68 |
+
<textarea id="f-body" rows="4" placeholder="Notification body text..."></textarea>
|
| 69 |
+
</div>
|
| 70 |
+
<div class="form-group">
|
| 71 |
+
<label for="f-hyperlink">Hyperlink</label>
|
| 72 |
+
<input id="f-hyperlink" type="url" placeholder="https://..." />
|
| 73 |
+
</div>
|
| 74 |
+
<div class="form-group">
|
| 75 |
+
<label for="f-sound">Sound</label>
|
| 76 |
+
<select id="f-sound">
|
| 77 |
+
<option value="">β No Sound β</option>
|
| 78 |
+
</select>
|
| 79 |
+
</div>
|
| 80 |
+
<div class="form-group">
|
| 81 |
+
<label>Upload Sound File</label>
|
| 82 |
+
<div id="sound-upload-area">
|
| 83 |
+
<input id="f-sound-file" type="file" accept="audio/*" hidden />
|
| 84 |
+
<button id="sound-upload-btn" class="btn-outline" type="button">β² UPLOAD AUDIO</button>
|
| 85 |
+
<span id="sound-file-name">No file chosen</span>
|
| 86 |
+
</div>
|
| 87 |
+
<input id="f-sound-name" type="text" placeholder="Sound name (required for upload)" style="margin-top:8px" />
|
| 88 |
+
</div>
|
| 89 |
+
<button id="create-notif-btn" class="btn-create">CREATE NOTIFICATION</button>
|
| 90 |
+
</aside>
|
| 91 |
+
|
| 92 |
+
<!-- MIDDLE: Notification List -->
|
| 93 |
+
<main id="notif-list-panel">
|
| 94 |
+
<h2 class="panel-title">ALL NOTIFICATIONS <span id="notif-count" class="badge">0</span></h2>
|
| 95 |
+
<div id="notif-list">
|
| 96 |
+
<div class="empty-state">No notifications yet.</div>
|
| 97 |
+
</div>
|
| 98 |
+
</main>
|
| 99 |
+
|
| 100 |
+
<!-- RIGHT: Schedule Panel -->
|
| 101 |
+
<section id="schedule-panel">
|
| 102 |
+
<div id="schedule-empty-state">
|
| 103 |
+
<div class="select-hint">
|
| 104 |
+
<div class="select-hint-icon">β</div>
|
| 105 |
+
<p>Select a notification<br>to schedule or play it</p>
|
| 106 |
+
</div>
|
| 107 |
</div>
|
| 108 |
+
<div id="schedule-active" style="display:none">
|
| 109 |
+
<div id="selected-notif-info">
|
| 110 |
+
<div id="selected-notif-name"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
</div>
|
| 112 |
+
<button id="play-now-btn" title="Play Now"><span>βΆ PLAY NOW</span></button>
|
| 113 |
+
<div id="schedule-controls">
|
| 114 |
+
<div class="toggle-row">
|
| 115 |
+
<label class="toggle-label" for="now-toggle">NOW</label>
|
| 116 |
+
<label class="toggle-switch">
|
| 117 |
+
<input type="checkbox" id="now-toggle" />
|
| 118 |
+
<span class="toggle-track"><span class="toggle-thumb"></span></span>
|
| 119 |
+
</label>
|
| 120 |
</div>
|
| 121 |
+
<div id="datetime-pickers">
|
| 122 |
+
<div class="picker-group">
|
| 123 |
+
<label>DATE</label>
|
| 124 |
+
<input type="date" id="sched-date" />
|
| 125 |
+
</div>
|
| 126 |
+
<div class="picker-group">
|
| 127 |
+
<label>TIME</label>
|
| 128 |
+
<input type="time" id="sched-time" />
|
| 129 |
+
</div>
|
| 130 |
</div>
|
| 131 |
+
<button id="schedule-btn" class="btn-schedule">SCHEDULE</button>
|
| 132 |
</div>
|
|
|
|
| 133 |
</div>
|
| 134 |
+
</section>
|
|
|
|
| 135 |
|
| 136 |
+
</div>
|
| 137 |
</div>
|
|
|
|
| 138 |
|
| 139 |
+
<!-- ββ DEVICES TAB ββ -->
|
| 140 |
+
<div id="tab-devices" class="tab-panel">
|
| 141 |
+
<div id="devices-layout">
|
| 142 |
+
<aside id="device-list-panel">
|
| 143 |
+
<h2 class="panel-title">DEVICES <span id="device-count" class="badge">0</span></h2>
|
| 144 |
+
<div id="device-list">
|
| 145 |
+
<div class="empty-state">No devices connected yet.</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
</div>
|
| 147 |
+
</aside>
|
| 148 |
+
<main id="device-detail-panel">
|
| 149 |
+
<div id="device-empty-state" class="select-hint">
|
| 150 |
+
<div class="select-hint-icon">β</div>
|
| 151 |
+
<p>Select a device<br>to manage it</p>
|
| 152 |
+
</div>
|
| 153 |
+
<div id="device-detail" style="display:none">
|
| 154 |
+
<div id="device-header">
|
| 155 |
+
<div id="device-status-indicator" class="indicator"></div>
|
| 156 |
+
<div>
|
| 157 |
+
<div id="detail-device-name-display" class="device-detail-name"></div>
|
| 158 |
+
<div id="detail-device-uuid" class="device-detail-uuid"></div>
|
| 159 |
+
</div>
|
| 160 |
+
<div id="device-name-edit-area">
|
| 161 |
+
<input id="device-name-input" type="text" placeholder="Device name..." />
|
| 162 |
+
<button id="device-name-save" class="btn-sm">SAVE NAME</button>
|
| 163 |
+
</div>
|
| 164 |
</div>
|
| 165 |
+
<div id="device-sections">
|
| 166 |
+
<div class="device-section">
|
| 167 |
+
<h3>CACHED SOUNDS</h3>
|
| 168 |
+
<div id="detail-sounds" class="tag-list"></div>
|
| 169 |
+
</div>
|
| 170 |
+
<div class="device-section">
|
| 171 |
+
<h3>NOTIFICATIONS</h3>
|
| 172 |
+
<div id="detail-notifications" class="notif-table-wrap"></div>
|
| 173 |
+
</div>
|
| 174 |
+
<div class="device-section">
|
| 175 |
+
<h3>SCHEDULE</h3>
|
| 176 |
+
<div id="detail-schedule" class="schedule-table-wrap"></div>
|
| 177 |
+
</div>
|
| 178 |
</div>
|
| 179 |
</div>
|
| 180 |
+
</main>
|
| 181 |
+
</div>
|
|
|
|
| 182 |
</div>
|
| 183 |
+
|
| 184 |
+
</div><!-- /#app -->
|
| 185 |
|
| 186 |
</div><!-- /#root -->
|
| 187 |
|
| 188 |
<script src="/admin/script.js"></script>
|
| 189 |
</body>
|
| 190 |
+
</html>
|