From ddbd8153e2fab72f378a5c2f6465827e0f5f0213 Mon Sep 17 00:00:00 2001 From: Jens L Date: Wed, 11 Jan 2023 13:37:49 +0100 Subject: [PATCH] web: migrate checkbox to switch (#4409) * start migrating to switch Signed-off-by: Jens Langhammer * general cleanup Signed-off-by: Jens Langhammer * remove broken Create provider Signed-off-by: Jens Langhammer * migrate all Signed-off-by: Jens Langhammer * migrate table selectors, fix dark theme Signed-off-by: Jens Langhammer Signed-off-by: Jens Langhammer --- web/src/admin/AdminInterface.ts | 6 +- web/src/admin/applications/ApplicationForm.ts | 43 ++++++------ web/src/admin/blueprints/BlueprintForm.ts | 13 ++-- web/src/admin/events/TransportForm.ts | 13 ++-- web/src/admin/flows/FlowForm.ts | 33 ++++++--- web/src/admin/flows/StageBindingForm.ts | 40 +++++++---- web/src/admin/groups/GroupForm.ts | 13 ++-- web/src/admin/outposts/OutpostForm.ts | 40 +++++------ .../outposts/ServiceConnectionDockerForm.ts | 13 ++-- .../ServiceConnectionKubernetesForm.ts | 30 ++++++--- web/src/admin/policies/PolicyBindingForm.ts | 67 +++++++++++-------- .../admin/policies/dummy/DummyPolicyForm.ts | 28 +++++--- .../event_matcher/EventMatcherPolicyForm.ts | 15 +++-- .../admin/policies/expiry/ExpiryPolicyForm.ts | 32 ++++++--- .../expression/ExpressionPolicyForm.ts | 15 +++-- .../policies/password/PasswordPolicyForm.ts | 54 ++++++++++----- .../reputation/ReputationPolicyForm.ts | 41 ++++++++---- .../PropertyMappingListPage.ts | 17 ++--- .../providers/ldap/LDAPProviderViewPage.ts | 22 +++--- .../providers/oauth2/OAuth2ProviderForm.ts | 15 +++-- .../providers/proxy/ProxyProviderForm.ts | 34 ++++++---- web/src/admin/sources/ldap/LDAPSourceForm.ts | 65 ++++++++++++------ .../admin/sources/oauth/OAuthSourceForm.ts | 32 ++++++--- web/src/admin/sources/plex/PlexSourceForm.ts | 48 ++++++++----- web/src/admin/sources/saml/SAMLSourceForm.ts | 48 ++++++++----- .../AuthenticatorSMSStageForm.ts | 13 ++-- web/src/admin/stages/dummy/DummyStageForm.ts | 13 ++-- web/src/admin/stages/email/EmailStageForm.ts | 56 +++++++++++----- .../identification/IdentificationStageForm.ts | 41 ++++++++---- .../admin/stages/invitation/InvitationForm.ts | 13 ++-- .../stages/invitation/InvitationStageForm.ts | 17 +++-- web/src/admin/stages/prompt/PromptForm.ts | 28 +++++--- .../stages/user_write/UserWriteStageForm.ts | 15 +++-- web/src/admin/tenants/TenantForm.ts | 13 ++-- web/src/admin/tokens/TokenForm.ts | 13 ++-- web/src/admin/users/RelatedUserList.ts | 17 ++--- web/src/admin/users/ServiceAccountForm.ts | 13 ++-- web/src/admin/users/UserForm.ts | 13 ++-- web/src/common/styles/authentik.css | 3 + web/src/elements/TreeView.ts | 1 - web/src/elements/forms/Form.ts | 2 + web/src/elements/table/TablePage.ts | 3 +- web/src/flow/providers/oauth2/DeviceCode.ts | 1 - .../AuthenticatorSMSStage.ts | 1 - .../AuthenticatorTOTPStage.ts | 1 - .../AuthenticatorValidateStage.ts | 45 ++++++------- .../details/stages/prompt/PromptStage.ts | 2 +- 47 files changed, 702 insertions(+), 399 deletions(-) diff --git a/web/src/admin/AdminInterface.ts b/web/src/admin/AdminInterface.ts index 1dd82175b..7d5f4ca19 100644 --- a/web/src/admin/AdminInterface.ts +++ b/web/src/admin/AdminInterface.ts @@ -243,15 +243,15 @@ export class AdminInterface extends AKElement { ${t`Policies`} - - ${t`Reputation scores`} - ${t`Property Mappings`} ${t`Blueprints`} + + ${t`Reputation scores`} + ${t`Flows & Stages`} diff --git a/web/src/admin/applications/ApplicationForm.ts b/web/src/admin/applications/ApplicationForm.ts index 44b735ee2..a9c221de1 100644 --- a/web/src/admin/applications/ApplicationForm.ts +++ b/web/src/admin/applications/ApplicationForm.ts @@ -1,4 +1,3 @@ -import "@goauthentik/admin/providers/ProviderWizard"; import { DEFAULT_CONFIG, config } from "@goauthentik/common/api/config"; import { first, groupBy } from "@goauthentik/common/utils"; import "@goauthentik/elements/forms/FormGroup"; @@ -139,15 +138,8 @@ export class ApplicationForm extends ModelForm { >

- ${t`Select a provider that this application should use. Alternatively, create a new provider.`} + ${t`Select a provider that this application should use.`}

- { - this.requestUpdate(); - }} - createText=${t`Create provider`} - > - { > - + ${t`UI settings`}
@@ -186,14 +178,19 @@ export class ApplicationForm extends ModelForm {

-
+
+ + + + + + ${t`Open in new tab`} +

${t`If checked, the launch URL will open in a new browser tab or window from the user's application library.`}

@@ -218,20 +215,28 @@ export class ApplicationForm extends ModelForm { ${this.instance?.metaIcon ? html` -
+
+ +

${t`Delete currently set icon.`}

diff --git a/web/src/admin/blueprints/BlueprintForm.ts b/web/src/admin/blueprints/BlueprintForm.ts index 0836eb09b..21508d623 100644 --- a/web/src/admin/blueprints/BlueprintForm.ts +++ b/web/src/admin/blueprints/BlueprintForm.ts @@ -87,14 +87,19 @@ export class BlueprintForm extends ModelForm { />
-
+
+ + + + + + ${t`Enabled`} +

${t`Disabled blueprints are never applied.`}

diff --git a/web/src/admin/events/TransportForm.ts b/web/src/admin/events/TransportForm.ts index 60a925974..b74572c50 100644 --- a/web/src/admin/events/TransportForm.ts +++ b/web/src/admin/events/TransportForm.ts @@ -163,14 +163,19 @@ export class TransportForm extends ModelForm { -
+
+ + + + + + ${t`Send once`} +

${t`Only send notification once, for example when sending a webhook into a chat channel.`}

diff --git a/web/src/admin/flows/FlowForm.ts b/web/src/admin/flows/FlowForm.ts index 59ac8619f..bde594d61 100644 --- a/web/src/admin/flows/FlowForm.ts +++ b/web/src/admin/flows/FlowForm.ts @@ -205,14 +205,19 @@ export class FlowForm extends ModelForm { ${t`Behavior settings`}
-
+
+ + + + + + ${t`Compatibility mode`} +

${t`Increases compatibility with password managers and mobile devices.`}

@@ -333,20 +338,28 @@ export class FlowForm extends ModelForm { ${this.instance?.background ? html` -
+
+ + + + + + + ${t`Clear icon`} + +

${t`Delete currently set background image.`}

diff --git a/web/src/admin/flows/StageBindingForm.ts b/web/src/admin/flows/StageBindingForm.ts index a41248cb0..b34208462 100644 --- a/web/src/admin/flows/StageBindingForm.ts +++ b/web/src/admin/flows/StageBindingForm.ts @@ -8,7 +8,7 @@ import "@goauthentik/elements/forms/SearchSelect"; import { t } from "@lingui/macro"; import { TemplateResult, html } from "lit"; -import { customElement, property } from "lit/decorators.js"; +import { customElement, property, state } from "lit/decorators.js"; import { ifDefined } from "lit/directives/if-defined.js"; import { until } from "lit/directives/until.js"; @@ -24,15 +24,20 @@ import { @customElement("ak-stage-binding-form") export class StageBindingForm extends ModelForm { - loadInstance(pk: string): Promise { - return new FlowsApi(DEFAULT_CONFIG).flowsBindingsRetrieve({ + async loadInstance(pk: string): Promise { + const binding = await new FlowsApi(DEFAULT_CONFIG).flowsBindingsRetrieve({ fsbUuid: pk, }); + this.defaultOrder = await this.getOrder(); + return binding; } @property() targetPk?: string; + @state() + defaultOrder = 0; + getSuccessMessage(): string { if (this.instance?.pk) { return t`Successfully updated binding.`; @@ -131,36 +136,45 @@ export class StageBindingForm extends ModelForm {
- -
+
+ + + + + + ${t`Evaluate on plan`} +

${t`Evaluate policies during the Flow planning process. Disable this for input-based policies. Should be used in conjunction with 'Re-evaluate policies', as with both options disabled, policies are **not** evaluated.`}

-
+
+ + + + + + ${t`Re-evaluate policies`} +

${t`Evaluate policies before the Stage is present to the user.`}

diff --git a/web/src/admin/groups/GroupForm.ts b/web/src/admin/groups/GroupForm.ts index 208042e29..84fcc8b21 100644 --- a/web/src/admin/groups/GroupForm.ts +++ b/web/src/admin/groups/GroupForm.ts @@ -71,14 +71,19 @@ export class GroupForm extends ModelForm { />
-
+
+ + + + + + ${t`Is superuser`} +

${t`Users added to this group will be superusers.`}

diff --git a/web/src/admin/outposts/OutpostForm.ts b/web/src/admin/outposts/OutpostForm.ts index 3af777f86..0a3547468 100644 --- a/web/src/admin/outposts/OutpostForm.ts +++ b/web/src/admin/outposts/OutpostForm.ts @@ -1,21 +1,21 @@ import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; import { docLink } from "@goauthentik/common/global"; -import { groupBy } from "@goauthentik/common/utils"; +import { first, groupBy } from "@goauthentik/common/utils"; import "@goauthentik/elements/CodeMirror"; import "@goauthentik/elements/forms/HorizontalFormElement"; import { ModelForm } from "@goauthentik/elements/forms/ModelForm"; import "@goauthentik/elements/forms/SearchSelect"; -import YAML from "yaml"; import { t } from "@lingui/macro"; import { TemplateResult, html } from "lit"; -import { customElement, property } from "lit/decorators.js"; +import { customElement, property, state } from "lit/decorators.js"; import { ifDefined } from "lit/directives/if-defined.js"; import { until } from "lit/directives/until.js"; import { Outpost, + OutpostDefaultConfig, OutpostTypeEnum, OutpostsApi, OutpostsServiceConnectionsAllListRequest, @@ -31,17 +31,20 @@ export class OutpostForm extends ModelForm { @property({ type: Boolean }) embedded = false; - loadInstance(pk: string): Promise { - return new OutpostsApi(DEFAULT_CONFIG) - .outpostsInstancesRetrieve({ - uuid: pk, - }) - .then((o) => { - this.type = o.type || OutpostTypeEnum.Proxy; - return o; - }); + async loadInstance(pk: string): Promise { + const o = await new OutpostsApi(DEFAULT_CONFIG).outpostsInstancesRetrieve({ + uuid: pk, + }); + this.type = o.type || OutpostTypeEnum.Proxy; + this.defaultConfig = await new OutpostsApi( + DEFAULT_CONFIG, + ).outpostsInstancesDefaultSettingsRetrieve(); + return o; } + @state() + defaultConfig?: OutpostDefaultConfig; + getSuccessMessage(): string { if (this.instance) { return t`Successfully updated outpost.`; @@ -205,20 +208,9 @@ export class OutpostForm extends ModelForm {

-

${t`Set custom attributes using YAML or JSON.`} diff --git a/web/src/admin/outposts/ServiceConnectionDockerForm.ts b/web/src/admin/outposts/ServiceConnectionDockerForm.ts index b09c5a5a8..0a023c58c 100644 --- a/web/src/admin/outposts/ServiceConnectionDockerForm.ts +++ b/web/src/admin/outposts/ServiceConnectionDockerForm.ts @@ -58,14 +58,19 @@ export class ServiceConnectionDockerForm extends ModelForm -

+
+ + + + + + ${t`Local`} +

${t`If enabled, use the local connection. Required Docker socket/Kubernetes Integration.`}

diff --git a/web/src/admin/outposts/ServiceConnectionKubernetesForm.ts b/web/src/admin/outposts/ServiceConnectionKubernetesForm.ts index d718815a7..60063f546 100644 --- a/web/src/admin/outposts/ServiceConnectionKubernetesForm.ts +++ b/web/src/admin/outposts/ServiceConnectionKubernetesForm.ts @@ -56,14 +56,19 @@ export class ServiceConnectionKubernetesForm extends ModelForm< />
-
+
+ + + + + + ${t`Local`} +

${t`If enabled, use the local connection. Required Docker socket/Kubernetes Integration.`}

@@ -79,16 +84,21 @@ export class ServiceConnectionKubernetesForm extends ModelForm<

-
+
+ + + + + + ${t`Verify Kubernetes API SSL Certificate`} +
`; } diff --git a/web/src/admin/policies/PolicyBindingForm.ts b/web/src/admin/policies/PolicyBindingForm.ts index d31724535..1f0ec3aff 100644 --- a/web/src/admin/policies/PolicyBindingForm.ts +++ b/web/src/admin/policies/PolicyBindingForm.ts @@ -8,9 +8,8 @@ import { t } from "@lingui/macro"; import { CSSResult, css } from "lit"; import { TemplateResult, html } from "lit"; -import { customElement, property } from "lit/decorators.js"; +import { customElement, property, state } from "lit/decorators.js"; import { ifDefined } from "lit/directives/if-defined.js"; -import { until } from "lit/directives/until.js"; import PFContent from "@patternfly/patternfly/components/Content/content.css"; import PFToggleGroup from "@patternfly/patternfly/components/ToggleGroup/toggle-group.css"; @@ -35,23 +34,21 @@ enum target { @customElement("ak-policy-binding-form") export class PolicyBindingForm extends ModelForm { - loadInstance(pk: string): Promise { - return new PoliciesApi(DEFAULT_CONFIG) - .policiesBindingsRetrieve({ - policyBindingUuid: pk, - }) - .then((binding) => { - if (binding?.policyObj) { - this.policyGroupUser = target.policy; - } - if (binding?.groupObj) { - this.policyGroupUser = target.group; - } - if (binding?.userObj) { - this.policyGroupUser = target.user; - } - return binding; - }); + async loadInstance(pk: string): Promise { + const binding = await new PoliciesApi(DEFAULT_CONFIG).policiesBindingsRetrieve({ + policyBindingUuid: pk, + }); + if (binding?.policyObj) { + this.policyGroupUser = target.policy; + } + if (binding?.groupObj) { + this.policyGroupUser = target.group; + } + if (binding?.userObj) { + this.policyGroupUser = target.user; + } + this.defaultOrder = await this.getOrder(); + return binding; } @property() @@ -63,6 +60,9 @@ export class PolicyBindingForm extends ModelForm { @property({ type: Boolean }) policyOnly = false; + @state() + defaultOrder = 0; + getSuccessMessage(): string { if (this.instance?.pk) { return t`Successfully updated binding.`; @@ -277,33 +277,42 @@ export class PolicyBindingForm extends ModelForm { value=${ifDefined(this.instance?.target || this.targetPk)} /> -
+
+ + + + + + ${t`Enabled`} +
-
+
+ + + + + + ${t`Negate result`} +

${t`Negates the outcome of the binding. Messages are unaffected.`}

- diff --git a/web/src/admin/policies/dummy/DummyPolicyForm.ts b/web/src/admin/policies/dummy/DummyPolicyForm.ts index eb452b729..fa7e70a5d 100644 --- a/web/src/admin/policies/dummy/DummyPolicyForm.ts +++ b/web/src/admin/policies/dummy/DummyPolicyForm.ts @@ -55,14 +55,19 @@ export class DummyPolicyForm extends ModelForm { /> -
+
+ + + + + + ${t`Execution logging`} +

${t`When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.`}

@@ -71,14 +76,19 @@ export class DummyPolicyForm extends ModelForm { ${t`Policy-specific settings`}
-
+
+ + + + + + ${t`Pass policy?`} +
-
+
+ + + + + + ${t`Execution logging`} +

${t`When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.`}

diff --git a/web/src/admin/policies/expiry/ExpiryPolicyForm.ts b/web/src/admin/policies/expiry/ExpiryPolicyForm.ts index 440d1a4e7..6a39d04d6 100644 --- a/web/src/admin/policies/expiry/ExpiryPolicyForm.ts +++ b/web/src/admin/policies/expiry/ExpiryPolicyForm.ts @@ -55,14 +55,19 @@ export class PasswordExpiryPolicyForm extends ModelForm
-
+
+ + + + + + ${t`Execution logging`} +

${t`When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.`}

@@ -83,16 +88,21 @@ export class PasswordExpiryPolicyForm extends ModelForm
-
+
+ + + + + + ${t`Only fail the policy, don't invalidate user's password`} +
diff --git a/web/src/admin/policies/expression/ExpressionPolicyForm.ts b/web/src/admin/policies/expression/ExpressionPolicyForm.ts index 64ef06423..1cb95f46f 100644 --- a/web/src/admin/policies/expression/ExpressionPolicyForm.ts +++ b/web/src/admin/policies/expression/ExpressionPolicyForm.ts @@ -57,14 +57,19 @@ export class ExpressionPolicyForm extends ModelForm { />
-
+
+ + + + + + ${t`Execution logging`} +

${t`When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.`}

diff --git a/web/src/admin/policies/password/PasswordPolicyForm.ts b/web/src/admin/policies/password/PasswordPolicyForm.ts index 3b12ad79b..1d7ed8d8c 100644 --- a/web/src/admin/policies/password/PasswordPolicyForm.ts +++ b/web/src/admin/policies/password/PasswordPolicyForm.ts @@ -233,14 +233,19 @@ export class PasswordPolicyForm extends ModelForm { />
-
+
+ + + + + + ${t`Execution logging`} +

${t`When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.`}

@@ -262,32 +267,42 @@ export class PasswordPolicyForm extends ModelForm {
-
+
+ + + + + + ${t`Check static rules`} +
-
+
+ + + + + + ${t`Check haveibeenpwned.com`} +

${t`For more info see:`} {

-
+
+ + + + + + ${t`Check zxcvbn`} +

${t`Password strength estimator created by Dropbox, see:`} dropbox/zxcvbn diff --git a/web/src/admin/policies/reputation/ReputationPolicyForm.ts b/web/src/admin/policies/reputation/ReputationPolicyForm.ts index eea94a185..6b393255f 100644 --- a/web/src/admin/policies/reputation/ReputationPolicyForm.ts +++ b/web/src/admin/policies/reputation/ReputationPolicyForm.ts @@ -64,14 +64,19 @@ export class ReputationPolicyForm extends ModelForm { /> -

+
+ + + + + + ${t`Execution logging`} +

${t`When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.`}

@@ -80,24 +85,34 @@ export class ReputationPolicyForm extends ModelForm { ${t`Policy-specific settings`}
-
+
+ + + + + + ${t`Check IP`} +
-
+
+ + + + + + ${t`Check Username`} +
{
-
+
+ + + + + + ${t`Hide managed mappings`} +
`; diff --git a/web/src/admin/providers/ldap/LDAPProviderViewPage.ts b/web/src/admin/providers/ldap/LDAPProviderViewPage.ts index b3b8a310f..61447f184 100644 --- a/web/src/admin/providers/ldap/LDAPProviderViewPage.ts +++ b/web/src/admin/providers/ldap/LDAPProviderViewPage.ts @@ -13,8 +13,7 @@ import "@goauthentik/elements/events/ObjectChangelog"; import { t } from "@lingui/macro"; import { CSSResult, TemplateResult, html } from "lit"; -import { until } from "lit-html/directives/until.js"; -import { customElement, property } from "lit/decorators.js"; +import { customElement, property, state } from "lit/decorators.js"; import { ifDefined } from "lit/directives/if-defined.js"; import AKGlobal from "@goauthentik/common/styles/authentik.css"; @@ -30,7 +29,7 @@ import PFPage from "@patternfly/patternfly/components/Page/page.css"; import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; -import { LDAPProvider, ProvidersApi } from "@goauthentik/api"; +import { LDAPProvider, ProvidersApi, SessionUser } from "@goauthentik/api"; @customElement("ak-provider-ldap-view") export class LDAPProviderViewPage extends AKElement { @@ -51,6 +50,9 @@ export class LDAPProviderViewPage extends AKElement { @property({ attribute: false }) provider?: LDAPProvider; + @state() + me?: SessionUser; + static get styles(): CSSResult[] { return [ PFBase, @@ -74,6 +76,9 @@ export class LDAPProviderViewPage extends AKElement { if (!this.provider?.pk) return; this.providerID = this.provider?.pk; }); + me().then((user) => { + this.me = user; + }); } render(): TemplateResult { @@ -185,18 +190,13 @@ export class LDAPProviderViewPage extends AKElement { - { - return `cn=${ - m.user.username - },ou=users,${this.provider?.baseDn?.toLowerCase()}`; - }), - )} + value=${`cn=${ + this.me?.user.username + },ou=users,${this.provider?.baseDn?.toLowerCase()}`} />
diff --git a/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts b/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts index a02e64053..980253ef0 100644 --- a/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts +++ b/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts @@ -347,16 +347,19 @@ ${this.instance?.redirectUris} -
+
+ + + + + + ${t`Include claims in id_token`} +

${t`Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint.`}

diff --git a/web/src/admin/providers/proxy/ProxyProviderForm.ts b/web/src/admin/providers/proxy/ProxyProviderForm.ts index 250e8dbba..62b3457dc 100644 --- a/web/src/admin/providers/proxy/ProxyProviderForm.ts +++ b/web/src/admin/providers/proxy/ProxyProviderForm.ts @@ -204,16 +204,21 @@ export class ProxyProviderFormPage extends ModelForm {

-
+
+ + + + + + ${t`Internal host SSL Validation`} +

${t`Validate SSL Certificates of upstream servers.`}

@@ -437,20 +442,25 @@ ${this.instance?.skipPathRegex} -
+
+ + + + + + ${t`Set HTTP-Basic Authentication`} +

${t`Set a custom HTTP-Basic Authentication header based on values from authentik.`}

diff --git a/web/src/admin/sources/ldap/LDAPSourceForm.ts b/web/src/admin/sources/ldap/LDAPSourceForm.ts index 04f38f204..bffe60f9b 100644 --- a/web/src/admin/sources/ldap/LDAPSourceForm.ts +++ b/web/src/admin/sources/ldap/LDAPSourceForm.ts @@ -73,47 +73,67 @@ export class LDAPSourceForm extends ModelForm { />
-
+
+ + + + + + ${t`Enabled`} +
-
+
+ + + + + + ${t`Sync users`} +
-
+
+ + + + + + ${t`User password writeback`} +

${t`Login password is synced from LDAP into authentik automatically. Enable this option only to write password changes in authentik back to LDAP.`}

-
+
+ + + + + + ${t`Sync groups`} +
${t`Connection settings`} @@ -135,14 +155,19 @@ export class LDAPSourceForm extends ModelForm {

-
+
+ + + + + + ${t`Enable StartTLS`} +

${t`To use SSL instead, use 'ldaps://' and disable this option.`}

diff --git a/web/src/admin/sources/oauth/OAuthSourceForm.ts b/web/src/admin/sources/oauth/OAuthSourceForm.ts index 03a601850..06f681b83 100644 --- a/web/src/admin/sources/oauth/OAuthSourceForm.ts +++ b/web/src/admin/sources/oauth/OAuthSourceForm.ts @@ -244,14 +244,19 @@ export class OAuthSourceForm extends ModelForm { />
-
+
+ + + + + + ${t`Enabled`} +
{ ${this.instance?.icon ? html` -
+
+ + +

${t`Delete currently set icon.`}

diff --git a/web/src/admin/sources/plex/PlexSourceForm.ts b/web/src/admin/sources/plex/PlexSourceForm.ts index cc393aa22..7f5d67e93 100644 --- a/web/src/admin/sources/plex/PlexSourceForm.ts +++ b/web/src/admin/sources/plex/PlexSourceForm.ts @@ -135,16 +135,21 @@ export class PlexSourceForm extends ModelForm { ${t`Re-authenticate with plex`} -
+
+ + + + + + ${t`Allow friends to authenticate via Plex, even if you don't share any servers`} +
{ /> -
+
+ + + + + + ${t`Enabled`} +
{ ${this.instance?.icon ? html` -
+
+ +

${t`Delete currently set icon.`}

diff --git a/web/src/admin/sources/saml/SAMLSourceForm.ts b/web/src/admin/sources/saml/SAMLSourceForm.ts index 37126f062..e48359deb 100644 --- a/web/src/admin/sources/saml/SAMLSourceForm.ts +++ b/web/src/admin/sources/saml/SAMLSourceForm.ts @@ -103,14 +103,19 @@ export class SAMLSourceForm extends ModelForm { />
-
+
+ + + + + + ${t`Enabled`} +
{ ${this.instance?.icon ? html` -
+
+ +

${t`Delete currently set icon.`}

@@ -304,16 +317,21 @@ export class SAMLSourceForm extends ModelForm { ${t`Advanced protocol settings`}
-
+
+ + + + + + ${t` Allow IDP-initiated logins`} +

${t`Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done.`}

diff --git a/web/src/admin/stages/authenticator_sms/AuthenticatorSMSStageForm.ts b/web/src/admin/stages/authenticator_sms/AuthenticatorSMSStageForm.ts index fa5972b9d..9998b68ba 100644 --- a/web/src/admin/stages/authenticator_sms/AuthenticatorSMSStageForm.ts +++ b/web/src/admin/stages/authenticator_sms/AuthenticatorSMSStageForm.ts @@ -258,14 +258,19 @@ export class AuthenticatorSMSStageForm extends ModelForm -
+
+ + + + + + ${t`Hash phone number`} +

${t`If enabled, only a hash of the phone number will be saved. This can be done for data-protection reasons. Devices created from a stage with this enabled cannot be used with the authenticator validation stage.`}

diff --git a/web/src/admin/stages/dummy/DummyStageForm.ts b/web/src/admin/stages/dummy/DummyStageForm.ts index 336cc0acf..329efbf28 100644 --- a/web/src/admin/stages/dummy/DummyStageForm.ts +++ b/web/src/admin/stages/dummy/DummyStageForm.ts @@ -54,14 +54,19 @@ export class DummyStageForm extends ModelForm { />
-
+
+ + + + + + ${t`Throw error?`} +
`; } diff --git a/web/src/admin/stages/email/EmailStageForm.ts b/web/src/admin/stages/email/EmailStageForm.ts index 65b4ceb90..d0387a94e 100644 --- a/web/src/admin/stages/email/EmailStageForm.ts +++ b/web/src/admin/stages/email/EmailStageForm.ts @@ -88,24 +88,34 @@ export class EmailStageForm extends ModelForm { -
+
+ + + + + + ${t`Use TLS`} +
-
+
+ + + + + + ${t`Use SSL`} +
{ ${t`Stage-specific settings`}
-
+
+ + + + + + ${t`Activate pending user on success`} +

${t`When a user returns from the email successfully, their account will be activated.`}

-
+
+ + + + + + ${t`Use global settings`} +

${t`When enabled, global Email connection settings will be used and connection settings below will be ignored.`}

diff --git a/web/src/admin/stages/identification/IdentificationStageForm.ts b/web/src/admin/stages/identification/IdentificationStageForm.ts index 7a66f3cbd..a85220b57 100644 --- a/web/src/admin/stages/identification/IdentificationStageForm.ts +++ b/web/src/admin/stages/identification/IdentificationStageForm.ts @@ -140,29 +140,37 @@ export class IdentificationStageForm extends ModelForm
-
+
+ + + + + + ${t`Case insensitive matching`} +

${t`When enabled, user fields are matched regardless of their casing.`}

-
+
+ + + + + + ${t`Show matched user`} +

${t`When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown.`}

@@ -216,14 +224,19 @@ export class IdentificationStageForm extends ModelForm
-
+
+ + + + + + ${t`Show sources' labels`} +

${t`By default, only icons are shown for sources. Enable this to show their full names.`}

diff --git a/web/src/admin/stages/invitation/InvitationForm.ts b/web/src/admin/stages/invitation/InvitationForm.ts index 2f2ec3925..f6ef169e2 100644 --- a/web/src/admin/stages/invitation/InvitationForm.ts +++ b/web/src/admin/stages/invitation/InvitationForm.ts @@ -117,14 +117,19 @@ export class InvitationForm extends ModelForm {

-
+
+ + + + + + ${t`Single use`} +

${t`When enabled, the invitation will be deleted after usage.`}

diff --git a/web/src/admin/stages/invitation/InvitationStageForm.ts b/web/src/admin/stages/invitation/InvitationStageForm.ts index 8b4212de2..a2267fdec 100644 --- a/web/src/admin/stages/invitation/InvitationStageForm.ts +++ b/web/src/admin/stages/invitation/InvitationStageForm.ts @@ -57,19 +57,24 @@ export class InvitationStageForm extends ModelForm { ${t`Stage-specific settings`}
-
+
+ + + + + + ${t`Continue flow without invitation`} +

${t`If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given.`}

diff --git a/web/src/admin/stages/prompt/PromptForm.ts b/web/src/admin/stages/prompt/PromptForm.ts index 553b25bd0..8a9083dda 100644 --- a/web/src/admin/stages/prompt/PromptForm.ts +++ b/web/src/admin/stages/prompt/PromptForm.ts @@ -161,26 +161,36 @@ export class PromptForm extends ModelForm {
-
+
+ + + + + + ${t`Required`} +
-
+
+

${t`When checked, the placeholder will be evaluated in the same way environment as a property mapping. If the evaluation failed, the placeholder itself is returned.`} diff --git a/web/src/admin/stages/user_write/UserWriteStageForm.ts b/web/src/admin/stages/user_write/UserWriteStageForm.ts index 0c580a253..24aa68276 100644 --- a/web/src/admin/stages/user_write/UserWriteStageForm.ts +++ b/web/src/admin/stages/user_write/UserWriteStageForm.ts @@ -86,16 +86,19 @@ export class UserWriteStageForm extends ModelForm { -

+
+ + + + + + ${t`Create users as inactive`} +

${t`Mark newly created users as inactive.`}

diff --git a/web/src/admin/tenants/TenantForm.ts b/web/src/admin/tenants/TenantForm.ts index 8217a569b..0b501927c 100644 --- a/web/src/admin/tenants/TenantForm.ts +++ b/web/src/admin/tenants/TenantForm.ts @@ -68,14 +68,19 @@ export class TenantForm extends ModelForm {

-
+
+ + + + + + ${t`Default`} +

${t`Use this tenant for each domain that doesn't have a dedicated tenant.`}

diff --git a/web/src/admin/tokens/TokenForm.ts b/web/src/admin/tokens/TokenForm.ts index 9aeb2d513..89ff304b8 100644 --- a/web/src/admin/tokens/TokenForm.ts +++ b/web/src/admin/tokens/TokenForm.ts @@ -109,14 +109,19 @@ export class TokenForm extends ModelForm { />
-
+
+ + + + + + ${t`Expiring`} +

${t`If this is selected, the token will expire. Upon expiration, the token will be rotated.`}

diff --git a/web/src/admin/users/RelatedUserList.ts b/web/src/admin/users/RelatedUserList.ts index eeedfabf6..3778f241d 100644 --- a/web/src/admin/users/RelatedUserList.ts +++ b/web/src/admin/users/RelatedUserList.ts @@ -393,12 +393,10 @@ export class RelatedUserList extends Table {
-
+
+ + + + + + ${t`Hide service-accounts`} +
`; diff --git a/web/src/admin/users/ServiceAccountForm.ts b/web/src/admin/users/ServiceAccountForm.ts index d3e6cc500..5a1507663 100644 --- a/web/src/admin/users/ServiceAccountForm.ts +++ b/web/src/admin/users/ServiceAccountForm.ts @@ -43,10 +43,15 @@ export class ServiceAccountForm extends Form {

-
- - -
+

${t`Enabling this toggle will create a group named after the user, with the user as member.`}

diff --git a/web/src/admin/users/UserForm.ts b/web/src/admin/users/UserForm.ts index 776af1e94..c158f5d60 100644 --- a/web/src/admin/users/UserForm.ts +++ b/web/src/admin/users/UserForm.ts @@ -93,14 +93,19 @@ export class UserForm extends ModelForm { />
-
+
+ + + + + + ${t`Is active`} +

${t`Designates whether this user should be treated as active. Unselect this instead of deleting accounts.`}

diff --git a/web/src/common/styles/authentik.css b/web/src/common/styles/authentik.css index 6d183e930..3c4f141fd 100644 --- a/web/src/common/styles/authentik.css +++ b/web/src/common/styles/authentik.css @@ -265,6 +265,9 @@ html > form > input { .pf-c-form-control[readonly] { background-color: var(--ak-dark-background-light); } + .pf-c-switch__input:checked ~ .pf-c-switch__label { + --pf-c-switch__input--checked__label--Color: var(--ak-dark-foreground); + } /* select toggle */ .pf-c-select__toggle::before { --pf-c-select__toggle--before--BorderTopColor: var(--ak-dark-background-lighter); diff --git a/web/src/elements/TreeView.ts b/web/src/elements/TreeView.ts index 687ed2183..29456d981 100644 --- a/web/src/elements/TreeView.ts +++ b/web/src/elements/TreeView.ts @@ -197,7 +197,6 @@ export class TreeView extends AKElement { const rootItem = this.parse(this.items); return html`
    - extends AKElement { PFAlert, PFInputGroup, PFFormControl, + PFSwitch, AKGlobal, css` select[multiple] { diff --git a/web/src/elements/table/TablePage.ts b/web/src/elements/table/TablePage.ts index 28e25ca94..6120bf053 100644 --- a/web/src/elements/table/TablePage.ts +++ b/web/src/elements/table/TablePage.ts @@ -11,6 +11,7 @@ import { ifDefined } from "lit/directives/if-defined.js"; import PFContent from "@patternfly/patternfly/components/Content/content.css"; import PFPage from "@patternfly/patternfly/components/Page/page.css"; import PFSidebar from "@patternfly/patternfly/components/Sidebar/sidebar.css"; +import PFSwitch from "@patternfly/patternfly/components/Switch/switch.css"; export abstract class TablePage extends Table { abstract pageTitle(): string; @@ -18,7 +19,7 @@ export abstract class TablePage extends Table { abstract pageIcon(): string; static get styles(): CSSResult[] { - return super.styles.concat(PFPage, PFContent, PFSidebar); + return super.styles.concat(PFPage, PFContent, PFSwitch, PFSidebar); } renderSidebarBefore(): TemplateResult { diff --git a/web/src/flow/providers/oauth2/DeviceCode.ts b/web/src/flow/providers/oauth2/DeviceCode.ts index f4ca7707e..8eb976759 100644 --- a/web/src/flow/providers/oauth2/DeviceCode.ts +++ b/web/src/flow/providers/oauth2/DeviceCode.ts @@ -51,7 +51,6 @@ export class OAuth2DeviceCode extends BaseStage< class="pf-c-form__group" .errors=${(this.challenge?.responseErrors || {})["code"]} > - -
    -