Fix conditional statements in Chat.svelte, DefaultChatScreen.svelte, SideChatList.svelte, and Sidebar.svelte
This commit is contained in:
@@ -131,7 +131,7 @@
|
|||||||
<div class="flex max-w-full justify-center risu-chat" style={isLastMemory ? `border-top:${$DataBase.memoryLimitThickness}px solid rgba(98, 114, 164, 0.7);` : ''}>
|
<div class="flex max-w-full justify-center risu-chat" style={isLastMemory ? `border-top:${$DataBase.memoryLimitThickness}px solid rgba(98, 114, 164, 0.7);` : ''}>
|
||||||
<div class="text-textcolor mt-1 ml-4 mr-4 mb-1 p-2 bg-transparent flex-grow border-t-gray-900 border-opacity-30 border-transparent flexium items-start max-w-full" >
|
<div class="text-textcolor mt-1 ml-4 mr-4 mb-1 p-2 bg-transparent flex-grow border-t-gray-900 border-opacity-30 border-transparent flexium items-start max-w-full" >
|
||||||
{#if !blankMessage}
|
{#if !blankMessage}
|
||||||
{#if $CurrentCharacter.chaId === "§playground"}
|
{#if $CurrentCharacter?.chaId === "§playground"}
|
||||||
<div class="shadow-lg border-textcolor2 border mt-2 flex justify-center items-center text-textcolor2" style={`height:${$DataBase.iconsize * 3.5 / 100}rem;width:${$DataBase.iconsize * 3.5 / 100}rem;min-width:${$DataBase.iconsize * 3.5 / 100}rem`}
|
<div class="shadow-lg border-textcolor2 border mt-2 flex justify-center items-center text-textcolor2" style={`height:${$DataBase.iconsize * 3.5 / 100}rem;width:${$DataBase.iconsize * 3.5 / 100}rem;min-width:${$DataBase.iconsize * 3.5 / 100}rem`}
|
||||||
class:rounded-md={!$DataBase.roundIcons} class:rounded-full={$DataBase.roundIcons}>
|
class:rounded-md={!$DataBase.roundIcons} class:rounded-full={$DataBase.roundIcons}>
|
||||||
{#if name === 'assistant'}
|
{#if name === 'assistant'}
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<span class="flex flex-col ml-4 w-full max-w-full min-w-0">
|
<span class="flex flex-col ml-4 w-full max-w-full min-w-0">
|
||||||
<div class="flexium items-center chat">
|
<div class="flexium items-center chat">
|
||||||
{#if $CurrentCharacter.chaId === "§playground" && !blankMessage}
|
{#if $CurrentCharacter?.chaId === "§playground" && !blankMessage}
|
||||||
<span class="chat text-xl border-darkborderc flex items-center">
|
<span class="chat text-xl border-darkborderc flex items-center">
|
||||||
<span>{name === 'assistant' ? 'Assistant' : 'User'}</span>
|
<span>{name === 'assistant' ? 'Assistant' : 'User'}</span>
|
||||||
<button class="ml-2 text-textcolor2 hover:text-textcolor" on:click={() => {
|
<button class="ml-2 text-textcolor2 hover:text-textcolor" on:click={() => {
|
||||||
|
|||||||
@@ -451,7 +451,7 @@
|
|||||||
class="mr-2 bg-textcolor2 flex justify-center items-center text-gray-100 w-12 h-12 rounded-md hover:bg-green-500 transition-colors"><Send />
|
class="mr-2 bg-textcolor2 flex justify-center items-center text-gray-100 w-12 h-12 rounded-md hover:bg-green-500 transition-colors"><Send />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if $CurrentCharacter.chaId !== '§playground'}
|
{#if $CurrentCharacter?.chaId !== '§playground'}
|
||||||
<div on:click={(e) => {
|
<div on:click={(e) => {
|
||||||
openMenu = !openMenu
|
openMenu = !openMenu
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
@@ -470,7 +470,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if $DataBase.useAutoTranslateInput && !$DataBase.useAdvancedEditor && $CurrentCharacter.chaId !== '§playground'}
|
{#if $DataBase.useAutoTranslateInput && !$DataBase.useAdvancedEditor && $CurrentCharacter?.chaId !== '§playground'}
|
||||||
<div class="flex items-center mt-2 mb-2">
|
<div class="flex items-center mt-2 mb-2">
|
||||||
<label for='messageInputTranslate' class="text-textcolor ml-4">
|
<label for='messageInputTranslate' class="text-textcolor ml-4">
|
||||||
<LanguagesIcon />
|
<LanguagesIcon />
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if $CurrentCharacter.chaId !== '§playground'}
|
{#if $CurrentCharacter?.chaId !== '§playground'}
|
||||||
<div class="flex mt-2 items-center">
|
<div class="flex mt-2 items-center">
|
||||||
<CheckInput bind:check={$DataBase.jailbreakToggle} name={language.jailbreakToggle}/>
|
<CheckInput bind:check={$DataBase.jailbreakToggle} name={language.jailbreakToggle}/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -655,7 +655,7 @@
|
|||||||
<h1 class="text-xl">Welcome to RisuAI!</h1>
|
<h1 class="text-xl">Welcome to RisuAI!</h1>
|
||||||
<span class="text-xs text-textcolor2">Select a bot to start chating</span>
|
<span class="text-xs text-textcolor2">Select a bot to start chating</span>
|
||||||
</div>
|
</div>
|
||||||
{:else if $CurrentCharacter.chaId === '§playground'}
|
{:else if $CurrentCharacter?.chaId === '§playground'}
|
||||||
<SideChatList bind:chara={ $CurrentCharacter} />
|
<SideChatList bind:chara={ $CurrentCharacter} />
|
||||||
{:else}
|
{:else}
|
||||||
<div class="w-full h-8 min-h-8 border-l border-b border-r border-selected relative bottom-6 rounded-b-md flex">
|
<div class="w-full h-8 min-h-8 border-l border-b border-r border-selected relative bottom-6 rounded-b-md flex">
|
||||||
|
|||||||
Reference in New Issue
Block a user