-
Notifications
You must be signed in to change notification settings - Fork 38
/
AuthenticateMainView.vue
52 lines (48 loc) · 1.16 KB
/
AuthenticateMainView.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<template>
<div :class="$style.container" :style="styles.container">
<authenticate-modal>
<login-form v-if="type === 'login'" />
<registration-form v-if="type === 'registration'" />
</authenticate-modal>
</div>
</template>
<script lang="ts">
import { defineComponent, reactive, PropType } from '@vue/composition-api'
import { makeStyles } from '@/lib/styles'
import AuthenticateModal from './AuthenticateModal.vue'
import LoginForm from './LoginForm.vue'
import RegistrationForm from './RegistrationForm.vue'
const useStyles = () =>
reactive({
container: makeStyles(theme => ({
background: theme.background.secondary
}))
})
export default defineComponent({
name: 'AuthenticateMainView',
components: {
AuthenticateModal,
LoginForm,
RegistrationForm
},
props: {
type: {
type: String as PropType<'login' | 'password-reset' | 'registration'>,
default: 'login' as const
}
},
setup() {
const styles = useStyles()
return { styles }
}
})
</script>
<style lang="scss" module>
.container {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
</style>