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
619e5d5b
Unverified
Commit
619e5d5b
authored
Feb 04, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Feb 04, 2024
Browse files
Merge pull request #646 from ollama-webui/fix
fix: documents tags
parents
bd0a75a8
71387777
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
24 deletions
+26
-24
src/routes/(app)/documents/+page.svelte
src/routes/(app)/documents/+page.svelte
+26
-24
No files found.
src/routes/(app)/documents/+page.svelte
View file @
619e5d5b
...
@@ -247,38 +247,38 @@
...
@@ -247,38 +247,38 @@
</div>
</div>
</div> -->
</div> -->
{#each $documents.filter((doc) => (selectedTag === '' || (doc?.content?.tags ?? [])
<hr class=" dark:border-gray-700 my-2.5" />
.map((tag) => tag.name)
.includes(selectedTag)) && (query === '' || doc.name.includes(query))) as doc}
<hr class=" dark:border-gray-700 my-2.5" />
{#if tags.length > 0}
{#if tags.length > 0}
<div class="px-2.5 mt-0.5 mb-2 flex gap-1 flex-wrap">
<div class="px-2.5 mt-0.5 mb-2 flex gap-1 flex-wrap">
<button
class="px-2 py-0.5 space-x-1 flex h-fit items-center rounded-full transition border dark:border-gray-600 dark:text-white"
on:click={async () => {
selectedTag = '';
// await chats.set(await getChatListByTagName(localStorage.token, tag.name));
}}
>
<div class=" text-xs font-medium self-center line-clamp-1">all</div>
</button>
{#each tags as tag}
<button
<button
class="px-2 py-0.5 space-x-1 flex h-fit items-center rounded-full transition border dark:border-gray-600 dark:text-white"
class="px-2 py-0.5 space-x-1 flex h-fit items-center rounded-full transition border dark:border-gray-600 dark:text-white"
on:click={async () => {
on:click={async () => {
selectedTag =
''
;
selectedTag =
tag
;
// await chats.set(await getChatListByTagName(localStorage.token, tag.name));
// await chats.set(await getChatListByTagName(localStorage.token, tag.name));
}}
}}
>
>
<div class=" text-xs font-medium self-center line-clamp-1">all</div>
<div class=" text-xs font-medium self-center line-clamp-1">
#{tag}
</div>
</button>
</button>
{#each tags as tag}
{/each}
<button
</div>
class="px-2 py-0.5 space-x-1 flex h-fit items-center rounded-full transition border dark:border-gray-600 dark:text-white"
{/if}
on:click={async () => {
selectedTag = tag;
// await chats.set(await getChatListByTagName(localStorage.token, tag.name));
}}
>
<div class=" text-xs font-medium self-center line-clamp-1">
#{tag}
</div>
</button>
{/each}
</div>
{/if}
{#each $documents.filter((doc) => (selectedTag === '' || (doc?.content?.tags ?? [])
.map((tag) => tag.name)
.includes(selectedTag)) && (query === '' || doc.name.includes(query))) as doc}
<div class=" flex space-x-4 cursor-pointer w-full mt-3 mb-3">
<div class=" flex space-x-4 cursor-pointer w-full mt-3 mb-3">
<div class=" flex flex-1 space-x-4 cursor-pointer w-full">
<div class=" flex flex-1 space-x-4 cursor-pointer w-full">
<div class=" flex items-center space-x-3">
<div class=" flex items-center space-x-3">
...
@@ -419,7 +419,9 @@
...
@@ -419,7 +419,9 @@
</div>
</div>
{/each}
{/each}
<hr class=" dark:border-gray-700 my-2.5" />
{#if $documents.length > 0}
<hr class=" dark:border-gray-700 my-2.5" />
{/if}
<div class=" flex justify-between w-full mb-3">
<div class=" flex justify-between w-full mb-3">
<div class="flex space-x-2">
<div class="flex space-x-2">
...
...
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