From c46fc3e100de362aeae2acdc382af24e9f49d9e5 Mon Sep 17 00:00:00 2001 From: Ken Sternberg Date: Wed, 15 May 2024 08:21:40 -0700 Subject: [PATCH] A few documentation changes. --- web/src/admin/admin-overview/AdminOverviewPage.ts | 1 + web/src/elements/cards/QuickActionsCard.ts | 12 ++++++------ .../cards/stories/AggregatePromiseCard.stories.ts | 10 ++++++---- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/web/src/admin/admin-overview/AdminOverviewPage.ts b/web/src/admin/admin-overview/AdminOverviewPage.ts index d524d71cae..38e0699359 100644 --- a/web/src/admin/admin-overview/AdminOverviewPage.ts +++ b/web/src/admin/admin-overview/AdminOverviewPage.ts @@ -86,6 +86,7 @@ export class AdminOverviewPage extends AKElement { render(): TemplateResult { const name = this.user?.user.name ?? this.user?.user.username; + return html` ${msg(str`Welcome, ${name}.`)} diff --git a/web/src/elements/cards/QuickActionsCard.ts b/web/src/elements/cards/QuickActionsCard.ts index 745e9f7594..4e8ec6e94f 100644 --- a/web/src/elements/cards/QuickActionsCard.ts +++ b/web/src/elements/cards/QuickActionsCard.ts @@ -4,6 +4,7 @@ import "@goauthentik/elements/cards/AggregateCard.js"; import { msg } from "@lit/localize"; import { html } from "lit"; import { customElement, property } from "lit/decorators.js"; +import { ifDefined } from "lit/directives/if-defined.js"; import { map } from "lit/directives/map.js"; 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 interface IQuickActionsCard { + title?: string; + actions: QuickAction[]; +} + /** * class QuickActionsCard * element ak-quick-actions-card * * Specialized card for navigation. */ - -export interface IQuickActionsCard { - title: string; - actions: QuickAction[]; -} - @customElement("ak-quick-actions-card") export class QuickActionsCard extends AKElement implements IQuickActionsCard { static get styles() { diff --git a/web/src/elements/cards/stories/AggregatePromiseCard.stories.ts b/web/src/elements/cards/stories/AggregatePromiseCard.stories.ts index 32dd0f0f0f..32e088c992 100644 --- a/web/src/elements/cards/stories/AggregatePromiseCard.stories.ts +++ b/web/src/elements/cards/stories/AggregatePromiseCard.stories.ts @@ -27,7 +27,7 @@ const metadata: Meta = { export default metadata; 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 = { args: { @@ -71,7 +71,9 @@ export const PromiseRejected: StoryObj = { leftJustified: false, failureMessage: undefined, }, - render: ({ icon, header, headerLink, subtext, leftJustified, failureMessage }: IAggregatePromiseCard) => { + render: ( + { icon, header, headerLink, subtext, leftJustified, failureMessage }: IAggregatePromiseCard, + ) => { const runThis = (timeout: number, value: string) => new Promise((_resolve, reject) => setTimeout(reject, timeout, value)); @@ -87,8 +89,8 @@ export const PromiseRejected: StoryObj = { header=${ifDefined(header)} headerLink=${ifDefined(headerLink)} subtext=${ifDefined(subtext)} -icon=${ifDefined(icon)} -failureMessage=${ifDefined(failureMessage)} + icon=${ifDefined(icon)} + failureMessage=${ifDefined(failureMessage)} ?left-justified=${leftJustified} .promise=${runThis(8000, text)} >