web/admin: widen prompt form (#10615)

* web/admin: make prompt form wider

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* unrelated vscode settings

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L.
2024-07-24 21:13:40 +02:00
committed by GitHub
parent 3cdf12fd6a
commit 1d4bfc0674
7 changed files with 34 additions and 49 deletions

View File

@ -1,6 +1,7 @@
import "@goauthentik/admin/rbac/ObjectPermissionModal";
import "@goauthentik/admin/stages/prompt/PromptForm";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { PFSize } from "@goauthentik/common/enums";
import "@goauthentik/elements/buttons/ModalButton";
import "@goauthentik/elements/buttons/SpinnerButton";
import "@goauthentik/elements/forms/DeleteBulkForm";
@ -85,7 +86,7 @@ export class PromptListPage extends TablePage<Prompt> {
html`${item.promptstageSet?.map((stage) => {
return html`<li>${stage.name}</li>`;
})}`,
html`<ak-forms-modal>
html`<ak-forms-modal size=${PFSize.XLarge}>
<span slot="submit"> ${msg("Update")} </span>
<span slot="header"> ${msg("Update Prompt")} </span>
<ak-prompt-form slot="form" .instancePk=${item.pk}> </ak-prompt-form>
@ -105,7 +106,7 @@ export class PromptListPage extends TablePage<Prompt> {
renderObjectCreate(): TemplateResult {
return html`
<ak-forms-modal>
<ak-forms-modal size=${PFSize.XLarge}>
<span slot="submit"> ${msg("Create")} </span>
<span slot="header"> ${msg("Create Prompt")} </span>
<ak-prompt-form slot="form"> </ak-prompt-form>

View File

@ -1,6 +1,7 @@
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
import "@goauthentik/admin/stages/prompt/PromptForm";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { PFSize } from "@goauthentik/common/enums";
import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/HorizontalFormElement";
import "@goauthentik/elements/forms/ModalForm";
@ -94,7 +95,7 @@ export class PromptStageForm extends BaseStageForm<PromptStage> {
${msg("Hold control/command to select multiple items.")}
</p>
${this.instance
? html`<ak-forms-modal>
? html`<ak-forms-modal size=${PFSize.XLarge}>
<span slot="submit"> ${msg("Create")} </span>
<span slot="header"> ${msg("Create Prompt")} </span>
<ak-prompt-form slot="form"> </ak-prompt-form>

View File

@ -66,6 +66,9 @@ export class ModalButton extends AKElement {
.locked {
overflow-y: hidden !important;
}
.pf-c-modal-box.pf-m-xl {
--pf-c-modal-box--Width: calc(1.5 * var(--pf-c-modal-box--m-lg--lg--MaxWidth));
}
`,
];
}