1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

All: Fixed sync interval sorting order

This commit is contained in:
Laurent Cozic
2018-02-21 19:58:28 +00:00
parent e1fd9c6922
commit 14a93a9f26
4 changed files with 40 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ const { Logger } = require('lib/logger.js');
const SyncTargetRegistry = require('lib/SyncTargetRegistry.js');
const { time } = require('lib/time-utils.js');
const { sprintf } = require('sprintf-js');
const ObjectUtils = require('lib/ObjectUtils');
const { _, supportedLocalesToLanguages, defaultLocale } = require('lib/locale.js');
class Setting extends BaseModel {
@@ -24,7 +25,7 @@ class Setting extends BaseModel {
'firstStart': { value: true, type: Setting.TYPE_BOOL, public: false },
'editor': { value: '', type: Setting.TYPE_STRING, public: true, appTypes: ['cli'], label: () => _('Text editor'), description: () => _('The editor that will be used to open a note. If none is provided it will try to auto-detect the default editor.') },
'locale': { value: defaultLocale(), type: Setting.TYPE_STRING, isEnum: true, public: true, label: () => _('Language'), options: () => {
return supportedLocalesToLanguages();
return ObjectUtils.sortByValue(supportedLocalesToLanguages());
}},
'dateFormat': { value: Setting.DATE_FORMAT_1, type: Setting.TYPE_STRING, isEnum: true, public: true, label: () => _('Date format'), options: () => {
let options = {}