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

@ -16,6 +16,6 @@
"ms-python.black-formatter", "ms-python.black-formatter",
"redhat.vscode-yaml", "redhat.vscode-yaml",
"Tobermory.es6-string-html", "Tobermory.es6-string-html",
"unifiedjs.vscode-mdx", "unifiedjs.vscode-mdx"
] ]
} }

2
.vscode/launch.json vendored
View File

@ -22,6 +22,6 @@
}, },
"justMyCode": true, "justMyCode": true,
"django": true "django": true
}, }
] ]
} }

View File

@ -18,7 +18,7 @@
"sso", "sso",
"totp", "totp",
"traefik", "traefik",
"webauthn", "webauthn"
], ],
"todo-tree.tree.showCountsInTree": true, "todo-tree.tree.showCountsInTree": true,
"todo-tree.tree.showBadges": true, "todo-tree.tree.showBadges": true,
@ -48,9 +48,7 @@
"ignoreCase": false "ignoreCase": false
} }
], ],
"go.testFlags": [ "go.testFlags": ["-count=1"],
"-count=1"
],
"github-actions.workflows.pinned.workflows": [ "github-actions.workflows.pinned.workflows": [
".github/workflows/ci-main.yml" ".github/workflows/ci-main.yml"
] ]

62
.vscode/tasks.json vendored
View File

@ -2,85 +2,67 @@
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "authentik[core]: format & test", "label": "authentik/core: make",
"command": "poetry", "command": "poetry",
"args": [ "args": ["run", "make", "lint-fix", "lint"],
"run", "presentation": {
"make" "panel": "new"
], },
"group": "build", "group": "test"
}, },
{ {
"label": "authentik[core]: run", "label": "authentik/core: run",
"command": "poetry", "command": "poetry",
"args": [ "args": ["run", "ak", "server"],
"run",
"make",
"run",
],
"group": "build", "group": "build",
"presentation": { "presentation": {
"panel": "dedicated", "panel": "dedicated",
"group": "running" "group": "running"
}, }
}, },
{ {
"label": "authentik[web]: format", "label": "authentik/web: make",
"command": "make", "command": "make",
"args": ["web"], "args": ["web"],
"group": "build", "group": "build"
}, },
{ {
"label": "authentik[web]: watch", "label": "authentik/web: watch",
"command": "make", "command": "make",
"args": ["web-watch"], "args": ["web-watch"],
"group": "build", "group": "build",
"presentation": { "presentation": {
"panel": "dedicated", "panel": "dedicated",
"group": "running" "group": "running"
}, }
}, },
{ {
"label": "authentik: install", "label": "authentik: install",
"command": "make", "command": "make",
"args": ["install"], "args": ["install", "-j4"],
"group": "build", "group": "build"
}, },
{ {
"label": "authentik: i18n-extract", "label": "authentik/website: make",
"command": "poetry",
"args": [
"run",
"make",
"i18n-extract"
],
"group": "build",
},
{
"label": "authentik[website]: format",
"command": "make", "command": "make",
"args": ["website"], "args": ["website"],
"group": "build", "group": "build"
}, },
{ {
"label": "authentik[website]: watch", "label": "authentik/website: watch",
"command": "make", "command": "make",
"args": ["website-watch"], "args": ["website-watch"],
"group": "build", "group": "build",
"presentation": { "presentation": {
"panel": "dedicated", "panel": "dedicated",
"group": "running" "group": "running"
}, }
}, },
{ {
"label": "authentik[api]: generate", "label": "authentik/api: generate",
"command": "poetry", "command": "poetry",
"args": [ "args": ["run", "make", "gen"],
"run",
"make",
"gen"
],
"group": "build" "group": "build"
}, }
] ]
} }

View File

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

View File

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

View File

@ -66,6 +66,9 @@ export class ModalButton extends AKElement {
.locked { .locked {
overflow-y: hidden !important; 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));
}
`, `,
]; ];
} }