misc: combining --read-only and --fullscreen now disables F11 on built-in client

This commit is contained in:
jean-emmanuel 2025-04-08 10:48:46 +02:00
parent 98e5670011
commit dc9f1435e3
4 changed files with 4 additions and 0 deletions

View file

@ -14,6 +14,7 @@ window.PACKAGE = require('../../package.json')
window.LOADING = null
window.READ_ONLY = window.READ_ONLY || false
window.KIOSK = window.KIOSK || false
window.GRIDWIDTH_CSS = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--grid-width'))
window.GRIDWIDTH = GRIDWIDTH_CSS

View file

@ -210,6 +210,7 @@ var menuEntries = [
},
{
label: locales('fullscreen'),
disabled: KIOSK && navigator.userAgent.match(/OpenStageControl/), // built-in electron client only
class: ()=>{return 'toggle ' + (fullscreen.isFullscreen ? 'on' : 'off')},
action: ()=>{
if (fullscreen.isEnabled) fullscreen.toggle()

View file

@ -104,6 +104,7 @@ function httpRoute(req, res) {
window.IP=${JSON.stringify(ip)}
window.ENV=${JSON.stringify(clientOptions)}
window.READ_ONLY=${JSON.stringify(settings.read('read-only'))}
window.KIOSK=${settings.read('read-only') && settings.read('fullscreen') ? 'true' : 'false'}
window.AUTH=\`${(req.headers.authorization || '').replace('Basic ', '').replace('/', '_')}\`
</script></body>`))
.pipe(res)