From 350fb06d36e3f9e2fc665b8b877bc66632a4cc46 Mon Sep 17 00:00:00 2001 From: sua yoo Date: Mon, 1 Jul 2024 20:57:48 -0700 Subject: [PATCH] update layout --- frontend/src/components/orgs-list.ts | 14 ++++++++++---- frontend/src/pages/home.ts | 6 +++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/orgs-list.ts b/frontend/src/components/orgs-list.ts index de8413de..1c791ced 100644 --- a/frontend/src/components/orgs-list.ts +++ b/frontend/src/components/orgs-list.ts @@ -1,5 +1,9 @@ import { localized, msg, str } from "@lit/localize"; -import type { SlChangeEvent, SlInput } from "@shoelace-style/shoelace"; +import type { + SlChangeEvent, + SlInput, + SlMenuItem, +} from "@shoelace-style/shoelace"; import { css, html, nothing } from "lit"; import { customElement, property, query, state } from "lit/decorators.js"; import { when } from "lit/directives/when.js"; @@ -20,7 +24,7 @@ import type { OrgData } from "@/utils/orgs"; export class OrgsList extends TailwindElement { static styles = css` btrix-table { - grid-template-columns: min-content [clickable-start] auto auto auto [clickable-end] min-content; + grid-template-columns: min-content [clickable-start] 50ch auto auto [clickable-end] min-content; } `; @property({ type: Object }) @@ -292,7 +296,7 @@ export class OrgsList extends TailwindElement { ` : html` - + @@ -337,10 +341,12 @@ export class OrgsList extends TailwindElement { { + @click=${(e: MouseEvent) => { + if ((e.target as SlMenuItem).disabled) return; this.currOrg = org; void this.orgDeleteDialog?.show(); }} + disabled > ${msg("Delete Org")} diff --git a/frontend/src/pages/home.ts b/frontend/src/pages/home.ts index a20dadd5..7821ff08 100644 --- a/frontend/src/pages/home.ts +++ b/frontend/src/pages/home.ts @@ -138,8 +138,8 @@ export class Home extends LiteElement { -
-
+
+
-
+

${msg("Invite User to Org")}