16.09 Login Register - Customise the Banner

This commit is contained in:
Fredrick W. Warren 2021-02-12 15:45:56 -08:00
parent 2ddb3c44bd
commit 89b5489e56
2 changed files with 8 additions and 6 deletions

View File

@ -5,7 +5,7 @@
<template v-slot:avatar> <template v-slot:avatar>
<q-icon name="account_circle" color="primary" /> <q-icon name="account_circle" color="primary" />
</template> </template>
{{ title }} {{ tab | titleCase }} to access your Todos anywhere!
</q-banner> </q-banner>
</div> </div>
<div class="row q-mb-md"> <div class="row q-mb-md">
@ -38,7 +38,7 @@
<q-btn <q-btn
type="submit" type="submit"
color="primary" color="primary"
label="Register" :label="tab | titleCase"
/> />
</div> </div>
</q-form> </q-form>
@ -47,8 +47,7 @@
<script> <script>
export default { export default {
props: [ props: [
'tab', 'tab'
'title'
], ],
data () { data () {
return { return {
@ -58,6 +57,11 @@ export default {
} }
} }
}, },
filters: {
titleCase (value) {
return value.charAt(0).toUpperCase() + value.slice(1)
}
},
methods: { methods: {
isValidEmailAddress (email) { isValidEmailAddress (email) {
const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/

View File

@ -21,14 +21,12 @@
<div class="text-h6">Login</div> <div class="text-h6">Login</div>
<login-register <login-register
:tab="tab" :tab="tab"
title="Please enter your email and passoword"
/> />
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="register"> <q-tab-panel name="register">
<login-register <login-register
:tab="tab" :tab="tab"
title="Register to access your Todos anywhere"
/> />
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>