This commit is contained in:
2021-03-11 21:26:38 +00:00
parent a286b186df
commit 00e4178e53
2 changed files with 29 additions and 30 deletions

View File

@@ -116,6 +116,7 @@ import {
faLink, faLink,
faListOl, faListOl,
faListUl, faListUl,
faLock,
faMagic, faMagic,
faMapMarkerAlt, faMapMarkerAlt,
faMapMarkedAlt, faMapMarkedAlt,
@@ -293,6 +294,7 @@ library.add(
faLink, faLink,
faListOl, faListOl,
faListUl, faListUl,
faLock,
faMagic, faMagic,
faMapMarkerAlt, faMapMarkerAlt,
faMapMarkedAlt, faMapMarkedAlt,
@@ -912,6 +914,12 @@ const CUSTOM_ICONS = {
icon: ["fas", "list-ul"] icon: ["fas", "list-ul"]
} }
}, },
ayiLock: {
component: FontAwesomeIcon,
props: {
icon: ["fas", "lock"]
}
},
ayiMagic: { ayiMagic: {
component: FontAwesomeIcon, component: FontAwesomeIcon,
props: { props: {

View File

@@ -12,36 +12,26 @@
<v-card class="mx-auto my-12" max-width="600"> <v-card class="mx-auto my-12" max-width="600">
<v-card-title>{{ $ay.t("AuthConnectAppTitle") }}</v-card-title> <v-card-title>{{ $ay.t("AuthConnectAppTitle") }}</v-card-title>
<v-card-subtitle <v-card-subtitle
>Using an authenticator app like Google Authenticator, Duo, >{{ $ay.t("AuthConnectAppSubTitle") }}
Microsoft Authenticator or Authy, scan the QR code. It will
display a 6 digit code which you need to enter below.
</v-card-subtitle> </v-card-subtitle>
<v-card-text> <v-card-text>
<div class="text-center my-10"> <div class="text-center my-10">
<img alt="Embedded QR Code" :src="qCode" /> <img alt="Embedded QR Code" :src="qCode" />
</div> </div>
{{ $ay.t("AuthConnectAppManualEntry") }}
Having trouble scanning the code? Enter the following <span class="text-subtitle-2 ml-2">{{ obj.s }}</span>
manually: <v-text-field
<div> class="mt-10"
<span class="text-subtitle-2">{{ obj.s }}</span> v-model="pin"
</div> :label="$ay.t('AuthEnterPassCode')"
:error-messages="form().serverErrors(this, 'pin')"
ref="pin"
@input="fieldValueChanged('mapUrlTemplate')"
data-cy="tfaPin"
></v-text-field>
</v-card-text> </v-card-text>
</v-card> </v-card>
</v-col> </v-col>
<!-- <div class="mb-6">
<span class="text-h5"> {{ $ay.t("AuthConnectAppTitle") }}</span>
</div>
<v-col cols="12" offset-lg="1" offset-xl="3">
<v-col cols="12">
<img alt="Embedded QR Code" :src="qCode" />
</v-col>
</v-col>
<v-col cols="12">
<img alt="Embedded QR Code" :src="qCode" />
</v-col>
{{ obj.s }} -->
</template> </template>
</v-row> </v-row>
</v-form> </v-form>
@@ -112,6 +102,7 @@ export default {
s: null, // = u.TotpSecret, s: null, // = u.TotpSecret,
qr: null // = qrCodeImageAsBase64 qr: null // = qrCodeImageAsBase64
}, },
pin: null,
tfaEnabled: window.$gz.store.state.tfaEnabled, tfaEnabled: window.$gz.store.state.tfaEnabled,
formState: { formState: {
ready: false, ready: false,
@@ -228,9 +219,9 @@ function clickHandler(menuItem) {
function generateMenu(vm) { function generateMenu(vm) {
let menuOptions = { let menuOptions = {
isMain: true, isMain: true,
icon: "$ayiKey", icon: "$ayiLock",
title: "SetLoginPassword", title: "AuthTwoFactor",
helpUrl: "home-password", helpUrl: "home-tfa",
formData: { formData: {
ayaType: window.$gz.type.UserOptions ayaType: window.$gz.type.UserOptions
}, },
@@ -263,11 +254,11 @@ async function initForm(vm) {
// //
async function fetchTranslatedText(vm) { async function fetchTranslatedText(vm) {
await window.$gz.translation.cacheTranslations([ await window.$gz.translation.cacheTranslations([
"UserLogin", "AuthConnectAppTitle",
"OldPassword", "AuthConnectAppSubTitle",
"NewPassword", "AuthConnectAppManualEntry",
"ConfirmPassword", "AuthEnterPin",
"KnownPasswordWarning" "AuthTwoFactor"
]); ]);
} }
</script> </script>