mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-24 11:22:07 +00:00
Add version sorting for plugins
Enhance plugin dialog with semver-aware sorting by version, enabling users to sort plugins based on version comparisons.
This commit is contained in:
@@ -47,7 +47,8 @@
|
||||
<span>Activate</span>
|
||||
<span class="sort-th" data-sort-field="name" role="button" tabindex="0"
|
||||
title="Sort by name">Name<span class="sort-tri" aria-hidden="true"></span></span>
|
||||
<span>Plugin Version</span>
|
||||
<span class="sort-th" data-sort-field="version" role="button" tabindex="0"
|
||||
title="Sort by version">Plugin Version<span class="sort-tri" aria-hidden="true"></span></span>
|
||||
<span class="sort-th" data-sort-field="source" role="button" tabindex="0"
|
||||
title="Sort by source">Source<span class="sort-tri" aria-hidden="true"></span></span>
|
||||
<span class="sort-th" data-sort-field="status" role="button" tabindex="0"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
const DEFAULT_PLUGIN_SORT = { key: "none", order: "asc" };
|
||||
// note: SORT_FIELDS are the clickable columns. "none" is the baseline/cleared state, not a field -
|
||||
// it is special-cased in NormalizePluginSort and produced by CyclePluginSort's third click.
|
||||
const SORT_FIELDS = new Set(["status", "name", "source"]);
|
||||
const SORT_FIELDS = new Set(["status", "name", "source", "version"]);
|
||||
let pluginSort = { ...DEFAULT_PLUGIN_SORT };
|
||||
|
||||
// why: C++ returns canonical sort state; guard stale or malformed values before reflecting them.
|
||||
|
||||
Reference in New Issue
Block a user