A few documentation changes.
This commit is contained in:
@ -86,6 +86,7 @@ export class AdminOverviewPage extends AKElement {
|
|||||||
|
|
||||||
render(): TemplateResult {
|
render(): TemplateResult {
|
||||||
const name = this.user?.user.name ?? this.user?.user.username;
|
const name = this.user?.user.name ?? this.user?.user.username;
|
||||||
|
|
||||||
return html`<ak-page-header icon="" header="" description=${msg("General system status")}>
|
return html`<ak-page-header icon="" header="" description=${msg("General system status")}>
|
||||||
<span slot="header"> ${msg(str`Welcome, ${name}.`)} </span>
|
<span slot="header"> ${msg(str`Welcome, ${name}.`)} </span>
|
||||||
</ak-page-header>
|
</ak-page-header>
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import "@goauthentik/elements/cards/AggregateCard.js";
|
|||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
import { map } from "lit/directives/map.js";
|
import { map } from "lit/directives/map.js";
|
||||||
|
|
||||||
import PFList from "@patternfly/patternfly/components/List/list.css";
|
import PFList from "@patternfly/patternfly/components/List/list.css";
|
||||||
@ -11,18 +12,17 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
|||||||
|
|
||||||
export type QuickAction = [label: string, url: string, isExternal?: boolean];
|
export type QuickAction = [label: string, url: string, isExternal?: boolean];
|
||||||
|
|
||||||
|
export interface IQuickActionsCard {
|
||||||
|
title?: string;
|
||||||
|
actions: QuickAction[];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class QuickActionsCard
|
* class QuickActionsCard
|
||||||
* element ak-quick-actions-card
|
* element ak-quick-actions-card
|
||||||
*
|
*
|
||||||
* Specialized card for navigation.
|
* Specialized card for navigation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export interface IQuickActionsCard {
|
|
||||||
title: string;
|
|
||||||
actions: QuickAction[];
|
|
||||||
}
|
|
||||||
|
|
||||||
@customElement("ak-quick-actions-card")
|
@customElement("ak-quick-actions-card")
|
||||||
export class QuickActionsCard extends AKElement implements IQuickActionsCard {
|
export class QuickActionsCard extends AKElement implements IQuickActionsCard {
|
||||||
static get styles() {
|
static get styles() {
|
||||||
|
|||||||
@ -27,7 +27,7 @@ const metadata: Meta<AggregatePromiseCard> = {
|
|||||||
export default metadata;
|
export default metadata;
|
||||||
|
|
||||||
const text =
|
const text =
|
||||||
"Curl up and sleep on the freshly laundered towels mew, but make meme, make cute face growl at dogs in my sleep. Scratch me there, elevator butt humans,humans, humans oh how much they love us felines we are the center of attention they feed, they clean hopped up on catnip mice. Kitty time flop over, for see owner, run in terror";
|
"Curl up and sleep on the freshly laundered towels mew, but make meme, make cute face growl at dogs in my sleep. Scratch me there, elevator butt humans, humans, humans oh how much they love us felines we are the center of attention they feed, they clean hopped up on catnip mice. Kitty time flop over, for see owner, run in terror";
|
||||||
|
|
||||||
export const DefaultStory: StoryObj = {
|
export const DefaultStory: StoryObj = {
|
||||||
args: {
|
args: {
|
||||||
@ -71,7 +71,9 @@ export const PromiseRejected: StoryObj = {
|
|||||||
leftJustified: false,
|
leftJustified: false,
|
||||||
failureMessage: undefined,
|
failureMessage: undefined,
|
||||||
},
|
},
|
||||||
render: ({ icon, header, headerLink, subtext, leftJustified, failureMessage }: IAggregatePromiseCard) => {
|
render: (
|
||||||
|
{ icon, header, headerLink, subtext, leftJustified, failureMessage }: IAggregatePromiseCard,
|
||||||
|
) => {
|
||||||
const runThis = (timeout: number, value: string) =>
|
const runThis = (timeout: number, value: string) =>
|
||||||
new Promise((_resolve, reject) => setTimeout(reject, timeout, value));
|
new Promise((_resolve, reject) => setTimeout(reject, timeout, value));
|
||||||
|
|
||||||
@ -87,8 +89,8 @@ export const PromiseRejected: StoryObj = {
|
|||||||
header=${ifDefined(header)}
|
header=${ifDefined(header)}
|
||||||
headerLink=${ifDefined(headerLink)}
|
headerLink=${ifDefined(headerLink)}
|
||||||
subtext=${ifDefined(subtext)}
|
subtext=${ifDefined(subtext)}
|
||||||
icon=${ifDefined(icon)}
|
icon=${ifDefined(icon)}
|
||||||
failureMessage=${ifDefined(failureMessage)}
|
failureMessage=${ifDefined(failureMessage)}
|
||||||
?left-justified=${leftJustified}
|
?left-justified=${leftJustified}
|
||||||
.promise=${runThis(8000, text)}
|
.promise=${runThis(8000, text)}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user