diff --git a/src/tools/time-alarm/time-alarm.vue b/src/tools/time-alarm/time-alarm.vue index 20df21c8..580b14dd 100644 --- a/src/tools/time-alarm/time-alarm.vue +++ b/src/tools/time-alarm/time-alarm.vue @@ -61,6 +61,23 @@ function ended() { if (status.value === 'running') { status.value = 'ended'; } + if (document.fullscreenElement) { + document.exitFullscreen?.(); + } +} + +const fullScreenElement = ref(); +function toggleFullScreen() { + const element = fullScreenElement.value; + if (!element) { + return; + } + if (!document.fullscreenElement) { + element?.requestFullscreen(); + } + else { + document.exitFullscreen?.(); + } } const isEnded = computed(() => status.value === 'ended'); @@ -84,19 +101,18 @@ const isEnded = computed(() => status.value === 'ended'); - - - - Alarm at: {{ alarmAtDate }} - - -
- - Stop - +
+
+ +
+ + Toggle Fullscreen + +
+
@@ -117,6 +133,19 @@ const isEnded = computed(() => status.value === 'ended'); +
+ + Stop + +
+ + + Alarm at: {{ alarmAtDate }} + +
+ +