Skip to content

Commit

Permalink
Merge pull request #1397 from rommapp/fix/login-hide-or-divider-when-…
Browse files Browse the repository at this point in the history
…oidc-disabled

fix: Hide "or" divider in Login form when OIDC is disabled
  • Loading branch information
adamantike authored Dec 27, 2024
2 parents 7f40258 + 77d957b commit b2c17de
Showing 1 changed file with 41 additions and 40 deletions.
81 changes: 41 additions & 40 deletions frontend/src/views/Auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,46 +106,47 @@ async function loginOIDC() {
/>
</template>
</v-btn>
<v-divider class="my-4">
<template #default>
<span class="px-1">{{ t("login.or") }}</span>
</template>
</v-divider>
<v-btn
v-if="oidcEnabled"
block
type="submit"
class="bg-terciary"
variant="text"
:disabled="loggingInOIDC || loggingIn"
:loading="loggingInOIDC"
@click="loginOIDC()"
>
<template v-if="oidcProvider" #prepend>
<v-icon size="20">
<v-img
:src="`/assets/dashboard-icons/${oidcProvider.toLowerCase()}.png`"
>
<template #error>
<v-icon size="20">mdi-key</v-icon>
</template>
</v-img>
</v-icon>
</template>
{{
t("login.login-oidc", {
oidc: oidcProvider || "OIDC",
})
}}
<template #loader>
<v-progress-circular
color="romm-accent-1"
:width="2"
:size="20"
indeterminate
/>
</template>
</v-btn>
<template v-if="oidcEnabled">
<v-divider class="my-4">
<template #default>
<span class="px-1">{{ t("login.or") }}</span>
</template>
</v-divider>
<v-btn
block
type="submit"
class="bg-terciary"
variant="text"
:disabled="loggingInOIDC || loggingIn"
:loading="loggingInOIDC"
@click="loginOIDC()"
>
<template v-if="oidcProvider" #prepend>
<v-icon size="20">
<v-img
:src="`/assets/dashboard-icons/${oidcProvider.toLowerCase()}.png`"
>
<template #error>
<v-icon size="20">mdi-key</v-icon>
</template>
</v-img>
</v-icon>
</template>
{{
t("login.login-oidc", {
oidc: oidcProvider || "OIDC",
})
}}
<template #loader>
<v-progress-circular
color="romm-accent-1"
:width="2"
:size="20"
indeterminate
/>
</template>
</v-btn>
</template>
</v-form>
</v-col>
</v-row>
Expand Down

0 comments on commit b2c17de

Please sign in to comment.