mirror of
https://github.com/open-webui/open-webui
synced 2025-02-21 12:29:29 +00:00
Updated Functions and Tools to use existing selected* Variable
Applied formatting
This commit is contained in:
parent
263d4bf496
commit
4d5e161a3e
@ -41,9 +41,7 @@
|
|||||||
let showValvesModal = false;
|
let showValvesModal = false;
|
||||||
let selectedFunction = null;
|
let selectedFunction = null;
|
||||||
|
|
||||||
|
|
||||||
let showDeleteConfirm = false;
|
let showDeleteConfirm = false;
|
||||||
let deleteFunction = null;
|
|
||||||
|
|
||||||
const shareHandler = async (tool) => {
|
const shareHandler = async (tool) => {
|
||||||
console.log(tool);
|
console.log(tool);
|
||||||
@ -250,8 +248,8 @@
|
|||||||
exportHandler={() => {
|
exportHandler={() => {
|
||||||
exportHandler(func);
|
exportHandler(func);
|
||||||
}}
|
}}
|
||||||
deleteHandler={async () => {
|
deleteHandler={async () => {
|
||||||
deleteFunction = func;
|
selectedFunction = func;
|
||||||
showDeleteConfirm = true;
|
showDeleteConfirm = true;
|
||||||
}}
|
}}
|
||||||
onClose={() => {}}
|
onClose={() => {}}
|
||||||
@ -396,11 +394,11 @@
|
|||||||
bind:show={showDeleteConfirm}
|
bind:show={showDeleteConfirm}
|
||||||
title={$i18n.t('Delete function?')}
|
title={$i18n.t('Delete function?')}
|
||||||
on:confirm={() => {
|
on:confirm={() => {
|
||||||
deleteHandler(deleteFunction);
|
deleteHandler(selectedFunction);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div class=" text-sm text-gray-500">
|
<div class=" text-sm text-gray-500">
|
||||||
{$i18n.t('This will delete')} <span class=" font-semibold">{deleteFunction.name}</span>.
|
{$i18n.t('This will delete')} <span class=" font-semibold">{selectedFunction.name}</span>.
|
||||||
</div>
|
</div>
|
||||||
</DeleteConfirmDialog>
|
</DeleteConfirmDialog>
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@
|
|||||||
exportHandler={() => {
|
exportHandler={() => {
|
||||||
exportHandler(prompt);
|
exportHandler(prompt);
|
||||||
}}
|
}}
|
||||||
deleteHandler={async () => {
|
deleteHandler={async () => {
|
||||||
deletePrompt = prompt;
|
deletePrompt = prompt;
|
||||||
showDeleteConfirm = true;
|
showDeleteConfirm = true;
|
||||||
}}
|
}}
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
let selectedTool = null;
|
let selectedTool = null;
|
||||||
|
|
||||||
let showDeleteConfirm = false;
|
let showDeleteConfirm = false;
|
||||||
let deleteTool = null;
|
|
||||||
|
|
||||||
const shareHandler = async (tool) => {
|
const shareHandler = async (tool) => {
|
||||||
console.log(tool);
|
console.log(tool);
|
||||||
@ -244,7 +243,7 @@
|
|||||||
exportHandler(tool);
|
exportHandler(tool);
|
||||||
}}
|
}}
|
||||||
deleteHandler={async () => {
|
deleteHandler={async () => {
|
||||||
deleteTool = tool;
|
selectedTool = tool;
|
||||||
showDeleteConfirm = true;
|
showDeleteConfirm = true;
|
||||||
}}
|
}}
|
||||||
onClose={() => {}}
|
onClose={() => {}}
|
||||||
@ -379,11 +378,11 @@
|
|||||||
bind:show={showDeleteConfirm}
|
bind:show={showDeleteConfirm}
|
||||||
title={$i18n.t('Delete tool?')}
|
title={$i18n.t('Delete tool?')}
|
||||||
on:confirm={() => {
|
on:confirm={() => {
|
||||||
deleteHandler(deleteTool);
|
deleteHandler(selectedTool);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div class=" text-sm text-gray-500">
|
<div class=" text-sm text-gray-500">
|
||||||
{$i18n.t('This will delete')} <span class=" font-semibold">{deleteTool.name}</span>.
|
{$i18n.t('This will delete')} <span class=" font-semibold">{selectedTool.name}</span>.
|
||||||
</div>
|
</div>
|
||||||
</DeleteConfirmDialog>
|
</DeleteConfirmDialog>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user