mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 05:25:26 +02:00
feat: setting to hide password login (#4943)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
parent
2f3ef738c4
commit
af3057951d
8 changed files with 16 additions and 2 deletions
|
@ -39,6 +39,7 @@
|
|||
<v-card-text>
|
||||
<v-form @submit.prevent="authenticate">
|
||||
<v-text-field
|
||||
v-if="allowPasswordLogin"
|
||||
v-model="form.email"
|
||||
:prepend-inner-icon="$globals.icons.email"
|
||||
filled
|
||||
|
@ -51,6 +52,7 @@
|
|||
type="text"
|
||||
/>
|
||||
<v-text-field
|
||||
v-if="allowPasswordLogin"
|
||||
id="password"
|
||||
v-model="form.password"
|
||||
:prepend-inner-icon="$globals.icons.lock"
|
||||
|
@ -65,7 +67,7 @@
|
|||
@click:append="togglePasswordShow"
|
||||
/>
|
||||
<v-checkbox v-model="form.remember" class="ml-2 mt-n2" :label="$t('user.remember-me')"></v-checkbox>
|
||||
<v-card-actions class="justify-center pt-0">
|
||||
<v-card-actions v-if="allowPasswordLogin" class="justify-center pt-0">
|
||||
<div class="max-button">
|
||||
<v-btn :loading="loggingIn" :disabled="oidcLoggingIn" color="primary" type="submit" large rounded class="rounded-xl" block>
|
||||
{{ $t("user.login") }}
|
||||
|
@ -191,7 +193,9 @@ export default defineComponent({
|
|||
const allowSignup = computed(() => appInfo.value?.allowSignup || false);
|
||||
const allowOidc = computed(() => appInfo.value?.enableOidc || false);
|
||||
const oidcRedirect = computed(() => appInfo.value?.oidcRedirect || false);
|
||||
const oidcProviderName = computed(() => appInfo.value?.oidcProviderName || "OAuth")
|
||||
const oidcProviderName = computed(() => appInfo.value?.oidcProviderName || "OAuth");
|
||||
const allowPasswordLogin = computed(() => appInfo.value?.allowPasswordLogin ?? true);
|
||||
|
||||
|
||||
whenever(
|
||||
() => allowOidc.value && oidcRedirect.value && !isCallback() && !isDirectLogin() && !$auth.check().valid,
|
||||
|
@ -271,6 +275,7 @@ export default defineComponent({
|
|||
form,
|
||||
loggingIn,
|
||||
allowSignup,
|
||||
allowPasswordLogin,
|
||||
allowOidc,
|
||||
authenticate,
|
||||
oidcAuthenticate,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue