mirror of
https://github.com/open-webui/open-webui
synced 2024-11-25 13:29:53 +00:00
refac: styling
This commit is contained in:
parent
290b4e56c8
commit
b263e24e56
@ -494,47 +494,53 @@
|
|||||||
class=" flex justify-start space-x-1 overflow-x-auto buttons text-gray-700 dark:text-gray-500"
|
class=" flex justify-start space-x-1 overflow-x-auto buttons text-gray-700 dark:text-gray-500"
|
||||||
>
|
>
|
||||||
{#if siblings.length > 1}
|
{#if siblings.length > 1}
|
||||||
<div class="flex self-center min-w-fit">
|
<div class="flex self-center">
|
||||||
<button
|
<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={() => {
|
on:click={() => {
|
||||||
showPreviousMessage(message);
|
showPreviousMessage(message);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 20 20"
|
fill="none"
|
||||||
fill="currentColor"
|
viewBox="0 0 24 24"
|
||||||
class="w-4 h-4"
|
stroke="currentColor"
|
||||||
|
stroke-width="2.5"
|
||||||
|
class="size-3.5"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
fill-rule="evenodd"
|
stroke-linecap="round"
|
||||||
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"
|
stroke-linejoin="round"
|
||||||
clip-rule="evenodd"
|
d="M15.75 19.5 8.25 12l7.5-7.5"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="text-xs font-bold self-center min-w-fit dark:text-gray-100">
|
<div
|
||||||
{siblings.indexOf(message.id) + 1} / {siblings.length}
|
class="text-sm tracking-widest font-semibold self-center dark:text-gray-100"
|
||||||
|
>
|
||||||
|
{siblings.indexOf(message.id) + 1}/{siblings.length}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<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={() => {
|
on:click={() => {
|
||||||
showNextMessage(message);
|
showNextMessage(message);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 20 20"
|
fill="none"
|
||||||
fill="currentColor"
|
viewBox="0 0 24 24"
|
||||||
class="w-4 h-4"
|
stroke="currentColor"
|
||||||
|
stroke-width="2.5"
|
||||||
|
class="size-3.5"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
fill-rule="evenodd"
|
stroke-linecap="round"
|
||||||
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"
|
stroke-linejoin="round"
|
||||||
clip-rule="evenodd"
|
d="m8.25 4.5 7.5 7.5-7.5 7.5"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
@ -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"
|
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}
|
{#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}
|
{#each message.files as file}
|
||||||
<div>
|
<div class="self-end">
|
||||||
{#if file.type === 'image'}
|
{#if file.type === 'image'}
|
||||||
<img src={file.url} alt="input" class=" max-h-96 rounded-lg" draggable="false" />
|
<img src={file.url} alt="input" class=" max-h-96 rounded-lg" draggable="false" />
|
||||||
{:else if file.type === 'doc'}
|
{:else if file.type === 'doc'}
|
||||||
@ -274,45 +274,49 @@
|
|||||||
{#if siblings.length > 1}
|
{#if siblings.length > 1}
|
||||||
<div class="flex self-center">
|
<div class="flex self-center">
|
||||||
<button
|
<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={() => {
|
on:click={() => {
|
||||||
showPreviousMessage(message);
|
showPreviousMessage(message);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 20 20"
|
fill="none"
|
||||||
fill="currentColor"
|
viewBox="0 0 24 24"
|
||||||
class="w-4 h-4"
|
stroke="currentColor"
|
||||||
|
stroke-width="2.5"
|
||||||
|
class="size-3.5"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
fill-rule="evenodd"
|
stroke-linecap="round"
|
||||||
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"
|
stroke-linejoin="round"
|
||||||
clip-rule="evenodd"
|
d="M15.75 19.5 8.25 12l7.5-7.5"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="text-xs font-bold self-center dark:text-gray-100">
|
<div class="text-sm tracking-widest font-semibold self-center dark:text-gray-100">
|
||||||
{siblings.indexOf(message.id) + 1} / {siblings.length}
|
{siblings.indexOf(message.id) + 1}/{siblings.length}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<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={() => {
|
on:click={() => {
|
||||||
showNextMessage(message);
|
showNextMessage(message);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 20 20"
|
fill="none"
|
||||||
fill="currentColor"
|
viewBox="0 0 24 24"
|
||||||
class="w-4 h-4"
|
stroke="currentColor"
|
||||||
|
stroke-width="2.5"
|
||||||
|
class="size-3.5"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
fill-rule="evenodd"
|
stroke-linecap="round"
|
||||||
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"
|
stroke-linejoin="round"
|
||||||
clip-rule="evenodd"
|
d="m8.25 4.5 7.5 7.5-7.5 7.5"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user