From a61bf24e369ef551caaf5a5a240623b8f7753d93 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Mon, 5 Jun 2023 08:40:47 +0900 Subject: [PATCH] [feat] tag visible in realm --- src/lib/UI/Hub.svelte | 21 ++++++++++++++++----- src/ts/parser.ts | 12 ++++++++++++ 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/lib/UI/Hub.svelte b/src/lib/UI/Hub.svelte index a14af35b..20568073 100644 --- a/src/lib/UI/Hub.svelte +++ b/src/lib/UI/Hub.svelte @@ -2,13 +2,15 @@ import { downloadRisuHub, getRisuHub, hubURL } from "src/ts/characterCards"; import { ArrowLeft, ArrowRight, DownloadIcon, FlagIcon, MenuIcon, SearchIcon, XIcon } from "lucide-svelte"; import { alertConfirm, alertInput, alertNormal } from "src/ts/alert"; + import { parseMarkdownSafe } from "src/ts/parser"; let openedData:null|{ name:string desc: string download: number, id: string, - img: string + img: string, + tags: string[] } = null let charas:{ @@ -107,12 +109,21 @@ openedData = null }}>
-
-
+
+

{openedData.name}

+
{openedData.name} -

{openedData.name}

+ + {#await parseMarkdownSafe(openedData.desc) then msg} + {@html msg} + {/await} + +
+
+ {#each openedData.tags as tag, i} +
{tag}
+ {/each}
- {openedData.desc}