feat: add forked

This commit is contained in:
kwaroran
2024-06-04 12:13:33 +09:00
parent ced1776c8c
commit a4ac170f5b
2 changed files with 24 additions and 11 deletions

View File

@@ -2,7 +2,7 @@
import { BookIcon, FlagIcon, ImageIcon, PaperclipIcon, SmileIcon, TrashIcon } from "lucide-svelte";
import { language } from "src/lang";
import { alertConfirm, alertInput, alertNormal } from "src/ts/alert";
import { hubURL, type hubType, downloadRisuHub } from "src/ts/characterCards";
import { hubURL, type hubType, downloadRisuHub, getRealmInfo } from "src/ts/characterCards";
import { parseMarkdownSafe } from "src/ts/parser";
import { DataBase } from "src/ts/storage/database";
import RealmLicense from "./RealmLicense.svelte";
@@ -24,6 +24,13 @@
{#if openedData.authorname}
<span class="text-borderc">Made by {openedData.authorname}</span>
{/if}
{#if openedData.original}
<button class="text-blue-400 text-start" on:click={() => {
const original = openedData.original
openedData = null
getRealmInfo(original)
}}>Forked</button>
{/if}
<div class="flex justify-start gap-4 mt-4">
<img class="h-36 w-36 rounded-md object-top object-cover" alt={openedData.name} src={`${hubURL}/resource/` + openedData.img}>
<MultiLangDisplay value={openedData.desc} markdown={true} />