Browse Source

聊天消息调整,首页样式微调

master
mk 6 months ago
parent
commit
c9fc181c4e
  1. 2
      .gitignore
  2. BIN
      backend/open_webui/static/splash.png
  3. 1
      src/lib/components/chat/Chat.svelte
  4. 4
      src/lib/components/chat/Header.svelte
  5. 8
      src/lib/components/chat/Messages.svelte
  6. BIN
      static/img/messages.png

2
.gitignore

@ -1,6 +1,6 @@
.DS_Store .DS_Store
node_modules node_modules
/build /build*
/.svelte-kit /.svelte-kit
/package /package
.env .env

BIN
backend/open_webui/static/splash.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

1
src/lib/components/chat/Chat.svelte

@ -1860,7 +1860,6 @@
</svelte:head> </svelte:head>
<audio id="audioElement" src="" style="display: none;" /> <audio id="audioElement" src="" style="display: none;" />
<EventConfirmDialog <EventConfirmDialog
bind:show={showEventConfirmation} bind:show={showEventConfirmation}
title={eventConfirmationTitle} title={eventConfirmationTitle}

4
src/lib/components/chat/Header.svelte

@ -142,8 +142,10 @@
background-size: 100% 100%; background-size: 100% 100%;
padding: 50px 70px 39px; padding: 50px 70px 39px;
box-sizing: border-box; box-sizing: border-box;
width: calc(100vw - 20px); width: calc(68vw - 20px);
margin: 0 auto; margin: 0 auto;
border-radius: 5px; border-radius: 5px;
position: relative;
bottom: 122px;
} }
</style> </style>

8
src/lib/components/chat/Messages.svelte

@ -24,7 +24,7 @@
const i18n = getContext('i18n'); const i18n = getContext('i18n');
export let className = 'h-full flex pt-8'; export let className = 'h-full flex pt-17';
export let chatId = ''; export let chatId = '';
export let user = $_user; export let user = $_user;
@ -344,8 +344,8 @@
} }
}; };
</script> </script>
<img src={'/img/messages.png'} style="position: absolute;top: 0;left:0;right:0;bottom:40%;z-index: 0;" alt="">
<div class={className}> <div class={className } >
{#if Object.keys(history?.messages ?? {}).length == 0} {#if Object.keys(history?.messages ?? {}).length == 0}
<ChatPlaceholder <ChatPlaceholder
modelIds={selectedModels} modelIds={selectedModels}
@ -379,7 +379,7 @@
}} }}
/> />
{:else} {:else}
<div class="w-full pt-2"> <div class="w-full pt-2" style="z-index: 2;">
{#key chatId} {#key chatId}
<div class="w-full"> <div class="w-full">
{#if messages.at(0)?.parentId !== null} {#if messages.at(0)?.parentId !== null}

BIN
static/img/messages.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 KiB

Loading…
Cancel
Save