web/flows: fix fa:// icons in sources not shown correctly

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-02-19 19:45:57 +01:00
parent 9f431396c0
commit a68fa06ff9
No known key found for this signature in database
1 changed files with 6 additions and 1 deletions

View File

@ -158,7 +158,12 @@ export class IdentificationStage extends BaseStage<
renderSource(source: LoginSource): TemplateResult {
let icon = html`<i class="fas fa-share-square" title="${source.name}"></i>`;
if (source.iconUrl) {
icon = html`<img src="${source.iconUrl}" alt="${source.name}" />`;
if (source.iconUrl.startsWith("fa://")) {
const url = source.iconUrl.replaceAll("fa://", "");
icon = html`<i class="fas ${url}" title="${source.name}"></i>`;
} else {
icon = html`<img src="${source.iconUrl}" alt="${source.name}" />`;
}
}
return html`<li class="pf-c-login__main-footer-links-item">
<button