mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Desktop: Sort plugin config sections alphabetically
This commit is contained in:
parent
6dcb145732
commit
19feb0c48b
@ -78,6 +78,10 @@ export default function Sidebar(props: Props) {
|
||||
if (s1 === SettingSectionSource.Default && s2 === SettingSectionSource.Default) return props.sections.indexOf(s1) - props.sections.indexOf(s2);
|
||||
if (s1 === SettingSectionSource.Default && s2 === SettingSectionSource.Plugin) return -1;
|
||||
if (s1 === SettingSectionSource.Plugin && s2 === SettingSectionSource.Default) return +1;
|
||||
|
||||
const l1 = Setting.sectionNameToLabel(a.name);
|
||||
const l2 = Setting.sectionNameToLabel(b.name);
|
||||
if (s1 === SettingSectionSource.Plugin && s2 === SettingSectionSource.Plugin) return l1.toLowerCase() < l2.toLowerCase() ? -1 : +1;
|
||||
return 0;
|
||||
});
|
||||
return output;
|
||||
|
Loading…
Reference in New Issue
Block a user