1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Desktop: Indent sub-sections in config screen

This commit is contained in:
Laurent Cozic
2023-09-14 22:54:11 +01:00
parent 47f297a34e
commit 2cb3857fbe
3 changed files with 31 additions and 1 deletions

View File

@ -2502,11 +2502,32 @@ class Setting extends BaseModel {
throw new Error(`Invalid type ID: ${typeId}`);
}
public static sectionOrder() {
return [
'general',
'application',
'appearance',
'sync',
'encryption',
'joplinCloud',
'plugins',
'markdownPlugins',
'note',
'revisionService',
'server',
'keymap',
];
}
private static sectionSource(sectionName: string): SettingSectionSource {
if (this.customSections_[sectionName]) return this.customSections_[sectionName].source || SettingSectionSource.Default;
return SettingSectionSource.Default;
}
public static isSubSection(sectionName: string) {
return ['encryption', 'application', 'appearance', 'joplinCloud'].includes(sectionName);
}
public static groupMetadatasBySections(metadatas: SettingItem[]) {
const sections = [];
const generalSection: any = { name: 'general', metadatas: [] };