mirror of
https://github.com/goauthentik/authentik
synced 2026-04-26 01:25:02 +02:00
* Use project relative paths. * Fix tests. * Fix types. * Clean up admin imports. * Move admin import. * Remove or replace references to admin. * Typo fix. * Flesh out ak-modal, about modal. * Flesh out lazy modal. * Fix portal elements not using dialog scope. * Fix url parameters, wizards. * Fix invokers, lazy load. * Fix theming. * Add placeholders, help. * Flesh out command palette. Flesh out styles, command invokers. Continue clean up. Allow slotted content. Flesh out. * Flesh out edit invoker. Prep groups. * Fix odd labeling, legacy situations. * Prepare deprecation of table modal. Clean up serialization. * Tidy types. * Port provider select modal. * Port member select form. * Flesh out role modal. Fix loading state. * Port user group form. * Fix spellcheck. * Fix dialog detection. * Revise types. * Port rac launch modal. * Remove deprecated table modal. * Consistent form action placement. * Consistent casing. * Consistent alignment. * Use more appropriate description. * Flesh out icon. Fix alignment, colors. * Flesh out user search. * Consistent save button. * Clean up labels. * Reduce warning noise. * Clean up label. * Use attribute e2e expects. * Use directive. Fix lifecycle * Fix frequent un-memoized entries. * Fix up closedBy detection. * Tidy alignment. * Fix types, composition. * Fix labels, tests. * Fix up impersonation, labels. * Flesh out. Fix refresh after submit. * Flesh out basic modal test. * Fix ARIA. * Flesh out roles test. * Revise selectors. * Clean up selectors. * Fix impersonation labels, form references. * Fix messages appearing under modals. * Ensure reason is parsed. * Flesh out impersonation test. * Flesh out impersonate test. * Flesh out application tests. Clean up toolbar header, ARIA. * Flesh out wizard test. * Refine weight, order. * Fix up initial values, selectors. * Fix tests. * Fix selector.
99 lines
3.1 KiB
TypeScript
99 lines
3.1 KiB
TypeScript
import "#admin/admin-settings/AdminSettingsForm";
|
|
import "#admin/events/ObjectChangelog";
|
|
import "#elements/CodeMirror";
|
|
import "#elements/EmptyState";
|
|
import "#elements/Tabs";
|
|
import "#elements/buttons/ModalButton";
|
|
import "#elements/buttons/SpinnerButton/ak-spinner-button";
|
|
import "#elements/forms/ModalForm";
|
|
|
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
|
|
|
import { AKElement } from "#elements/Base";
|
|
|
|
import { setPageDetails } from "#components/ak-page-navbar";
|
|
|
|
import { AdminSettingsForm } from "#admin/admin-settings/AdminSettingsForm";
|
|
|
|
import { AdminApi, Settings } from "@goauthentik/api";
|
|
|
|
import { msg } from "@lit/localize";
|
|
import { html, nothing, PropertyValues } from "lit";
|
|
import { customElement, query, state } from "lit/decorators.js";
|
|
|
|
import PFBanner from "@patternfly/patternfly/components/Banner/banner.css";
|
|
import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
|
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
|
import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
|
import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";
|
|
import PFForm from "@patternfly/patternfly/components/Form/form.css";
|
|
import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";
|
|
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
|
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
|
|
|
@customElement("ak-admin-settings")
|
|
export class AdminSettingsPage extends AKElement {
|
|
static styles = [
|
|
PFButton,
|
|
PFPage,
|
|
PFGrid,
|
|
PFContent,
|
|
PFCard,
|
|
PFDescriptionList,
|
|
PFForm,
|
|
PFFormControl,
|
|
PFBanner,
|
|
];
|
|
|
|
@query("ak-admin-settings-form#form")
|
|
protected form?: AdminSettingsForm;
|
|
|
|
@state()
|
|
protected settings?: Settings;
|
|
|
|
public override connectedCallback(): void {
|
|
super.connectedCallback();
|
|
this.#refresh();
|
|
}
|
|
|
|
#refresh = () => {
|
|
return new AdminApi(DEFAULT_CONFIG).adminSettingsRetrieve().then((settings) => {
|
|
this.settings = settings;
|
|
});
|
|
};
|
|
|
|
render() {
|
|
if (!this.settings) return nothing;
|
|
|
|
return html`
|
|
<section class="pf-c-page__main-section pf-m-no-padding-mobile pf-l-grid pf-m-gutter">
|
|
<div class="pf-c-card">
|
|
<div class="pf-c-card__body">
|
|
<ak-admin-settings-form
|
|
id="form"
|
|
.settings=${this.settings}
|
|
action-label=${msg("Update settings")}
|
|
@ak-form-submitted=${{ handleEvent: this.#refresh, passive: true }}
|
|
>
|
|
</ak-admin-settings-form>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
`;
|
|
}
|
|
|
|
updated(changed: PropertyValues<this>) {
|
|
super.updated(changed);
|
|
setPageDetails({
|
|
icon: "fa fa-cog",
|
|
header: msg("System settings"),
|
|
});
|
|
}
|
|
}
|
|
|
|
declare global {
|
|
interface HTMLElementTagNameMap {
|
|
"ak-admin-settings": AdminSettingsPage;
|
|
}
|
|
}
|