Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
b263e24e
Commit
b263e24e
authored
May 15, 2024
by
Timothy J. Baek
Browse files
refac: styling
parent
290b4e56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
35 deletions
+45
-35
src/lib/components/chat/Messages/ResponseMessage.svelte
src/lib/components/chat/Messages/ResponseMessage.svelte
+23
-17
src/lib/components/chat/Messages/UserMessage.svelte
src/lib/components/chat/Messages/UserMessage.svelte
+22
-18
No files found.
src/lib/components/chat/Messages/ResponseMessage.svelte
View file @
b263e24e
...
...
@@ -494,47 +494,53 @@
class=" flex justify-start space-x-1 overflow-x-auto buttons text-gray-700 dark:text-gray-500"
>
{#if siblings.length > 1}
<div class="flex self-center
min-w-fit
">
<div class="flex self-center">
<button
class="self-center dark:hover:text-white hover:text-black transition"
class="self-center
p-1 hover:bg-black/5 dark:hover:bg-white/5
dark:hover:text-white hover:text-black
rounded-md
transition"
on:click={() => {
showPreviousMessage(message);
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
class="w-4 h-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2.5"
class="size-3.5"
>
<path
fill-rule="evenod
d"
d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z
"
clip-rule="evenodd
"
stroke-linecap="roun
d"
stroke-linejoin="round
"
d="M15.75 19.5 8.25 12l7.5-7.5
"
/>
</svg>
</button>
<div class="text-xs font-bold self-center min-w-fit dark:text-gray-100">
{siblings.indexOf(message.id) + 1} / {siblings.length}
<div
class="text-sm tracking-widest font-semibold self-center dark:text-gray-100"
>
{siblings.indexOf(message.id) + 1}/{siblings.length}
</div>
<button
class="self-center dark:hover:text-white hover:text-black transition"
class="self-center
p-1 hover:bg-black/5 dark:hover:bg-white/5
dark:hover:text-white hover:text-black
rounded-md
transition"
on:click={() => {
showNextMessage(message);
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
class="w-4 h-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2.5"
class="size-3.5"
>
<path
fill-rule="evenod
d"
d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z
"
clip-rule="evenodd
"
stroke-linecap="roun
d"
stroke-linejoin="round
"
d="m8.25 4.5 7.5 7.5-7.5 7.5
"
/>
</svg>
</button>
...
...
src/lib/components/chat/Messages/UserMessage.svelte
View file @
b263e24e
...
...
@@ -60,9 +60,9 @@
class="prose chat-{message.role} w-full max-w-full flex flex-col justify-end dark:prose-invert prose-headings:my-0 prose-p:my-0 prose-p:-mb-4 prose-pre:my-0 prose-table:my-0 prose-blockquote:my-0 prose-img:my-0 prose-ul:-my-4 prose-ol:-my-4 prose-li:-my-3 prose-ul:-mb-6 prose-ol:-mb-6 prose-li:-mb-4 whitespace-pre-line"
>
{#if message.files}
<div class="mt-2.5 mb-1 w-full flex justify-end overflow-x-auto gap-
2
flex-wrap">
<div class="mt-2.5 mb-1 w-full flex
flex-col
justify-end overflow-x-auto gap-
1.5
flex-wrap">
{#each message.files as file}
<div>
<div
class="self-end"
>
{#if file.type === 'image'}
<img src={file.url} alt="input" class=" max-h-96 rounded-lg" draggable="false" />
{:else if file.type === 'doc'}
...
...
@@ -274,45 +274,49 @@
{#if siblings.length > 1}
<div class="flex self-center">
<button
class="self-center dark:hover:text-white hover:text-black transition"
class="self-center
p-1 hover:bg-black/5 dark:hover:bg-white/5
dark:hover:text-white hover:text-black
rounded-md
transition"
on:click={() => {
showPreviousMessage(message);
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
class="w-4 h-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2.5"
class="size-3.5"
>
<path
fill-rule="evenod
d"
d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z
"
clip-rule="evenodd
"
stroke-linecap="roun
d"
stroke-linejoin="round
"
d="M15.75 19.5 8.25 12l7.5-7.5
"
/>
</svg>
</button>
<div class="text-
x
s font-bold self-center dark:text-gray-100">
{siblings.indexOf(message.id) + 1}
/
{siblings.length}
<div class="text-s
m tracking-widest
font-
semi
bold self-center dark:text-gray-100">
{siblings.indexOf(message.id) + 1}
/
{siblings.length}
</div>
<button
class="self-center dark:hover:text-white hover:text-black transition"
class="self-center
p-1 hover:bg-black/5 dark:hover:bg-white/5
dark:hover:text-white hover:text-black
rounded-md
transition"
on:click={() => {
showNextMessage(message);
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
class="w-4 h-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2.5"
class="size-3.5"
>
<path
fill-rule="evenod
d"
d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z
"
clip-rule="evenodd
"
stroke-linecap="roun
d"
stroke-linejoin="round
"
d="m8.25 4.5 7.5 7.5-7.5 7.5
"
/>
</svg>
</button>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment