mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-11 16:26:02 +00:00
feat: plugin reordering (#1398)
* Add @dnd-kit/core and @dnd-kit/sortable dependencies for plugin sorting Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * Add PluginSortDialog component with drag-and-drop functionality Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * Integrate sorting button and dialog into PluginInstalledComponent Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * Update HttpClient to use local backend URL for development Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * Fix reorderPlugins method to use PUT and correct request format Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * Update hover-card component using shadcn CLI Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * Fix formatting issues in plugin sorting components Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * refactor: move plugin sorting button and dialog to page component Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * refactor: move PluginSortDialog component to plugins directory Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * chore: remove old PluginSortDialog component file Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * fix: api bug * perf: desciption in plugin sorting dialog * fix: lint errors --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Junyan Qin <Chin> <rockchinq@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ae6979151f
commit
86ff6f5eb6
@@ -375,7 +375,7 @@ class HttpClient {
|
||||
}
|
||||
|
||||
public reorderPlugins(plugins: PluginReorderElement[]): Promise<object> {
|
||||
return this.post('/api/v1/plugins/reorder', plugins);
|
||||
return this.put('/api/v1/plugins/reorder', { plugins });
|
||||
}
|
||||
|
||||
public updatePlugin(
|
||||
@@ -445,8 +445,8 @@ class HttpClient {
|
||||
}
|
||||
|
||||
// export const httpClient = new HttpClient("https://version-4.langbot.dev");
|
||||
// export const httpClient = new HttpClient('http://localhost:5300');
|
||||
export const httpClient = new HttpClient('/');
|
||||
export const httpClient = new HttpClient('http://localhost:5300');
|
||||
// export const httpClient = new HttpClient('/');
|
||||
|
||||
// 临时写法,未来两种Client都继承自HttpClient父类,不允许共享方法
|
||||
export const spaceClient = new HttpClient('https://space.langbot.app');
|
||||
|
||||
Reference in New Issue
Block a user