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
9cea5f75
Commit
9cea5f75
authored
Jul 08, 2024
by
Timothy J. Baek
Browse files
refac: styling
parent
b8d153eb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
24 deletions
+21
-24
src/lib/components/chat/Chat.svelte
src/lib/components/chat/Chat.svelte
+3
-6
src/lib/components/chat/ChatControls.svelte
src/lib/components/chat/ChatControls.svelte
+13
-15
src/lib/components/chat/Controls/Controls.svelte
src/lib/components/chat/Controls/Controls.svelte
+1
-1
src/lib/components/chat/Messages/ResponseMessage.svelte
src/lib/components/chat/Messages/ResponseMessage.svelte
+4
-1
src/lib/components/layout/Navbar.svelte
src/lib/components/layout/Navbar.svelte
+0
-1
No files found.
src/lib/components/chat/Chat.svelte
View file @
9cea5f75
...
@@ -1460,11 +1460,9 @@
...
@@ -1460,11 +1460,9 @@
</div>
</div>
{/if}
{/if}
<div class="flex flex-col flex-auto z-10">
<div class="flex flex-col flex-auto z-10
{showControls ? 'lg:pr-[24rem]' : ''}
">
<div
<div
class=" pb-2.5 flex flex-col justify-between w-full flex-auto overflow-auto h-0 max-w-full z-10 scrollbar-hidden {showControls
class=" pb-2.5 flex flex-col justify-between w-full flex-auto overflow-auto h-0 max-w-full z-10 scrollbar-hidden"
? 'lg:pr-[28rem]'
: ''} "
id="messages-container"
id="messages-container"
bind:this={messagesContainerElement}
bind:this={messagesContainerElement}
on:scroll={(e) => {
on:scroll={(e) => {
...
@@ -1490,7 +1488,7 @@
...
@@ -1490,7 +1488,7 @@
</div>
</div>
</div>
</div>
<div class=
{showControls ? 'lg:pr-[28rem]' : ''}
>
<div class=
""
>
<MessageInput
<MessageInput
bind:files
bind:files
bind:prompt
bind:prompt
...
@@ -1513,7 +1511,6 @@
...
@@ -1513,7 +1511,6 @@
/>
/>
</div>
</div>
</div>
</div>
<ChatControls bind:show={showControls} />
<ChatControls bind:show={showControls} />
</div>
</div>
{/if}
{/if}
src/lib/components/chat/ChatControls.svelte
View file @
9cea5f75
...
@@ -31,23 +31,21 @@
...
@@ -31,23 +31,21 @@
</script>
</script>
{#if largeScreen}
{#if largeScreen}
<div
{#if show}
class="fixed h-screen max-h-[100dvh] min-h-screen z-50 top-0 right-0 {show
<div class=" absolute bottom-0 right-0 z-20 h-full pointer-events-none">
? 'w-[28rem]'
<div class="pr-4 pt-14 pb-8 w-[24rem] h-full" in:slide={{ duration: 200, axis: 'x' }}>
: 'w-0 translate-x-[28rem] '} transition"
<div
>
class="w-full h-full px-5 py-4 dark:bg-gray-850 border border-gray-100 dark:border-gray-800 rounded-xl shadow-lg z-50 pointer-events-auto"
<div class="px-6 pt-14 pb-8 h-full">
>
<div
<Controls
class=" px-5 py-4 h-full dark:bg-gray-850 border border-gray-100 dark:border-gray-800 rounded-xl shadow-lg"
on:close={() => {
>
show = false;
<Controls
}}
on:close={() => {
/>
show = false;
</div>
}}
/>
</div>
</div>
</div>
</div>
</div>
{/if}
{:else}
{:else}
<Modal bind:show>
<Modal bind:show>
<div class=" px-5 py-4 h-full">
<div class=" px-5 py-4 h-full">
...
...
src/lib/components/chat/Controls/Controls.svelte
View file @
9cea5f75
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<div class=" dark:text-white">
<div class=" dark:text-white">
<div class="mb-2 flex justify-between items-center">
<div class="mb-2 flex justify-between items-center">
<div class=" text-
x
l font-medium font-primary">Chat Controls</div>
<div class=" text-l
g
font-medium font-primary">Chat Controls</div>
<div>
<div>
<button
<button
...
...
src/lib/components/chat/Messages/ResponseMessage.svelte
View file @
9cea5f75
...
@@ -152,7 +152,10 @@
...
@@ -152,7 +152,10 @@
}
}
tooltipInstance = tippy(`#info-${message.id}`, {
tooltipInstance = tippy(`#info-${message.id}`, {
content: `<span class="text-xs" id="tooltip-${message.id}">${tooltipContent}</span>`,
content: `<span class="text-xs" id="tooltip-${message.id}">${tooltipContent}</span>`,
allowHTML: true
allowHTML: true,
theme: 'dark',
arrow: false,
offset: [0, 4]
});
});
}
}
};
};
...
...
src/lib/components/layout/Navbar.svelte
View file @
9cea5f75
...
@@ -107,7 +107,6 @@
...
@@ -107,7 +107,6 @@
<Tooltip content={$i18n.t('Controls')}>
<Tooltip content={$i18n.t('Controls')}>
<button
<button
id="new-chat-button"
class=" flex cursor-pointer px-2 py-2 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
class=" flex cursor-pointer px-2 py-2 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
on:click={() => {
on:click={() => {
showControls = !showControls;
showControls = !showControls;
...
...
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