|
73 | 73 | this.manualConfigSection = this.shadowRoot.getElementById('manualConfigSection'); |
74 | 74 | this.presetSection = this.shadowRoot.getElementById('presetSection'); |
75 | 75 | this.menuTitle = this.shadowRoot.querySelector('.menu-title'); |
| 76 | + this.homeBtn = this.shadowRoot.getElementById('homeBtn'); |
| 77 | + |
| 78 | + // Home button — navigate to kiosk dashboard (use same host as current page) |
| 79 | + this.homeBtn?.addEventListener('click', () => { |
| 80 | + const host = window.location.hostname || '127.0.0.1'; |
| 81 | + window.location.href = 'http://' + host; |
| 82 | + }); |
76 | 83 |
|
77 | 84 | // Remove cursor after typewriter animation |
78 | 85 | this.menuTitle?.addEventListener('animationend', (e) => { |
|
575 | 582 | .mode-btn.active[data-mode="native"] { background: rgba(33, 150, 243, 0.25); } |
576 | 583 | .mode-btn:disabled { opacity: 0.25; cursor: not-allowed; } |
577 | 584 | .mode-btn + .mode-btn { border-left: 1px solid rgba(255, 255, 255, 0.08); } |
| 585 | +
|
| 586 | + .home-btn { |
| 587 | + position: fixed; |
| 588 | + bottom: 16px; |
| 589 | + left: 16px; |
| 590 | + width: 40px; |
| 591 | + height: 40px; |
| 592 | + border-radius: 50%; |
| 593 | + border: 1px solid rgba(255, 255, 255, 0.15); |
| 594 | + background: rgba(0, 0, 0, 0.6); |
| 595 | + color: rgba(255, 255, 255, 0.5); |
| 596 | + display: flex; |
| 597 | + align-items: center; |
| 598 | + justify-content: center; |
| 599 | + cursor: pointer; |
| 600 | + pointer-events: auto; |
| 601 | + transition: all 0.2s; |
| 602 | + z-index: 1001; |
| 603 | + padding: 0; |
| 604 | + } |
| 605 | + .home-btn:hover { background: rgba(0, 0, 0, 0.8); color: rgba(255, 255, 255, 0.8); border-color: rgba(255, 255, 255, 0.3); } |
| 606 | + .home-btn:active { transform: scale(0.9); } |
| 607 | + .home-btn svg { width: 20px; height: 20px; fill: currentColor; } |
578 | 608 | </style> |
579 | 609 |
|
580 | 610 | <div class="player-status" id="playerStatus"> |
|
583 | 613 | <div class="player-indicator" data-player="2"><span class="pip"></span><span>P3</span></div> |
584 | 614 | <div class="player-indicator" data-player="3"><span class="pip"></span><span>P4</span></div> |
585 | 615 | </div> |
| 616 | + <button class="home-btn" id="homeBtn" title="Dashboard"> |
| 617 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg> |
| 618 | + </button> |
586 | 619 | <div class="game-controls" id="gameControls"> |
587 | 620 | <div class="menu-header"> |
588 | 621 | <div class="title-wrapper"> |
|
0 commit comments