Add fullscreen toggle button.

This commit is contained in:
Julian Stirling 2025-08-21 18:48:31 +01:00
parent 46be2c770e
commit 98193189f8

View file

@ -11,9 +11,13 @@
</select>
</label>
</p>
<p>
<button class="uk-button uk-button-default" @click="toggleFullscreen">
Toggle Fullscreen
</button>
</p>
</div>
</template>
<script>
// Export main app
export default {
@ -34,6 +38,16 @@ export default {
}
},
methods: {
async toggleFullscreen() {
if (!document.fullscreenElement) {
await document.documentElement.requestFullscreen();
} else {
await document.exitFullscreen();
}
}
},
watch: {
appTheme: function() {
this.setLocalStorageObj("appTheme", this.appTheme);