mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-03 18:17:56 -05:00
refac
This commit is contained in:
1 parent
072d0b51d6
commit
6122544801
2 files changed
+4
-5
No files matched your search
@@ -91,9 +91,10 @@
|
||||
? $i18n.t('View source: {{title}}', { title: label })
|
||||
: `${getDisplayTitle(label)} +${sources.length - 1} more sources`}
|
||||
class="text-[0.625rem] w-fit translate-y-[2px] px-2 py-0.5 dark:bg-base-0/5 dark:text-base-0/80 dark:hover:text-base-0 bg-base-50 text-base-1000/80 hover:text-base-1000 transition rounded-xl"
|
||||
on:click={() => {
|
||||
if (sources.length === 1) {
|
||||
openSource(sources[0].id);
|
||||
on:click={(e) => {
|
||||
// From the keyboard, the marker opens the source its card shows.
|
||||
if (sources.length === 1 || (openPreview && e.detail === 0)) {
|
||||
openSource(sources[sourceIdx].id);
|
||||
} else {
|
||||
openPreview = !openPreview;
|
||||
}
|
||||
|
||||
@@ -40,9 +40,7 @@
|
||||
import Folder from '../icons/Folder.svelte';
|
||||
let showModal = false;
|
||||
|
||||
// The composer asks for the modal instead, as it holds the attachment's retrieval setting.
|
||||
const canOpenKnowledge = () =>
|
||||
!modal &&
|
||||
item?.type === 'collection' &&
|
||||
!!item.id &&
|
||||
!!appLayout?.openPageTab &&
|
||||
|
||||
Reference in new issue
Block a user