refac
This commit is contained in:
@@ -71,7 +71,6 @@
|
||||
return 0;
|
||||
});
|
||||
|
||||
|
||||
let defaultPermissions = {};
|
||||
|
||||
let showAddGroupModal = false;
|
||||
|
||||
@@ -159,7 +159,11 @@
|
||||
})
|
||||
).filter((item) => !(item.model?.info?.meta?.hidden ?? false));
|
||||
|
||||
$: if (selectedTag !== undefined || selectedConnectionType !== undefined || searchValue !== undefined) {
|
||||
$: if (
|
||||
selectedTag !== undefined ||
|
||||
selectedConnectionType !== undefined ||
|
||||
searchValue !== undefined
|
||||
) {
|
||||
resetView();
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,9 @@
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
||||
<Tooltip content={(connection?.config?.enable ?? true) ? $i18n.t('Enabled') : $i18n.t('Disabled')}>
|
||||
<Tooltip
|
||||
content={(connection?.config?.enable ?? true) ? $i18n.t('Enabled') : $i18n.t('Disabled')}
|
||||
>
|
||||
<Switch
|
||||
state={connection?.config?.enable ?? true}
|
||||
on:change={() => {
|
||||
|
||||
@@ -31,7 +31,13 @@
|
||||
|
||||
import { goto } from '$app/navigation';
|
||||
import { WEBUI_NAME, config, user } from '$lib/stores';
|
||||
import { createNewNote, deleteNoteById, getNoteById, getNoteList, searchNotes } from '$lib/apis/notes';
|
||||
import {
|
||||
createNewNote,
|
||||
deleteNoteById,
|
||||
getNoteById,
|
||||
getNoteList,
|
||||
searchNotes
|
||||
} from '$lib/apis/notes';
|
||||
import { capitalizeFirstLetter, copyToClipboard, getTimeRange } from '$lib/utils';
|
||||
import { downloadPdf, createNoteHandler } from './utils';
|
||||
|
||||
|
||||
@@ -399,7 +399,6 @@
|
||||
<div class="text-xs overflow-hidden text-ellipsis line-clamp-1 text-gray-500">
|
||||
/{prompt.command}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{#if !prompt.write_access}
|
||||
<Badge type="muted" content={$i18n.t('Read Only')} />
|
||||
@@ -488,7 +487,9 @@
|
||||
</PromptMenu>
|
||||
|
||||
<button on:click|stopPropagation|preventDefault>
|
||||
<Tooltip content={prompt.is_active !== false ? $i18n.t('Enabled') : $i18n.t('Disabled')}>
|
||||
<Tooltip
|
||||
content={prompt.is_active !== false ? $i18n.t('Enabled') : $i18n.t('Disabled')}
|
||||
>
|
||||
<Switch
|
||||
bind:state={prompt.is_active}
|
||||
on:change={async () => {
|
||||
|
||||
@@ -218,11 +218,9 @@
|
||||
const items = Array.isArray(parsedSkills) ? parsedSkills : [parsedSkills];
|
||||
|
||||
for (const skill of items) {
|
||||
await createNewSkill(localStorage.token, skill).catch(
|
||||
(error) => {
|
||||
toast.error(`${error}`);
|
||||
}
|
||||
);
|
||||
await createNewSkill(localStorage.token, skill).catch((error) => {
|
||||
toast.error(`${error}`);
|
||||
});
|
||||
}
|
||||
|
||||
toast.success($i18n.t('Skill imported successfully'));
|
||||
|
||||
Reference in New Issue
Block a user