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