chore: order importers by name instead of id (#2578)

This commit is contained in:
Yohan Boniface 2025-03-17 16:46:22 +01:00 committed by GitHub
commit 54a3aae912
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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>`
) )