From 615050c0975a4d9a8a4d209d98ae047be3962b35 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Tue, 5 Nov 2024 13:15:29 -0600 Subject: [PATCH] add plugin search --- src/lib/helpers/types/pluginTypes.js | 1 + src/lib/scss/custom/pages/_chat.scss | 2 ++ src/lib/services/plugin-service.js | 3 ++- src/routes/VerticalLayout/Sidebar.svelte | 9 ++++----- src/routes/page/plugin/+page.svelte | 22 +++++++++++++++++++++- 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/lib/helpers/types/pluginTypes.js b/src/lib/helpers/types/pluginTypes.js index 50e7104..cb9ac9a 100644 --- a/src/lib/helpers/types/pluginTypes.js +++ b/src/lib/helpers/types/pluginTypes.js @@ -22,6 +22,7 @@ /** * @typedef {Object} PluginFilter * @property {import('$commonTypes').Pagination} pager - Pagination + * @property {string[]} [names] - The plugin names */ export default {}; \ No newline at end of file diff --git a/src/lib/scss/custom/pages/_chat.scss b/src/lib/scss/custom/pages/_chat.scss index 21e4755..cae5130 100644 --- a/src/lib/scss/custom/pages/_chat.scss +++ b/src/lib/scss/custom/pages/_chat.scss @@ -89,6 +89,7 @@ flex: 0 0 fit-content; flex-direction: column; height: 100%; + gap: 5px; .chat-head-agent { flex: 0.5; @@ -108,6 +109,7 @@ display: flex; gap: 5px; width: fit-content; + font-size: 12px; } } } diff --git a/src/lib/services/plugin-service.js b/src/lib/services/plugin-service.js index ae9f85c..d03e814 100644 --- a/src/lib/services/plugin-service.js +++ b/src/lib/services/plugin-service.js @@ -11,7 +11,8 @@ export async function getPlugins(filter) { let url = endpoints.pluginListUrl; const response = await axios.get(url, { params: filter, paramsSerializer: { - dots: true + dots: true, + indexes: null } }); return response.data; diff --git a/src/routes/VerticalLayout/Sidebar.svelte b/src/routes/VerticalLayout/Sidebar.svelte index 5084b90..03dbdd4 100644 --- a/src/routes/VerticalLayout/Sidebar.svelte +++ b/src/routes/VerticalLayout/Sidebar.svelte @@ -201,8 +201,7 @@ return path?.startsWith('/') ? path.substring(1) : path; }; - /** @param {string} link */ - const goToPage = (link) => { + const goToPage = () => { globalEventStore.reset(); } @@ -231,19 +230,19 @@
{:else} -