Work in progress for form create guess user
This commit is contained in:
@@ -90,6 +90,7 @@ const closeOnEscape = (e) => {
|
||||
onMounted(() => {
|
||||
if (process.server) return
|
||||
document.addEventListener('keydown', closeOnEscape)
|
||||
initMotions()
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
@@ -160,13 +161,15 @@ const content = ref(null)
|
||||
const backdropMotion = ref(null)
|
||||
const contentMotion = ref(null)
|
||||
|
||||
watch(() => props.show, (newVal, oldVal) => {
|
||||
if (newVal) {
|
||||
const initMotions = () => {
|
||||
if (props.show) {
|
||||
nextTick(() => {
|
||||
backdropMotion.value = useMotion(backdrop.value, motionFadeIn)
|
||||
contentMotion.value = useMotion(content.value, motionSlideBottom)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.show, initMotions)
|
||||
|
||||
</script>
|
||||
|
||||
@@ -61,6 +61,7 @@ export default {
|
||||
setup () {
|
||||
return {
|
||||
authStore: useAuthStore(),
|
||||
formsStore: useFormsStore(),
|
||||
workspaceStore: useWorkspacesStore()
|
||||
}
|
||||
},
|
||||
@@ -88,6 +89,9 @@ export default {
|
||||
const workspaces = await fetchAllWorkspaces()
|
||||
this.workspaceStore.set(workspaces.data.value)
|
||||
|
||||
// Load forms
|
||||
this.formsStore.loadAll(this.workspaceStore.currentId)
|
||||
|
||||
// Redirect home.
|
||||
this.redirect()
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<modal :show="show" :closeable="!aiForm.busy" @close="$emit('close')">
|
||||
<Modal :show="show" :closeable="!aiForm.busy" @close="$emit('close')">
|
||||
<template #icon>
|
||||
<template v-if="state=='default'">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-10 h-10 text-blue">
|
||||
@@ -87,7 +87,7 @@
|
||||
~60 sec
|
||||
</p>
|
||||
</div>
|
||||
</modal>
|
||||
</Modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user