main
vue 56 lines 1.39 KB
Raw
1 <template>
2 <div class="w-full max-w-96 min-w-64">
3 <div class="flex flex-col items-start">
4 <Logo class="mb-4" max-height="40px" />
5 <div class="font-display mb-4 text-4xl font-bold" data-test="login-title">{{ portalTitle }}</div>
6 <div class="text-secondary text-lg">
7 Access the world of OpenSource security: Simplified, Streamlined, Accessible.
8 </div>
9 </div>
10
11 <transition name="form-fade" mode="out-in" appear class="my-10">
12 <SignIn v-if="type === 'signin'" key="signin" />
13 </transition>
14 </div>
15 </template>
16
17 <script lang="ts" setup>
18 import type { FormType } from "./types"
19 import { computed, onBeforeMount, ref } from "vue"
20 import Logo from "@/app-layouts/common/Logo.vue"
21 import { usePortalSettingsStore } from "@/stores/portalSettings"
22 import SignIn from "./SignIn.vue"
23
24 const props = defineProps<{
25 type?: FormType
26 }>()
27
28 const type = ref<FormType>("signin")
29
30 const portalSettingsStore = usePortalSettingsStore()
31
32 const portalTitle = computed(() => portalSettingsStore.portalTitle || "SOCFortress Customer Portal")
33
34 onBeforeMount(() => {
35 if (props.type) {
36 type.value = props.type
37 }
38 })
39 </script>
40
41 <style lang="scss" scoped>
42 .form-fade-enter-active,
43 .form-fade-leave-active {
44 transition:
45 opacity 0.2s ease-in-out,
46 transform 0.3s ease-in-out;
47 }
48 .form-fade-enter-from {
49 opacity: 0;
50 transform: translateX(10px);
51 }
52 .form-fade-leave-to {
53 opacity: 0;
54 transform: translateX(-10px);
55 }
56 </style>