import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { first } from "@goauthentik/common/utils";
import "@goauthentik/components/ak-number-input";
import "@goauthentik/components/ak-switch-input";
import "@goauthentik/components/ak-text-input";
import "@goauthentik/elements/ak-array-input.js";
import { Form } from "@goauthentik/elements/forms/Form";
import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/HorizontalFormElement";
import "@goauthentik/elements/forms/Radio";
import "@goauthentik/elements/forms/SearchSelect";
import "@goauthentik/elements/utils/TimeDeltaHelp";
import { msg } from "@lit/localize";
import { CSSResult, TemplateResult, css, html } from "lit";
import { customElement, property } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
import PFList from "@patternfly/patternfly/components/List/list.css";
import { AdminApi, FooterLink, Settings, SettingsRequest } from "@goauthentik/api";
import "./AdminSettingsFooterLinks.js";
import { IFooterLinkInput, akFooterLinkInput } from "./AdminSettingsFooterLinks.js";
const DEFAULT_REPUTATION_LOWER_LIMIT = -5;
const DEFAULT_REPUTATION_UPPER_LIMIT = 5;
@customElement("ak-admin-settings-form")
export class AdminSettingsForm extends Form
none
:
${msg(
"Disables per-user avatars and just shows a 1x1 pixel transparent picture",
)}
gravatar
:
${msg("Uses gravatar with the user's email address")}
initials
:
${msg("Generated avatars based on the user's name")}
%(username)s
: ${msg("The user's username")}
%(mail_hash)s
:
${msg("The email address, md5 hashed")}
%(upn)s
:
${msg("The user's UPN, if set (otherwise an empty string)")}
attributes.something.avatar
, which can be used in
combination with the file field to allow users to upload custom
avatars for themselves.`,
)}
${msg(
"Multiple values can be set, comma-separated, and authentik will fallback to the next mode when no avatar could be found.",
)}
${msg(
html`For example, setting this to gravatar,initials
will
attempt to get an avatar from Gravatar, and if the user has not
configured on there, it will fallback to a generated avatar.`,
)}
${msg(
html`When using an external logging solution for archiving, this can be
set to minutes=5
.`,
)}
${msg( "This setting only affects new Events, as the expiration is saved per-event.", )}
${msg( "This option configures the footer links on the flow executor pages. The URL is limited to web and mail addresses. If the name is left blank, the URL will be shown.", )}