From 1d4bfc06742a2f4ed67d6953d363ad419767758d Mon Sep 17 00:00:00 2001 From: "Jens L." Date: Wed, 24 Jul 2024 21:13:40 +0200 Subject: [PATCH] web/admin: widen prompt form (#10615) * web/admin: make prompt form wider Signed-off-by: Jens Langhammer * unrelated vscode settings Signed-off-by: Jens Langhammer --------- Signed-off-by: Jens Langhammer --- .vscode/extensions.json | 2 +- .vscode/launch.json | 2 +- .vscode/settings.json | 6 +- .vscode/tasks.json | 62 +++++++------------ web/src/admin/stages/prompt/PromptListPage.ts | 5 +- .../admin/stages/prompt/PromptStageForm.ts | 3 +- web/src/elements/buttons/ModalButton.ts | 3 + 7 files changed, 34 insertions(+), 49 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 53a07a56d2..f8c3b72e66 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -16,6 +16,6 @@ "ms-python.black-formatter", "redhat.vscode-yaml", "Tobermory.es6-string-html", - "unifiedjs.vscode-mdx", + "unifiedjs.vscode-mdx" ] } diff --git a/.vscode/launch.json b/.vscode/launch.json index f944db09fd..24a9ab936c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -22,6 +22,6 @@ }, "justMyCode": true, "django": true - }, + } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index ed87f96869..c48d27f575 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,7 +18,7 @@ "sso", "totp", "traefik", - "webauthn", + "webauthn" ], "todo-tree.tree.showCountsInTree": true, "todo-tree.tree.showBadges": true, @@ -48,9 +48,7 @@ "ignoreCase": false } ], - "go.testFlags": [ - "-count=1" - ], + "go.testFlags": ["-count=1"], "github-actions.workflows.pinned.workflows": [ ".github/workflows/ci-main.yml" ] diff --git a/.vscode/tasks.json b/.vscode/tasks.json index cd705afff4..5c5de1ef0f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -2,85 +2,67 @@ "version": "2.0.0", "tasks": [ { - "label": "authentik[core]: format & test", + "label": "authentik/core: make", "command": "poetry", - "args": [ - "run", - "make" - ], - "group": "build", + "args": ["run", "make", "lint-fix", "lint"], + "presentation": { + "panel": "new" + }, + "group": "test" }, { - "label": "authentik[core]: run", + "label": "authentik/core: run", "command": "poetry", - "args": [ - "run", - "make", - "run", - ], + "args": ["run", "ak", "server"], "group": "build", "presentation": { "panel": "dedicated", "group": "running" - }, + } }, { - "label": "authentik[web]: format", + "label": "authentik/web: make", "command": "make", "args": ["web"], - "group": "build", + "group": "build" }, { - "label": "authentik[web]: watch", + "label": "authentik/web: watch", "command": "make", "args": ["web-watch"], "group": "build", "presentation": { "panel": "dedicated", "group": "running" - }, + } }, { "label": "authentik: install", "command": "make", - "args": ["install"], - "group": "build", + "args": ["install", "-j4"], + "group": "build" }, { - "label": "authentik: i18n-extract", - "command": "poetry", - "args": [ - "run", - "make", - "i18n-extract" - ], - "group": "build", - }, - { - "label": "authentik[website]: format", + "label": "authentik/website: make", "command": "make", "args": ["website"], - "group": "build", + "group": "build" }, { - "label": "authentik[website]: watch", + "label": "authentik/website: watch", "command": "make", "args": ["website-watch"], "group": "build", "presentation": { "panel": "dedicated", "group": "running" - }, + } }, { - "label": "authentik[api]: generate", + "label": "authentik/api: generate", "command": "poetry", - "args": [ - "run", - "make", - "gen" - ], + "args": ["run", "make", "gen"], "group": "build" - }, + } ] } diff --git a/web/src/admin/stages/prompt/PromptListPage.ts b/web/src/admin/stages/prompt/PromptListPage.ts index c61e2bfdc4..9c9b257145 100644 --- a/web/src/admin/stages/prompt/PromptListPage.ts +++ b/web/src/admin/stages/prompt/PromptListPage.ts @@ -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 { html`${item.promptstageSet?.map((stage) => { return html`
  • ${stage.name}
  • `; })}`, - html` + html` ${msg("Update")} ${msg("Update Prompt")} @@ -105,7 +106,7 @@ export class PromptListPage extends TablePage { renderObjectCreate(): TemplateResult { return html` - + ${msg("Create")} ${msg("Create Prompt")} diff --git a/web/src/admin/stages/prompt/PromptStageForm.ts b/web/src/admin/stages/prompt/PromptStageForm.ts index b07c6b7eb9..092628d223 100644 --- a/web/src/admin/stages/prompt/PromptStageForm.ts +++ b/web/src/admin/stages/prompt/PromptStageForm.ts @@ -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 { ${msg("Hold control/command to select multiple items.")}

    ${this.instance - ? html` + ? html` ${msg("Create")} ${msg("Create Prompt")} diff --git a/web/src/elements/buttons/ModalButton.ts b/web/src/elements/buttons/ModalButton.ts index 6fc5d42b89..0301ee332c 100644 --- a/web/src/elements/buttons/ModalButton.ts +++ b/web/src/elements/buttons/ModalButton.ts @@ -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)); + } `, ]; }