Skip to content

Commit

Permalink
enter/exit full screen when going to frame mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Dec 30, 2024
1 parent 363797b commit 111a00d
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions resources/js/views/gallery-panels/Frame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useSlideshowFunction } from "@/composables/photo/slideshow";
import AlbumService from "@/services/album-service";
import { onKeyStroke } from "@vueuse/core";
import Button from "primevue/button";
import { ref } from "vue";
import { ref, onMounted, onUnmounted } from "vue";
import { useRouter } from "vue-router";
const props = defineProps<{
Expand Down Expand Up @@ -52,7 +52,20 @@ function start() {
});
}
start();
onMounted(() => {
let elem = document.getElementsByTagName("body")[0];
elem.requestFullscreen()
.then(() => {})
.catch((err) => console.log(err));
start();
});
onUnmounted(() => {
document.exitFullscreen();
clearTimeouts();
});
function goBack() {
clearTimeouts();
Expand Down

0 comments on commit 111a00d

Please sign in to comment.