shows fullscreen button only on browsers that support this feature

This commit is contained in:
Lars Berning 2022-01-17 21:19:30 +01:00
parent a9ddd0489c
commit 0159a5f3c3
No known key found for this signature in database
GPG Key ID: 028E73C9E1D8A0B3
1 changed files with 3 additions and 2 deletions

View File

@ -28,8 +28,9 @@ export class DashboardActions extends AppElement {
renderOptionalButtons () {
const buttons = []
// changing to fullscreen mode only makes sence when the app is openend in a regular
// webbrowser (kiosk and standalone mode are always in fullscreen view)
if (this.appState.appMode === 'BROWSER') {
// webbrowser (kiosk and standalone mode are always in fullscreen view) and the browser
// supports this feature
if (this.appState.appMode === 'BROWSER' && document.documentElement.requestFullscreen) {
buttons.push(html`
<button @click=${this.toggleFullscreen}>
<div id="fullscreen-icon">${icon_expand}</div>