refac: frontend

This commit is contained in:
Timothy Jaeryang Baek committed 2024-11-15 02:05:43 -08:00
1 parent 2ab5b2fd71
commit d9dc04f1a1
20 files changed
+1340 -1407

No files matched your search

@@ -557,7 +557,6 @@
<InputMenu
bind:webSearchEnabled
bind:selectedToolIds
{availableToolIds}
uploadFilesHandler={() => {
filesInputElement.click();
}}
@@ -42,13 +42,11 @@
}
tools = $_tools.reduce((a, tool, i, arr) => {
if (availableToolIds.includes(tool.id) || ($user?.role ?? 'user') === 'admin') {
a[tool.id] = {
name: tool.name,
description: tool.meta.description,
enabled: selectedToolIds.includes(tool.id)
};
}
a[tool.id] = {
name: tool.name,
description: tool.meta.description,
enabled: selectedToolIds.includes(tool.id)
};
return a;
}, {});
};