refac
This commit is contained in:
1 parent
1111a3a222
commit
1457f2dec8
4 files changed
+11
-10
No files matched your search
@@ -3178,9 +3178,7 @@
|
||||
|
||||
{#if readOnly}
|
||||
<div class="pb-6 z-10">
|
||||
<div
|
||||
class="text-xs text-gray-400 dark:text-gray-500 text-center"
|
||||
>
|
||||
<div class="text-xs text-gray-400 dark:text-gray-500 text-center">
|
||||
{$i18n.t('Read only')}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -123,7 +123,11 @@
|
||||
"
|
||||
>
|
||||
{#if showModelSelector}
|
||||
<ModelSelector bind:selectedModels showSetDefault={!shareEnabled && !readOnly} disabled={readOnly} />
|
||||
<ModelSelector
|
||||
bind:selectedModels
|
||||
showSetDefault={!shareEnabled && !readOnly}
|
||||
disabled={readOnly}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
let orderBy = 'updated_at';
|
||||
let direction = 'desc'; // 'asc' or 'desc'
|
||||
|
||||
|
||||
$: if (chats) {
|
||||
init();
|
||||
}
|
||||
|
||||
@@ -38,18 +38,18 @@
|
||||
if (folder && folder.id) {
|
||||
// Always use the shared folder endpoint so owners also see
|
||||
// chats created by users who have write access to this folder.
|
||||
const res = await getSharedFolderChats(localStorage.token, folder.id).catch(
|
||||
(error) => {
|
||||
const res = await getSharedFolderChats(localStorage.token, folder.id).catch((error) => {
|
||||
console.error(error);
|
||||
return null;
|
||||
}
|
||||
);
|
||||
});
|
||||
if (res && res.chats) {
|
||||
chats = res.chats;
|
||||
allChatsLoaded = true;
|
||||
} else {
|
||||
// Fallback to regular API (e.g. if user has no shared access)
|
||||
const fallback = await getChatListByFolderId(localStorage.token, folder.id, page).catch(() => []);
|
||||
const fallback = await getChatListByFolderId(localStorage.token, folder.id, page).catch(
|
||||
() => []
|
||||
);
|
||||
chats = fallback || [];
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user