Add toasts i18n key

This commit is contained in:
SimonOriginal
2024-06-24 17:18:39 +02:00
parent 85b3b81617
commit 9c81d84e16
44 changed files with 496 additions and 15 deletions
@@ -60,13 +60,13 @@
});
if (res) {
toast.success('Valves updated successfully');
toast.success($i18n.t('Valves updated successfully'));
setPipelines();
models.set(await getModels(localStorage.token));
saveHandler();
}
} else {
toast.error('No valves to update');
toast.error($i18n.t('No valves to update'));
}
};
@@ -122,7 +122,7 @@
});
if (res) {
toast.success('Pipeline downloaded successfully');
toast.success($i18n.t('Pipeline downloaded successfully'));
setPipelines();
models.set(await getModels(localStorage.token));
}
@@ -147,12 +147,12 @@
);
if (res) {
toast.success('Pipeline downloaded successfully');
toast.success($i18n.t('Pipeline downloaded successfully'));
setPipelines();
models.set(await getModels(localStorage.token));
}
} else {
toast.error('No file selected');
toast.error($i18n.t('No file selected'));
}
pipelineFiles = null;
@@ -176,7 +176,7 @@
});
if (res) {
toast.success('Pipeline deleted successfully');
toast.success($i18n.t('Pipeline deleted successfully'));
setPipelines();
models.set(await getModels(localStorage.token));
}
@@ -24,7 +24,7 @@
if (res) {
console.log(res);
toast.success('Memory added successfully');
toast.success($i18n.t('Memory added successfully'));
content = '';
show = false;
dispatch('save');
@@ -35,7 +35,7 @@
if (res) {
console.log(res);
toast.success('Memory updated successfully');
toast.success($i18n.t('Memory updated successfully'));
dispatch('save');
show = false;
}
@@ -129,7 +129,7 @@
});
if (res) {
toast.success('Memory deleted successfully');
toast.success($i18n.t('Memory deleted successfully'));
memories = await getMemories(localStorage.token);
}
}}
@@ -182,7 +182,7 @@
});
if (res) {
toast.success('Memory cleared successfully');
toast.success($i18n.t('Memory cleared successfully'));
memories = [];
}
}}>{$i18n.t('Clear memory')}</button
@@ -81,7 +81,7 @@
});
if (res) {
toast.success('Function deleted successfully');
toast.success($i18n.t('Function deleted successfully'));
functions.set(await getFunctions(localStorage.token));
models.set(await getModels(localStorage.token));
@@ -404,7 +404,7 @@
});
}
toast.success('Functions imported successfully');
toast.success($i18n.t('Functions imported successfully'));
functions.set(await getFunctions(localStorage.token));
models.set(await getModels(localStorage.token));
};
+2 -2
View File
@@ -77,7 +77,7 @@
});
if (res) {
toast.success('Tool deleted successfully');
toast.success($i18n.t('Tool deleted successfully'));
tools.set(await getTools(localStorage.token));
}
};
@@ -388,7 +388,7 @@
});
}
toast.success('Tool imported successfully');
toast.success($i18n.t('Tool imported successfully'));
tools.set(await getTools(localStorage.token));
};
@@ -51,7 +51,7 @@
}
if (res) {
toast.success('Valves updated successfully');
toast.success($i18n.t('Valves updated successfully'));
}
}