Skip to content

Commit

Permalink
web/admin: widen prompt form (#10615)
Browse files Browse the repository at this point in the history
* web/admin: make prompt form wider

Signed-off-by: Jens Langhammer <[email protected]>

* unrelated vscode settings

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
  • Loading branch information
BeryJu authored Jul 24, 2024
1 parent 3cdf12f commit 1d4bfc0
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"ms-python.black-formatter",
"redhat.vscode-yaml",
"Tobermory.es6-string-html",
"unifiedjs.vscode-mdx",
"unifiedjs.vscode-mdx"
]
}
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
},
"justMyCode": true,
"django": true
},
}
]
}
6 changes: 2 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"sso",
"totp",
"traefik",
"webauthn",
"webauthn"
],
"todo-tree.tree.showCountsInTree": true,
"todo-tree.tree.showBadges": true,
Expand Down Expand Up @@ -48,9 +48,7 @@
"ignoreCase": false
}
],
"go.testFlags": [
"-count=1"
],
"go.testFlags": ["-count=1"],
"github-actions.workflows.pinned.workflows": [
".github/workflows/ci-main.yml"
]
Expand Down
62 changes: 22 additions & 40 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
{
"label": "authentik: i18n-extract",
"command": "poetry",
"args": [
"run",
"make",
"i18n-extract"
],
"group": "build",
"args": ["install", "-j4"],
"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"
},
}
]
}
5 changes: 3 additions & 2 deletions web/src/admin/stages/prompt/PromptListPage.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down
3 changes: 2 additions & 1 deletion web/src/admin/stages/prompt/PromptStageForm.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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>
Expand Down
3 changes: 3 additions & 0 deletions web/src/elements/buttons/ModalButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
`,
];
}
Expand Down

0 comments on commit 1d4bfc0

Please sign in to comment.