|
180 | 180 | currentView.set('stopwatch') |
181 | 181 | } |
182 | 182 |
|
| 183 | + function startSolo() { |
| 184 | + unlockAudio() |
| 185 | + roomState.set({ code: null, isHost: true, isSolo: true, connectedPeers: [] }) |
| 186 | + saveRoomState({ isSolo: true, isHost: true }) |
| 187 | + currentView.set('lobby') |
| 188 | + } |
| 189 | +
|
183 | 190 | function timeAgo(ts) { |
184 | 191 | const diff = Date.now() - ts |
185 | 192 | const min = Math.floor(diff / 60000) |
|
258 | 265 | </div> |
259 | 266 | </div> |
260 | 267 |
|
261 | | - <button class="btn-ghost stopwatch-btn" onclick={openStopwatch}> |
262 | | - <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
263 | | - <circle cx="12" cy="13" r="8"/> |
264 | | - <polyline points="12 9 12 13 14.5 15"/> |
265 | | - <path d="M9 3h6M12 3v2"/> |
266 | | - </svg> |
267 | | - {$t('stopwatch')} |
268 | | - </button> |
| 268 | + <div class="ghost-row"> |
| 269 | + <button class="btn-ghost" onclick={startSolo}> |
| 270 | + <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
| 271 | + <circle cx="12" cy="8" r="4"/> |
| 272 | + <path d="M4 20c0-4 3.6-7 8-7s8 3 8 7"/> |
| 273 | + </svg> |
| 274 | + {$t('soloMode')} |
| 275 | + </button> |
| 276 | + <button class="btn-ghost" onclick={openStopwatch}> |
| 277 | + <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
| 278 | + <circle cx="12" cy="13" r="8"/> |
| 279 | + <polyline points="12 9 12 13 14.5 15"/> |
| 280 | + <path d="M9 3h6M12 3v2"/> |
| 281 | + </svg> |
| 282 | + {$t('stopwatch')} |
| 283 | + </button> |
| 284 | + </div> |
269 | 285 |
|
270 | 286 | <button class="btn-ghost display-btn" onclick={() => { showDisplayForm = !showDisplayForm; error = '' }}> |
271 | 287 | <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> |
|
533 | 549 | border-color: rgba(255,255,255,0.15); |
534 | 550 | } |
535 | 551 |
|
| 552 | + .ghost-row { |
| 553 | + display: flex; |
| 554 | + gap: 0.4rem; |
| 555 | + } |
| 556 | +
|
| 557 | + .ghost-row .btn-ghost { |
| 558 | + flex: 1; |
| 559 | + } |
| 560 | +
|
536 | 561 | /* ── Recent rooms ── */ |
537 | 562 | .recent-rooms { |
538 | 563 | display: flex; |
|
0 commit comments