From 107e9e49dba1c33e59f82e424a1e2c36a7ef8cd8 Mon Sep 17 00:00:00 2001 From: nleanba <25827850+nleanba@users.noreply.github.com> Date: Sat, 4 Jan 2025 19:18:01 +0100 Subject: [PATCH] added icons to justification, improved details for AuthName --- src/components/Icons.ts | 36 ++----------------- src/components/SynoName.ts | 73 ++++++++++++++++++++++++++++---------- src/components/Timeline.ts | 5 +-- 3 files changed, 58 insertions(+), 56 deletions(-) diff --git a/src/components/Icons.ts b/src/components/Icons.ts index 0bd33e0..4c4e3d2 100644 --- a/src/components/Icons.ts +++ b/src/components/Icons.ts @@ -19,9 +19,9 @@ const icon = { // TODO vernacular: - '', + '', justification: - '', + '', def_dpr: ` @@ -87,35 +87,3 @@ export class Icon extends LitElement { }`; } } - -export const icons = { - def: - ``, - aug: - ``, - dpr: - ``, - cite: - ``, - unknown: - ``, - - col_aug: - ``, - col_dpr: - ``, - - link: - ``, - - expand: - ``, - collapse: - ``, - - east: - ``, - west: - ``, - empty: ``, -}; diff --git a/src/components/SynoName.ts b/src/components/SynoName.ts index bac97e8..cb62acf 100644 --- a/src/components/SynoName.ts +++ b/src/components/SynoName.ts @@ -27,6 +27,9 @@ export class SynoAuthName extends LitElement { @property({ attribute: false }) accessor authorizedName: AuthorizedName | null = null; + @state() + accessor open = false; + override render() { if (!this.synoGroup || !this.authorizedName) return nothing; @@ -56,25 +59,57 @@ export class SynoAuthName extends LitElement { authorities.delete(this.authorizedName.authority); return html` -

- ${this.authorizedName.displayName} - ${this.authorizedName.authority} - ${ - authorities.size > 0 - ? html`Authority also given as “${ - [...authorities].join("”, “") - }”` - : nothing - } - ${ +
{ + e.stopPropagation(); + this.open = !this.open; + }}> +

+ ${this.authorizedName.displayName} + ${this.authorizedName.authority} +

+ ${ + // authorities.size > 0 || + this.authorizedName.taxonConceptURIs.length > 0 + ? html`` + : nothing} +
+
+ ${ this.authorizedName.taxonConceptURIs.map((tc) => - html`${ - shortUrl(tc) - }` + html` + ` ) + }${ + authorities.size > 0 + ? html`
+ +
+ Authority also given as: “${[...authorities].join("”, “")}” +
+
` + : nothing } -

-
    + +
      ${ this.authorizedName.colURI ? html`` @@ -141,7 +176,9 @@ export class SynoName extends LitElement { + }}>
      @@ -195,7 +232,7 @@ export class SynoName extends LitElement {