refac: call overlay styling

This commit is contained in:
Timothy J. Baek
2024-08-23 16:42:36 +02:00
parent 4519ddd0e9
commit 48503573c1
5 changed files with 336 additions and 319 deletions
+22 -24
View File
@@ -1634,6 +1634,25 @@
<audio id="audioElement" src="" style="display: none;" />
<ChatControls
models={selectedModelIds.reduce((a, e, i, arr) => {
const model = $models.find((m) => m.id === e);
if (model) {
return [...a, model];
}
return a;
}, [])}
bind:show={showControls}
bind:chatFiles
bind:params
bind:files
{submitPrompt}
{stopResponse}
modelId={selectedModelIds?.at(0) ?? null}
chatId={$chatId}
{eventTarget}
/>
<EventConfirmDialog
bind:show={showEventConfirmation}
title={eventConfirmationTitle}
@@ -1653,17 +1672,6 @@
}}
/>
{#if $showCallOverlay}
<CallOverlay
{submitPrompt}
{stopResponse}
bind:files
modelId={selectedModelIds?.at(0) ?? null}
chatId={$chatId}
{eventTarget}
/>
{/if}
{#if !chatIdProp || (loaded && chatIdProp)}
<div
class="h-screen max-h-[100dvh] {$showSidebar
@@ -1774,21 +1782,11 @@
{messages}
{submitPrompt}
{stopResponse}
on:call={() => {
showControls = true;
}}
/>
</div>
</div>
<ChatControls
models={selectedModelIds.reduce((a, e, i, arr) => {
const model = $models.find((m) => m.id === e);
if (model) {
return [...a, model];
}
return a;
}, [])}
bind:show={showControls}
bind:chatFiles
bind:params
/>
</div>
{/if}