mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 05:24:02 +00:00
enh: model preset delete confirmation
This commit is contained in:
parent
a0dbc970a9
commit
262501304c
@ -17,15 +17,19 @@
|
|||||||
|
|
||||||
import EllipsisHorizontal from '../icons/EllipsisHorizontal.svelte';
|
import EllipsisHorizontal from '../icons/EllipsisHorizontal.svelte';
|
||||||
import ModelMenu from './Models/ModelMenu.svelte';
|
import ModelMenu from './Models/ModelMenu.svelte';
|
||||||
|
import ModelDeleteConfirmDialog from '../common/ConfirmDialog.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
|
let showModelDeleteConfirm = false;
|
||||||
|
|
||||||
let localModelfiles = [];
|
let localModelfiles = [];
|
||||||
|
|
||||||
let importFiles;
|
let importFiles;
|
||||||
let modelsImportInputElement: HTMLInputElement;
|
let modelsImportInputElement: HTMLInputElement;
|
||||||
|
|
||||||
let _models = [];
|
let _models = [];
|
||||||
|
let selectedModel = null;
|
||||||
|
|
||||||
let sortable = null;
|
let sortable = null;
|
||||||
let searchValue = '';
|
let searchValue = '';
|
||||||
@ -199,6 +203,13 @@
|
|||||||
</title>
|
</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
<ModelDeleteConfirmDialog
|
||||||
|
bind:show={showModelDeleteConfirm}
|
||||||
|
on:confirm={() => {
|
||||||
|
deleteModelHandler(selectedModel);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
<div class=" text-lg font-semibold mb-3">{$i18n.t('Models')}</div>
|
<div class=" text-lg font-semibold mb-3">{$i18n.t('Models')}</div>
|
||||||
|
|
||||||
<div class=" flex w-full space-x-2">
|
<div class=" flex w-full space-x-2">
|
||||||
@ -339,7 +350,8 @@
|
|||||||
hideModelHandler(model);
|
hideModelHandler(model);
|
||||||
}}
|
}}
|
||||||
deleteHandler={() => {
|
deleteHandler={() => {
|
||||||
deleteModelHandler(model);
|
selectedModel = model;
|
||||||
|
showModelDeleteConfirm = true;
|
||||||
}}
|
}}
|
||||||
onClose={() => {}}
|
onClose={() => {}}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user