passphrase prompt
This commit is contained in:
@@ -4,13 +4,20 @@ import { onClickOutside } from '@vueuse/core'
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
open?: boolean
|
||||
persistent?: boolean
|
||||
}>(),
|
||||
{
|
||||
open: false
|
||||
open: false,
|
||||
persistent: false
|
||||
}
|
||||
)
|
||||
|
||||
const show = ref<boolean>(Boolean(props.open))
|
||||
const show = ref<boolean>(false)
|
||||
watch(
|
||||
() => props.open,
|
||||
() => (show.value = props.open),
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
const modal = ref<HTMLElement | null>(null)
|
||||
const modalBox = ref(null)
|
||||
@@ -25,7 +32,7 @@ const close = (): Promise<boolean> => {
|
||||
|
||||
const slotProps = { open, close }
|
||||
|
||||
onClickOutside(modalBox, () => close())
|
||||
if (!props.persistent) onClickOutside(modalBox, () => close())
|
||||
|
||||
const onEnter = (el: Element, done: () => void): void => {
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user