Compare commits
13 Commits
main
...
web/add-co
Author | SHA1 | Date | |
---|---|---|---|
00c1e17b52 | |||
cba8e84bbe | |||
d313fd7fb4 | |||
102811508f | |||
16b3ca3715 | |||
8b4e0361c4 | |||
22cb5b7379 | |||
2d0117d096 | |||
035bda4eac | |||
50906214e5 | |||
e505f274b6 | |||
fe52f44dca | |||
3146e5a50f |
109
web/package-lock.json
generated
109
web/package-lock.json
generated
@ -51,6 +51,7 @@
|
||||
"lit": "^3.2.0",
|
||||
"md-front-matter": "^1.0.4",
|
||||
"mermaid": "^11.6.0",
|
||||
"ninja-keys": "^1.2.2",
|
||||
"rapidoc": "^9.3.8",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
@ -2587,6 +2588,57 @@
|
||||
"@lit/reactive-element": "^1.0.0 || ^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@material/mwc-icon": {
|
||||
"version": "0.25.3",
|
||||
"resolved": "https://registry.npmjs.org/@material/mwc-icon/-/mwc-icon-0.25.3.tgz",
|
||||
"integrity": "sha512-36076AWZIRSr8qYOLjuDDkxej/HA0XAosrj7TS1ZeLlUBnLUtbDtvc1S7KSa0hqez7ouzOqGaWK24yoNnTa2OA==",
|
||||
"deprecated": "MWC beta is longer supported. Please upgrade to @material/web",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"lit": "^2.0.0",
|
||||
"tslib": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@material/mwc-icon/node_modules/@lit/reactive-element": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz",
|
||||
"integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@lit-labs/ssr-dom-shim": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@material/mwc-icon/node_modules/lit": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz",
|
||||
"integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@lit/reactive-element": "^1.6.0",
|
||||
"lit-element": "^3.3.0",
|
||||
"lit-html": "^2.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@material/mwc-icon/node_modules/lit-element": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz",
|
||||
"integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@lit-labs/ssr-dom-shim": "^1.1.0",
|
||||
"@lit/reactive-element": "^1.3.0",
|
||||
"lit-html": "^2.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@material/mwc-icon/node_modules/lit-html": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz",
|
||||
"integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@types/trusted-types": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.0.tgz",
|
||||
@ -16940,6 +16992,12 @@
|
||||
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/hotkeys-js": {
|
||||
"version": "3.8.7",
|
||||
"resolved": "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.8.7.tgz",
|
||||
"integrity": "sha512-ckAx3EkUr5XjDwjEHDorHxRO2Kb7z6Z2Sxul4MbBkN8Nho7XDslQsgMJT+CiJ5Z4TgRxxvKHEpuLE3imzqy4Lg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/html-escaper": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
|
||||
@ -21632,6 +21690,57 @@
|
||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ninja-keys": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/ninja-keys/-/ninja-keys-1.2.2.tgz",
|
||||
"integrity": "sha512-ylo8jzKowi3XBHkgHRjBJaKQkl32WRLr7kRiA0ajiku11vHRDJ2xANtTScR5C7XlDwKEOYvUPesCKacUeeLAYw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@material/mwc-icon": "0.25.3",
|
||||
"hotkeys-js": "3.8.7",
|
||||
"lit": "2.2.6"
|
||||
}
|
||||
},
|
||||
"node_modules/ninja-keys/node_modules/@lit/reactive-element": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz",
|
||||
"integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@lit-labs/ssr-dom-shim": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ninja-keys/node_modules/lit": {
|
||||
"version": "2.2.6",
|
||||
"resolved": "https://registry.npmjs.org/lit/-/lit-2.2.6.tgz",
|
||||
"integrity": "sha512-K2vkeGABfSJSfkhqHy86ujchJs3NR9nW1bEEiV+bXDkbiQ60Tv5GUausYN2mXigZn8lC1qXuc46ArQRKYmumZw==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@lit/reactive-element": "^1.3.0",
|
||||
"lit-element": "^3.2.0",
|
||||
"lit-html": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ninja-keys/node_modules/lit-element": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz",
|
||||
"integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@lit-labs/ssr-dom-shim": "^1.1.0",
|
||||
"@lit/reactive-element": "^1.3.0",
|
||||
"lit-html": "^2.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ninja-keys/node_modules/lit-html": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz",
|
||||
"integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@types/trusted-types": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/node-abort-controller": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz",
|
||||
|
@ -122,6 +122,7 @@
|
||||
"lit": "^3.2.0",
|
||||
"md-front-matter": "^1.0.4",
|
||||
"mermaid": "^11.6.0",
|
||||
"ninja-keys": "^1.2.2",
|
||||
"rapidoc": "^9.3.8",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
|
172
web/src/admin/AdminInterface/AdminCommands.ts
Normal file
172
web/src/admin/AdminInterface/AdminCommands.ts
Normal file
@ -0,0 +1,172 @@
|
||||
import { navigate } from "@goauthentik/elements/router/RouterOutlet";
|
||||
import { INinjaAction } from "ninja-keys/dist/interfaces/ininja-action.js";
|
||||
|
||||
import { msg } from "@lit/localize";
|
||||
|
||||
export const adminCommands: INinjaAction[] = [
|
||||
{
|
||||
id: msg("Overview"),
|
||||
title: msg("Dashboard"),
|
||||
handler: () => navigate("/administration/overview"),
|
||||
section: msg("Dashboards"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/administration/dashboard/users"),
|
||||
id: msg("User Statistics"),
|
||||
title: msg("User Statistics"),
|
||||
icon: '<i class="pf-icon pf-icon-user"></i>',
|
||||
section: msg("Dashboards"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/administration/system-tasks"),
|
||||
id: msg("System Tasks"),
|
||||
title: msg("System Tasks"),
|
||||
section: msg("Dashboards"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/core/applications"),
|
||||
id: msg("Applications"),
|
||||
title: msg("Applications"),
|
||||
section: msg("Applications"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/core/providers"),
|
||||
id: msg("Providers"),
|
||||
title: msg("Providers"),
|
||||
section: msg("Applications"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/outpost/outposts"),
|
||||
id: msg("Outposts"),
|
||||
title: msg("Outposts"),
|
||||
section: msg("Applications"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/events/log"),
|
||||
id: msg("Logs"),
|
||||
title: msg("Logs"),
|
||||
section: msg("Events"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/events/rules"),
|
||||
id: msg("Notification Rules"),
|
||||
title: msg("Notification Rules"),
|
||||
section: msg("Events"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/events/transports"),
|
||||
id: msg("Notification Transports"),
|
||||
title: msg("Notification Transports"),
|
||||
section: msg("Events"),
|
||||
},
|
||||
|
||||
{
|
||||
handler: () => navigate("/policy/policies"),
|
||||
id: msg("Policies"),
|
||||
title: msg("Policies"),
|
||||
section: msg("Customization"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/core/property-mappings"),
|
||||
id: msg("Property Mappings"),
|
||||
title: msg("Property Mappings"),
|
||||
section: msg("Customization"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/blueprints/instances"),
|
||||
id: msg("Blueprints"),
|
||||
title: msg("Blueprints"),
|
||||
section: msg("Customization"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/policy/reputation"),
|
||||
id: msg("Reputation scores"),
|
||||
title: msg("Reputation scores"),
|
||||
section: msg("Customization"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/flow/flows"),
|
||||
id: msg("Flows"),
|
||||
title: msg("Flows"),
|
||||
section: msg("Flows"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/flow/stages"),
|
||||
id: msg("Stages"),
|
||||
title: msg("Stages"),
|
||||
section: msg("Flows"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/flow/stages/prompts"),
|
||||
id: msg("Prompts"),
|
||||
title: msg("Prompts"),
|
||||
section: msg("Flows"),
|
||||
},
|
||||
|
||||
{
|
||||
handler: () => navigate("/identity/users"),
|
||||
id: msg("Users"),
|
||||
title: msg("Users"),
|
||||
section: msg("Directory"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/identity/groups"),
|
||||
id: msg("Groups"),
|
||||
title: msg("Groups"),
|
||||
section: msg("Directory"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/identity/roles"),
|
||||
id: msg("Roles"),
|
||||
title: msg("Roles"),
|
||||
section: msg("Directory"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/core/sources"),
|
||||
id: msg("Federation and Social login"),
|
||||
title: msg("Federation and Social login"),
|
||||
section: msg("Directory"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/core/tokens"),
|
||||
id: msg("Tokens and App passwords"),
|
||||
title: msg("Tokens and App passwords"),
|
||||
section: msg("Directory"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/flow/stages/invitations"),
|
||||
id: msg("Invitations"),
|
||||
title: msg("Invitations"),
|
||||
section: msg("Directory"),
|
||||
},
|
||||
|
||||
{
|
||||
handler: () => navigate("/core/brands"),
|
||||
id: msg("Brands"),
|
||||
title: msg("Brands"),
|
||||
section: msg("System"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/crypto/certificates"),
|
||||
id: msg("Certificates"),
|
||||
title: msg("Certificates"),
|
||||
section: msg("System"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/outpost/integrations"),
|
||||
id: msg("Outpost Integrations"),
|
||||
title: msg("Outpost Integrations"),
|
||||
section: msg("System"),
|
||||
},
|
||||
{
|
||||
handler: () => navigate("/admin/settings"),
|
||||
id: msg("Settings"),
|
||||
title: msg("Settings"),
|
||||
section: msg("System"),
|
||||
},
|
||||
{
|
||||
handler: () => window.location.assign("/if/user/"),
|
||||
id: msg("User interface"),
|
||||
title: msg("Go to my User page"),
|
||||
},
|
||||
];
|
@ -1,5 +1,6 @@
|
||||
import "#admin/AdminInterface/AboutModal";
|
||||
import type { AboutModal } from "#admin/AdminInterface/AboutModal";
|
||||
import { adminCommands } from "#admin/AdminInterface/AdminCommands";
|
||||
import { ROUTES } from "#admin/Routes";
|
||||
import { EVENT_API_DRAWER_TOGGLE, EVENT_NOTIFICATION_DRAWER_TOGGLE } from "#common/constants";
|
||||
import { configureSentry } from "#common/sentry/index";
|
||||
@ -21,6 +22,7 @@ import { getURLParam, updateURLParams } from "#elements/router/RouteMatch";
|
||||
import "#elements/router/RouterOutlet";
|
||||
import "#elements/sidebar/Sidebar";
|
||||
import "#elements/sidebar/SidebarItem";
|
||||
import "ninja-keys";
|
||||
|
||||
import { CSSResult, TemplateResult, css, html, nothing } from "lit";
|
||||
import { customElement, eventOptions, property, query } from "lit/decorators.js";
|
||||
@ -119,6 +121,10 @@ export class AdminInterface extends WithCapabilitiesConfig(AuthenticatedInterfac
|
||||
.pf-c-drawer__panel {
|
||||
z-index: var(--pf-global--ZIndex--xl);
|
||||
}
|
||||
ninja-keys {
|
||||
--ninja-z-index: 99999;
|
||||
--ninja-accent-color: var(--ak-accent);
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
@ -190,6 +196,11 @@ export class AdminInterface extends WithCapabilitiesConfig(AuthenticatedInterfac
|
||||
};
|
||||
|
||||
return html` <ak-locale-context>
|
||||
<ninja-keys
|
||||
.data=${adminCommands}
|
||||
noAutoLoadMdicons
|
||||
class="${this.activeTheme === UiThemeEnum.Dark ? "dark" : ""}"
|
||||
></ninja-keys>
|
||||
<div class="pf-c-page">
|
||||
<ak-page-navbar ?open=${this.sidebarOpen} @sidebar-toggle=${this.sidebarListener}>
|
||||
<ak-version-banner></ak-version-banner>
|
||||
|
Reference in New Issue
Block a user