web/admin: fix ak-toggle-group for policy and blueprint uses (#6687)
* web/admin: fix ak-toggle-group for policy and blueprint uses Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix and re-enable lit-analyse Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
b6a57ffd4f
commit
bfd0fb66b3
3
Makefile
3
Makefile
|
@ -148,8 +148,7 @@ web-lint-fix:
|
|||
|
||||
web-lint:
|
||||
cd web && npm run lint
|
||||
# TODO: The analyzer hasn't run correctly in awhile.
|
||||
# cd web && npm run lit-analyse
|
||||
cd web && npm run lit-analyse
|
||||
|
||||
web-check-compile:
|
||||
cd web && npm run tsc
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||
import { docLink } from "@goauthentik/common/global";
|
||||
import { first } from "@goauthentik/common/utils";
|
||||
import "@goauthentik/components/ak-toggle-group";
|
||||
import "@goauthentik/elements/CodeMirror";
|
||||
import "@goauthentik/elements/forms/FormGroup";
|
||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||
|
@ -18,9 +19,9 @@ import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
|||
import { BlueprintFile, BlueprintInstance, ManagedApi } from "@goauthentik/api";
|
||||
|
||||
enum blueprintSource {
|
||||
file,
|
||||
oci,
|
||||
internal,
|
||||
file = "file",
|
||||
oci = "oci",
|
||||
internal = "internal",
|
||||
}
|
||||
|
||||
@customElement("ak-blueprint-form")
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||
import { first, groupBy } from "@goauthentik/common/utils";
|
||||
import "@goauthentik/components/ak-toggle-group";
|
||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
||||
import "@goauthentik/elements/forms/SearchSelect";
|
||||
|
@ -24,9 +25,9 @@ import {
|
|||
} from "@goauthentik/api";
|
||||
|
||||
enum target {
|
||||
policy,
|
||||
group,
|
||||
user,
|
||||
policy = "policy",
|
||||
group = "group",
|
||||
user = "user",
|
||||
}
|
||||
|
||||
@customElement("ak-policy-binding-form")
|
||||
|
@ -51,7 +52,7 @@ export class PolicyBindingForm extends ModelForm<PolicyBinding, string> {
|
|||
@property()
|
||||
targetPk?: string;
|
||||
|
||||
@property({ type: Number })
|
||||
@state()
|
||||
policyGroupUser: target = target.policy;
|
||||
|
||||
@property({ type: Boolean })
|
||||
|
|
|
@ -6,6 +6,7 @@ import { customElement, property } from "lit/decorators.js";
|
|||
import { classMap } from "lit/directives/class-map.js";
|
||||
|
||||
import PFToggleGroup from "@patternfly/patternfly/components/ToggleGroup/toggle-group.css";
|
||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||
|
||||
type Pair = [string, string];
|
||||
|
||||
|
@ -26,6 +27,7 @@ type Pair = [string, string];
|
|||
export class AkToggleGroup extends CustomEmitterElement(AKElement) {
|
||||
static get styles() {
|
||||
return [
|
||||
PFBase,
|
||||
PFToggleGroup,
|
||||
css`
|
||||
.pf-c-toggle-group {
|
||||
|
|
Reference in New Issue