mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-14 20:47:33 +00:00
Implement plugin sorting functionality
Add support for sorting plugins by status, name, or source in both ascending and descending order.
This commit is contained in:
@@ -118,6 +118,10 @@ function ShowExploreMenu() {
|
||||
if (!exploreMenu || !exploreMenuButton)
|
||||
return;
|
||||
|
||||
// why: our stopPropagation blocks the outside-click handler, so close the sibling sort menu ourselves (mirror of ToggleSortMenu).
|
||||
if (typeof HideSortMenu === "function")
|
||||
HideSortMenu();
|
||||
|
||||
exploreMenu.hidden = false;
|
||||
exploreMenuButton.setAttribute("aria-expanded", "true");
|
||||
}
|
||||
@@ -214,6 +218,10 @@ function HandleStudio(value) {
|
||||
|
||||
if (payload.command === "list_plugins") {
|
||||
SetSelectedInstallAction(payload.install_action, false);
|
||||
if (typeof NormalizePluginSort === "function") {
|
||||
pluginSort = NormalizePluginSort(payload.sort_key, payload.sort_order);
|
||||
RenderSortMenuState();
|
||||
}
|
||||
ApplyPlugins(payload.data || []);
|
||||
} else if (payload.command === "status_message") {
|
||||
ShowStatusMessage(String(payload.message || ""), String(payload.level || "info"));
|
||||
|
||||
Reference in New Issue
Block a user