core: show all applications a user can access in admin interface (#8343)

* core: show all applications a user can access in admin interface

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

* minor adjustments

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

* add relative time

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

* use relative time in most places

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

* improve admin dashboard scaling

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

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2024-01-30 01:56:33 +01:00
committed by GitHub
parent 0052e60643
commit 07ed5e1cd9
22 changed files with 245 additions and 49 deletions

View File

@ -9,7 +9,6 @@ import "@goauthentik/elements/buttons/SpinnerButton";
import "@goauthentik/elements/forms/DeleteBulkForm";
import "@goauthentik/elements/forms/ModalForm";
import { getURLParam } from "@goauthentik/elements/router/RouteMatch";
// import { getURLParam } from "@goauthentik/elements/router/RouteMatch";
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
import { TableColumn } from "@goauthentik/elements/table/Table";
import { TablePage } from "@goauthentik/elements/table/TablePage";
@ -25,6 +24,22 @@ import { Application, CoreApi } from "@goauthentik/api";
import "./ApplicationWizardHint";
export const applicationListStyle = css`
/* Fix alignment issues with images in tables */
.pf-c-table tbody > tr > * {
vertical-align: middle;
}
tr td:first-child {
width: auto;
min-width: 0px;
text-align: center;
vertical-align: middle;
}
.pf-c-sidebar.pf-m-gutter > .pf-c-sidebar__main > * + * {
margin-left: calc(var(--pf-c-sidebar__main--child--MarginLeft) / 2);
}
`;
@customElement("ak-application-list")
export class ApplicationListPage extends TablePage<Application> {
searchEnabled(): boolean {
@ -59,24 +74,7 @@ export class ApplicationListPage extends TablePage<Application> {
}
static get styles(): CSSResult[] {
return super.styles.concat(
PFCard,
css`
/* Fix alignment issues with images in tables */
.pf-c-table tbody > tr > * {
vertical-align: middle;
}
tr td:first-child {
width: auto;
min-width: 0px;
text-align: center;
vertical-align: middle;
}
.pf-c-sidebar.pf-m-gutter > .pf-c-sidebar__main > * + * {
margin-left: calc(var(--pf-c-sidebar__main--child--MarginLeft) / 2);
}
`,
);
return super.styles.concat(PFCard, applicationListStyle);
}
columns(): TableColumn[] {
@ -97,7 +95,6 @@ export class ApplicationListPage extends TablePage<Application> {
renderSidebarAfter(): TemplateResult {
// Rendering the wizard with .open here, as if we set the attribute in
// renderObjectCreate() it'll open two wizards, since that function gets called twice
return html`<div class="pf-c-sidebar__panel pf-m-width-25">
<div class="pf-c-card">
<div class="pf-c-card__body">