2021-09-17 00:18:50 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { ref } from 'vue'
|
2021-09-23 14:16:37 +08:00
|
|
|
import { useLockScreen } from '../composables/lock-screen'
|
2021-09-17 00:18:50 +08:00
|
|
|
import VPFullScreenMenu from './full-screen/vp-menu.vue'
|
|
|
|
import VPFullScreenTranslation from './full-screen/vp-translation.vue'
|
|
|
|
import VPFullScreenThemeToggler from './full-screen/vp-theme-toggler.vue'
|
|
|
|
|
|
|
|
defineProps<{
|
|
|
|
fullScreen: boolean
|
|
|
|
}>()
|
|
|
|
|
|
|
|
const { lock, cleanup } = useLockScreen()
|
|
|
|
const fullscreen = ref()
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<Transition name="el-fade-in" @enter="lock" @after-leave="cleanup">
|
|
|
|
<div v-if="fullScreen" ref="fullscreen">
|
|
|
|
<div class="full-screen-container">
|
|
|
|
<VPFullScreenMenu @close="$emit('close')" />
|
2021-10-22 14:50:30 +08:00
|
|
|
<VPFullScreenTranslation @close="$emit('close')" />
|
2022-05-03 15:18:29 +08:00
|
|
|
<VPFullScreenThemeToggler />
|
2021-09-17 00:18:50 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Transition>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.full-screen {
|
|
|
|
position: fixed;
|
|
|
|
top: var(--nav-height);
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
padding: 0 32px;
|
|
|
|
width: 100%;
|
|
|
|
background-color: var(--bg-color);
|
|
|
|
transition: background-color 0.5s;
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
|
|
&.el-fade-in-enter-active,
|
|
|
|
&.el-fade-in-leave-active {
|
|
|
|
.full-screen-container {
|
|
|
|
transition: transform var(--el-transition-duration)
|
|
|
|
var(--el-transition-function-ease-in-out-bezier);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.el-fade-in-enter-from,
|
|
|
|
&.el-fade-in-leave-to {
|
|
|
|
.full-screen-container {
|
|
|
|
transform: translateY(-8px);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.full-screen-container {
|
|
|
|
margin: 0 auto;
|
|
|
|
padding: 24px 0 96px;
|
|
|
|
max-width: 18rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|