chore: order importers by name instead of id

Co-authored-by: David Larlet <david@larlet.fr>
This commit is contained in:
Yohan Boniface 2025-03-17 16:44:23 +01:00
parent d3ed46356d
commit 9d4069d9ae

View file

@ -176,7 +176,7 @@ export default class Importer extends Utils.WithTemplate {
showImporters() { showImporters() {
if (!this.IMPORTERS.length) return if (!this.IMPORTERS.length) return
const [element, { grid }] = Utils.loadTemplateWithRefs(GRID_TEMPLATE) const [element, { grid }] = Utils.loadTemplateWithRefs(GRID_TEMPLATE)
for (const plugin of this.IMPORTERS.sort((a, b) => (a.id > b.id ? 1 : -1))) { for (const plugin of this.IMPORTERS.sort((a, b) => (a.name > b.name ? 1 : -1))) {
const button = Utils.loadTemplate( const button = Utils.loadTemplate(
`<li><button type="button" class="${plugin.id}">${plugin.name}</button></li>` `<li><button type="button" class="${plugin.id}">${plugin.name}</button></li>`
) )