refac: landing page styling

This commit is contained in:
Timothy J. Baek 2024-10-08 13:45:34 -07:00
parent 0feaf6f649
commit 07a556df55
2 changed files with 38 additions and 36 deletions

View File

@ -2173,42 +2173,44 @@
</div> </div>
</div> </div>
{:else} {:else}
<Placeholder <div class="overflow-auto w-full h-full flex items-center">
{history} <Placeholder
{selectedModels} {history}
bind:files {selectedModels}
bind:prompt bind:files
bind:autoScroll bind:prompt
bind:selectedToolIds bind:autoScroll
bind:webSearchEnabled bind:selectedToolIds
bind:atSelectedModel bind:webSearchEnabled
availableToolIds={selectedModelIds.reduce((a, e, i, arr) => { bind:atSelectedModel
const model = $models.find((m) => m.id === e); availableToolIds={selectedModelIds.reduce((a, e, i, arr) => {
if (model?.info?.meta?.toolIds ?? false) { const model = $models.find((m) => m.id === e);
return [...new Set([...a, ...model.info.meta.toolIds])]; if (model?.info?.meta?.toolIds ?? false) {
} return [...new Set([...a, ...model.info.meta.toolIds])];
return a; }
}, [])} return a;
transparentBackground={$settings?.backgroundImageUrl ?? false} }, [])}
{stopResponse} transparentBackground={$settings?.backgroundImageUrl ?? false}
{createMessagePair} {stopResponse}
on:upload={async (e) => { {createMessagePair}
const { type, data } = e.detail; on:upload={async (e) => {
const { type, data } = e.detail;
if (type === 'web') { if (type === 'web') {
await uploadWeb(data); await uploadWeb(data);
} else if (type === 'youtube') { } else if (type === 'youtube') {
await uploadYoutubeTranscription(data); await uploadYoutubeTranscription(data);
} }
}} }}
on:submit={async (e) => { on:submit={async (e) => {
if (e.detail) { if (e.detail) {
prompt = ''; prompt = '';
await tick(); await tick();
submitPrompt(e.detail); submitPrompt(e.detail);
} }
}} }}
/> />
</div>
{/if} {/if}
</div> </div>
</Pane> </Pane>

View File

@ -89,7 +89,7 @@
</script> </script>
{#key mounted} {#key mounted}
<div class="m-auto w-full max-w-6xl px-2 xl:px-20 translate-y-6 text-center"> <div class="m-auto w-full max-w-6xl px-2 xl:px-20 translate-y-6 py-24 text-center">
{#if $temporaryChatEnabled} {#if $temporaryChatEnabled}
<Tooltip <Tooltip
content="This chat won't appear in history and your messages will not be saved." content="This chat won't appear in history and your messages will not be saved."