web: I hate getting spanked by prettier.
This commit is contained in:
parent
eb9247b78f
commit
332ef59860
|
@ -1,15 +1,14 @@
|
||||||
import "@goauthentik/admin/applications/ApplicationForm";
|
import "@goauthentik/admin/applications/ApplicationForm";
|
||||||
import "./ApplicationWizardHint";
|
|
||||||
import { PFSize } from "@goauthentik/app/elements/Spinner";
|
import { PFSize } from "@goauthentik/app/elements/Spinner";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { uiConfig } from "@goauthentik/common/ui/config";
|
import { uiConfig } from "@goauthentik/common/ui/config";
|
||||||
import { getURLParam } from "@goauthentik/elements/router/RouteMatch";
|
|
||||||
import "@goauthentik/components/ak-app-icon";
|
import "@goauthentik/components/ak-app-icon";
|
||||||
import MDApplication from "@goauthentik/docs/core/applications.md";
|
import MDApplication from "@goauthentik/docs/core/applications.md";
|
||||||
import "@goauthentik/elements/Markdown";
|
import "@goauthentik/elements/Markdown";
|
||||||
import "@goauthentik/elements/buttons/SpinnerButton";
|
import "@goauthentik/elements/buttons/SpinnerButton";
|
||||||
import "@goauthentik/elements/forms/DeleteBulkForm";
|
import "@goauthentik/elements/forms/DeleteBulkForm";
|
||||||
import "@goauthentik/elements/forms/ModalForm";
|
import "@goauthentik/elements/forms/ModalForm";
|
||||||
|
import { getURLParam } from "@goauthentik/elements/router/RouteMatch";
|
||||||
// import { getURLParam } from "@goauthentik/elements/router/RouteMatch";
|
// import { getURLParam } from "@goauthentik/elements/router/RouteMatch";
|
||||||
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
||||||
import { TableColumn } from "@goauthentik/elements/table/Table";
|
import { TableColumn } from "@goauthentik/elements/table/Table";
|
||||||
|
@ -24,6 +23,8 @@ import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
||||||
|
|
||||||
import { Application, CoreApi } from "@goauthentik/api";
|
import { Application, CoreApi } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import "./ApplicationWizardHint";
|
||||||
|
|
||||||
@customElement("ak-application-list")
|
@customElement("ak-application-list")
|
||||||
export class ApplicationListPage extends TablePage<Application> {
|
export class ApplicationListPage extends TablePage<Application> {
|
||||||
searchEnabled(): boolean {
|
searchEnabled(): boolean {
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
import "@goauthentik/admin/applications/wizard/ak-application-wizard";
|
import "@goauthentik/admin/applications/wizard/ak-application-wizard";
|
||||||
import { ShowHintController, ShowHintControllerHost } from "@goauthentik/components/ak-hint/ShowHintController";
|
import {
|
||||||
|
ShowHintController,
|
||||||
|
ShowHintControllerHost,
|
||||||
|
} from "@goauthentik/components/ak-hint/ShowHintController";
|
||||||
import "@goauthentik/components/ak-hint/ak-hint";
|
import "@goauthentik/components/ak-hint/ak-hint";
|
||||||
import "@goauthentik/components/ak-hint/ak-hint-body";
|
import "@goauthentik/components/ak-hint/ak-hint-body";
|
||||||
import { AKElement } from "@goauthentik/elements/Base";
|
import { AKElement } from "@goauthentik/elements/Base";
|
||||||
|
@ -16,7 +19,15 @@ import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
||||||
import PFLabel from "@patternfly/patternfly/components/Label/label.css";
|
import PFLabel from "@patternfly/patternfly/components/Label/label.css";
|
||||||
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
||||||
|
|
||||||
const closeButtonIcon = html`<svg fill="currentColor" height="1em" width="1em" viewBox="0 0 352 512" aria-hidden="true" role="img" style="vertical-align: -0.125em;">
|
const closeButtonIcon = html`<svg
|
||||||
|
fill="currentColor"
|
||||||
|
height="1em"
|
||||||
|
width="1em"
|
||||||
|
viewBox="0 0 352 512"
|
||||||
|
aria-hidden="true"
|
||||||
|
role="img"
|
||||||
|
style="vertical-align: -0.125em;"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
|
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
|
||||||
></path>
|
></path>
|
||||||
|
@ -38,18 +49,39 @@ export class AkApplicationWizardHint extends AKElement implements ShowHintContro
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.showHintController = new ShowHintController(this, "202310-application-wizard-announcement");
|
this.showHintController = new ShowHintController(
|
||||||
|
this,
|
||||||
|
"202310-application-wizard-announcement",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderReminder() {
|
renderReminder() {
|
||||||
const sectionStyles = { paddingBottom: "0", marginBottom: "-0.5rem", marginRight: "0.0625rem", textAlign: "right" };
|
const sectionStyles = {
|
||||||
|
paddingBottom: "0",
|
||||||
|
marginBottom: "-0.5rem",
|
||||||
|
marginRight: "0.0625rem",
|
||||||
|
textAlign: "right",
|
||||||
|
};
|
||||||
const textStyle = { maxWidth: "60ch" };
|
const textStyle = { maxWidth: "60ch" };
|
||||||
|
|
||||||
return html`<section class="pf-c-page__main-section pf-m-no-padding-mobile" style="${styleMap(sectionStyles)}">
|
return html`<section
|
||||||
|
class="pf-c-page__main-section pf-m-no-padding-mobile"
|
||||||
|
style="${styleMap(sectionStyles)}"
|
||||||
|
>
|
||||||
<span class="pf-c-label">
|
<span class="pf-c-label">
|
||||||
<a class="pf-c-label__content" @click=${this.showHintController.show}>
|
<a class="pf-c-label__content" @click=${this.showHintController.show}>
|
||||||
<span class="pf-c-label__text" style="${styleMap(textStyle)}"> ${msg("One hint, 'New Application Wizard', is currently hidden")} </span>
|
<span class="pf-c-label__text" style="${styleMap(textStyle)}">
|
||||||
<button aria-disabled="false" aria-label="Restore Application Wizard Hint " class="pf-c-button pf-m-plain" type="button" data-ouia-safe="true">${closeButtonIcon}</button>
|
${msg("One hint, 'New Application Wizard', is currently hidden")}
|
||||||
|
</span>
|
||||||
|
<button
|
||||||
|
aria-disabled="false"
|
||||||
|
aria-label="Restore Application Wizard Hint "
|
||||||
|
class="pf-c-button pf-m-plain"
|
||||||
|
type="button"
|
||||||
|
data-ouia-safe="true"
|
||||||
|
>
|
||||||
|
${closeButtonIcon}
|
||||||
|
</button>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</section>`;
|
</section>`;
|
||||||
|
@ -60,11 +92,15 @@ export class AkApplicationWizardHint extends AKElement implements ShowHintContro
|
||||||
<ak-hint>
|
<ak-hint>
|
||||||
<ak-hint-body>
|
<ak-hint-body>
|
||||||
<p>
|
<p>
|
||||||
You can now configure both an application and its authentication provider at the same time with our new Application Wizard.
|
You can now configure both an application and its authentication provider at
|
||||||
|
the same time with our new Application Wizard.
|
||||||
<!-- <a href="(link to docs)">Learn more about the wizard here.</a> -->
|
<!-- <a href="(link to docs)">Learn more about the wizard here.</a> -->
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ak-application-wizard .open=${getURLParam("createWizard", false)} .showButton=${false}></ak-application-wizard>
|
<ak-application-wizard
|
||||||
|
.open=${getURLParam("createWizard", false)}
|
||||||
|
.showButton=${false}
|
||||||
|
></ak-application-wizard>
|
||||||
</ak-hint-body>
|
</ak-hint-body>
|
||||||
${this.showHintController.render()}
|
${this.showHintController.render()}
|
||||||
</ak-hint>
|
</ak-hint>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import "@goauthentik/admin/applications/ApplicationWizardHint";
|
||||||
import "@goauthentik/admin/providers/ProviderWizard";
|
import "@goauthentik/admin/providers/ProviderWizard";
|
||||||
import "@goauthentik/admin/providers/ldap/LDAPProviderForm";
|
import "@goauthentik/admin/providers/ldap/LDAPProviderForm";
|
||||||
import "@goauthentik/admin/providers/oauth2/OAuth2ProviderForm";
|
import "@goauthentik/admin/providers/oauth2/OAuth2ProviderForm";
|
||||||
|
@ -5,7 +6,6 @@ import "@goauthentik/admin/providers/proxy/ProxyProviderForm";
|
||||||
import "@goauthentik/admin/providers/radius/RadiusProviderForm";
|
import "@goauthentik/admin/providers/radius/RadiusProviderForm";
|
||||||
import "@goauthentik/admin/providers/saml/SAMLProviderForm";
|
import "@goauthentik/admin/providers/saml/SAMLProviderForm";
|
||||||
import "@goauthentik/admin/providers/scim/SCIMProviderForm";
|
import "@goauthentik/admin/providers/scim/SCIMProviderForm";
|
||||||
import "@goauthentik/admin/applications/ApplicationWizardHint";
|
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { uiConfig } from "@goauthentik/common/ui/config";
|
import { uiConfig } from "@goauthentik/common/ui/config";
|
||||||
import "@goauthentik/elements/buttons/SpinnerButton";
|
import "@goauthentik/elements/buttons/SpinnerButton";
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
|
import type { WizardStep } from "@goauthentik/components/ak-wizard-main/types";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
import { customElement } from "@lit/reactive-element/decorators/custom-element.js";
|
import { customElement } from "@lit/reactive-element/decorators/custom-element.js";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { BackStep, CancelWizard, CloseWizard, NextStep } from "../commonWizardButtons";
|
|
||||||
import { msg } from "@lit/localize";
|
|
||||||
|
|
||||||
import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
||||||
import PFRadio from "@patternfly/patternfly/components/Radio/radio.css";
|
import PFRadio from "@patternfly/patternfly/components/Radio/radio.css";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
|
|
||||||
import type { WizardStep } from "@goauthentik/components/ak-wizard-main/types";
|
|
||||||
import { AkWizard } from "../AkWizard";
|
import { AkWizard } from "../AkWizard";
|
||||||
|
import { BackStep, CancelWizard, CloseWizard, NextStep } from "../commonWizardButtons";
|
||||||
|
|
||||||
type WizardStateUpdate = {
|
type WizardStateUpdate = {
|
||||||
message: string;
|
message: string;
|
||||||
|
@ -43,5 +44,4 @@ export class ApplicationWizard extends AkWizard<WizardStateUpdate, WizardStep> {
|
||||||
close() {
|
close() {
|
||||||
this.frame.value!.open = false;
|
this.frame.value!.open = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
|
import type { WizardStep } from "@goauthentik/components/ak-wizard-main/types";
|
||||||
import "@goauthentik/elements/messages/MessageContainer";
|
import "@goauthentik/elements/messages/MessageContainer";
|
||||||
import { Meta } from "@storybook/web-components";
|
import { Meta } from "@storybook/web-components";
|
||||||
|
|
||||||
import { TemplateResult, html } from "lit";
|
import { TemplateResult, html } from "lit";
|
||||||
|
|
||||||
|
import { AkWizard } from "../AkWizard";
|
||||||
import "./ak-demo-wizard";
|
import "./ak-demo-wizard";
|
||||||
|
|
||||||
const metadata: Meta<AkWizard> = {
|
const metadata: Meta<AkWizard<string, WizardStep>> = {
|
||||||
title: "Components / Wizard / Basic",
|
title: "Components / Wizard / Basic",
|
||||||
component: "ak-wizard-main",
|
component: "ak-wizard-main",
|
||||||
parameters: {
|
parameters: {
|
||||||
|
@ -32,9 +35,6 @@ const container = (testItem: TemplateResult) =>
|
||||||
${testItem}
|
${testItem}
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
|
|
||||||
export const OnePageWizard = () => {
|
export const OnePageWizard = () => {
|
||||||
return container(
|
return container(html` <ak-demo-wizard></ak-demo-wizard>`);
|
||||||
html` <ak-demo-wizard></ak-demo-wizard>`
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
Reference in New Issue