Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fixed-kiosk-dark-default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Kiosk mode (`?kiosk=1`) always renders the dark theme unless `&theme=light` is given, so a fresh headless streamer profile no longer broadcasts light mode.
3 changes: 2 additions & 1 deletion src/docs/streaming-the-activity-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ position. For hive's hive that is `hivecommons/hive`, a public repository. It
does **not** render tokens, secrets, settings, webhooks, chat, or the
operator's agent terminals; `?kiosk=1` additionally hides the sidebar, topbar,
avatar/settings menus, notices, the Welcome and NPS dialogs, and every other
dashboard section. Do not point the streamer at a hive tracking private
dashboard section, and renders dark regardless of any stored theme
(append `&theme=light` for a light stream). Do not point the streamer at a hive tracking private
repositories without reviewing what the tracker would show.

## Quick manual test with OBS (no cluster)
Expand Down
3 changes: 3 additions & 0 deletions src/pkg/dashboard/static-src/js/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
var m=localStorage.getItem('hive-layout-mode');
if(m==='openclaw')m='light';
if(m==='classic')m='dark';
// A kiosk (#15594) is a broadcast surface with no operator to flip the
// toggle; it always renders dark unless the URL says otherwise.
if(window.HIVE_KIOSK){ var kt=null; try { kt=new URL(window.location.href).searchParams.get('theme'); } catch(e) {} m=(kt==='light')?'light':'dark'; }
if(!m)m='light';
if(m==='light'){document.body.classList.add('light-mode')}
document.body.style.opacity='0';
Expand Down
1 change: 1 addition & 0 deletions src/pkg/dashboard/static-src/js/layout.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/pkg/dashboard/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6716,6 +6716,9 @@
var m=localStorage.getItem('hive-layout-mode');
if(m==='openclaw')m='light';
if(m==='classic')m='dark';
// A kiosk (#15594) is a broadcast surface with no operator to flip the
// toggle; it always renders dark unless the URL says otherwise.
if(window.HIVE_KIOSK){ var kt=null; try { kt=new URL(window.location.href).searchParams.get('theme'); } catch(e) {} m=(kt==='light')?'light':'dark'; }
if(!m)m='light';
if(m==='light'){document.body.classList.add('light-mode')}
document.body.style.opacity='0';
Expand Down Expand Up @@ -10478,6 +10481,7 @@ <h3 class="faq-group-title">Where to get help</h3>
const LAYOUT_TITLES = { dark: 'Switch to Light Mode', light: 'Switch to Dark Mode' };
function getLayout() {
let stored = localStorage.getItem(LAYOUT_KEY) || 'light';
if (window.hiveKioskMode && window.hiveKioskMode()) { let kt = null; try { kt = new URL(window.location.href).searchParams.get('theme'); } catch (e) {} stored = kt === 'light' ? 'light' : 'dark'; }
if (stored === 'openclaw') { stored = 'light'; setLayout(stored); }
if (stored === 'classic') { stored = 'dark'; setLayout(stored); }
return LAYOUT_MODES.includes(stored) ? stored : 'light';
Expand Down
Loading