[feat] added additional assets
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import AutoresizeArea from "./AutoresizeArea.svelte";
|
||||
import { alertConfirm } from "../../ts/alert";
|
||||
import { language } from "../../lang";
|
||||
import { DataBase } from "../../ts/database";
|
||||
import { DataBase, type character, type groupChat } from "../../ts/database";
|
||||
import { selectedCharID } from "../../ts/stores";
|
||||
import { translate } from "../../ts/translator/translator";
|
||||
import { replacePlaceholders } from "../../ts/util";
|
||||
@@ -16,6 +16,7 @@
|
||||
export let rerollIcon = false
|
||||
export let onReroll = () => {}
|
||||
export let unReroll = () => {}
|
||||
export let character:character|groupChat|null = null
|
||||
let translating = false
|
||||
let editMode = false
|
||||
export let altGreeting = false
|
||||
@@ -127,10 +128,12 @@
|
||||
{#if editMode}
|
||||
<AutoresizeArea bind:value={message} />
|
||||
{:else}
|
||||
<span class="text chat chattext prose prose-invert"
|
||||
style:font-size="{0.875 * ($DataBase.zoomsize / 100)}rem"
|
||||
style:line-height="{1.25 * ($DataBase.zoomsize / 100)}rem"
|
||||
>{@html ParseMarkdown(msgDisplay)}</span>
|
||||
{#await ParseMarkdown(msgDisplay, character) then md}
|
||||
<span class="text chat chattext prose prose-invert"
|
||||
style:font-size="{0.875 * ($DataBase.zoomsize / 100)}rem"
|
||||
style:line-height="{1.25 * ($DataBase.zoomsize / 100)}rem"
|
||||
>{@html md}</span>
|
||||
{/await}
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
|
||||
@@ -6,14 +6,16 @@
|
||||
</button>
|
||||
</h1>
|
||||
<div class="ml-2 max-w-full break-words text chat chattext prose prose-invert">
|
||||
{@html ParseMarkdown(quote)}
|
||||
{#await ParseMarkdown(quote) then md}
|
||||
{@html md}
|
||||
{/await}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script lang="ts">
|
||||
import { XIcon } from "lucide-svelte";
|
||||
import { language } from "src/lang";
|
||||
import { ParseMarkdown } from "src/ts/parser";
|
||||
import { language } from "src/lang";
|
||||
import { ParseMarkdown } from "src/ts/parser";
|
||||
|
||||
export let onRemove: () => void
|
||||
export let quote:string
|
||||
|
||||
@@ -247,6 +247,7 @@
|
||||
onReroll={reroll}
|
||||
unReroll={unReroll}
|
||||
isLastMemory={$DataBase.characters[$selectedCharID].chats[$DataBase.characters[$selectedCharID].chatPage].lastMemory === (chat.chatId ?? 'none') && $DataBase.showMemoryLimit}
|
||||
character={$DataBase.characters[$selectedCharID]}
|
||||
/>
|
||||
{:else}
|
||||
<Chat
|
||||
@@ -258,10 +259,12 @@
|
||||
unReroll={unReroll}
|
||||
img={getCharImage(findCharacterbyId(chat.saying).image, 'css')}
|
||||
isLastMemory={$DataBase.characters[$selectedCharID].chats[$DataBase.characters[$selectedCharID].chatPage].lastMemory === (chat.chatId ?? 'none') && $DataBase.showMemoryLimit}
|
||||
character={findCharacterbyId(chat.saying)}
|
||||
/>
|
||||
{/if}
|
||||
{:else}
|
||||
<Chat
|
||||
character={$DataBase.characters[$selectedCharID]}
|
||||
idx={chat.index}
|
||||
name={$DataBase.username}
|
||||
message={chat.data}
|
||||
@@ -273,6 +276,7 @@
|
||||
{#if $DataBase.characters[$selectedCharID].chats[$DataBase.characters[$selectedCharID].chatPage].message.length <= loadPages}
|
||||
{#if $DataBase.characters[$selectedCharID].type !== 'group'}
|
||||
<Chat
|
||||
character={$DataBase.characters[$selectedCharID]}
|
||||
name={$DataBase.characters[$selectedCharID].name}
|
||||
message={$DataBase.characters[$selectedCharID].firstMsgIndex === -1 ? $DataBase.characters[$selectedCharID].firstMessage :
|
||||
$DataBase.characters[$selectedCharID].alternateGreetings[$DataBase.characters[$selectedCharID].firstMsgIndex]}
|
||||
|
||||
Reference in New Issue
Block a user