1
1
<template >
2
- <v-container v-if =" config.google || config.facebook || config.phone " class =" text-center ma-0 pa-0" >
3
- <div class =" caption" >or login with</div >
2
+ <v-container v-if =" isLoginWithProvidersActive " class =" text-center ma-0 pa-0" >
3
+ <div class =" caption" >< span v-if = " config.email " > or </ span > login with</div >
4
4
5
5
<v-container >
6
6
<v-tooltip v-if =" config.google" top >
7
7
<template #activator =" { on , attrs } " >
8
- <v-btn color =" #db3236" class =" mr-2" v-bind =" attrs" fab dark small v-on =" on" @click =" loginWithGoogle()" >
8
+ <v-btn color =" #db3236" class =" mr-2" v-bind =" attrs" : fab= " !isOnlySingleProvider " dark small v-on =" on" @click =" loginWithGoogle()" >
9
9
<v-icon >mdi-google</v-icon >
10
10
</v-btn >
11
11
</template >
15
15
16
16
<v-tooltip v-if =" config.facebook" top >
17
17
<template #activator =" { on , attrs } " >
18
- <v-btn color =" #3b5998" class =" mr-2" v-bind =" attrs" fab dark small v-on =" on" @click =" loginWithFacebook()" >
18
+ <v-btn color =" #3b5998" class =" mr-2" v-bind =" attrs" : fab= " !isOnlySingleProvider " dark small v-on =" on" @click =" loginWithFacebook()" >
19
19
<v-icon >mdi-facebook</v-icon >
20
20
</v-btn >
21
21
</template >
25
25
26
26
<v-tooltip v-if =" config.phone" top >
27
27
<template #activator =" { on , attrs } " >
28
- <v-btn color =" primary" v-bind =" attrs" fab dark small v-on =" on" @click =" SET_SHOW_LOGIN_WITH_PHONE(true)" >
28
+ <v-btn color =" primary" class = " mr-2 " v-bind =" attrs" : fab= " !isOnlySingleProvider " dark small v-on =" on" @click =" SET_SHOW_LOGIN_WITH_PHONE(true)" >
29
29
<v-icon >mdi-cellphone</v-icon >
30
30
</v-btn >
31
31
</template >
32
32
33
33
<span >Authenticate with Text Message To Your Phone</span >
34
34
</v-tooltip >
35
+
36
+ <v-tooltip v-if =" config.saml" top >
37
+ <template #activator =" { on , attrs } " >
38
+ <v-btn color =" secondary" v-bind =" attrs" :fab =" !isOnlySingleProvider" dark :small =" !isOnlySingleProvider" v-on =" on" @click =" loginWithSaml()" >
39
+ <v-icon >mdi-onepassword</v-icon >
40
+ <span v-if =" isOnlySingleProvider" class =" ml-2" >{{ config.saml_text }}</span >
41
+ </v-btn >
42
+ </template >
43
+
44
+ <span >Authenticate with SAML provider</span >
45
+ </v-tooltip >
35
46
</v-container >
36
47
</v-container >
37
48
</template >
@@ -42,11 +53,11 @@ import { mapState, mapGetters, mapMutations, mapActions } from "vuex"
42
53
export default {
43
54
computed: {
44
55
... mapState (" auth" , [" config" ]),
45
- ... mapGetters (" auth" , [" isLoading" ]),
56
+ ... mapGetters (" auth" , [" isLoading" , " isLoginWithProvidersActive " , " isOnlySingleProvider " ]),
46
57
},
47
58
48
59
methods: {
49
- ... mapActions (" auth" , [" loginWithGoogle" , " loginWithFacebook" , " loginWithPhone" ]),
60
+ ... mapActions (" auth" , [" loginWithGoogle" , " loginWithFacebook" , " loginWithPhone" , " loginWithSaml " ]),
50
61
... mapMutations (" auth" , [" SET_SHOW_LOGIN_WITH_PHONE" ]),
51
62
},
52
63
}
0 commit comments