1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Added config screen

This commit is contained in:
Laurent Cozic 2017-11-12 00:44:26 +00:00
parent eda3be066d
commit 6e9e3fc9bd
13 changed files with 533 additions and 126 deletions

View File

@ -14,6 +14,7 @@ const rootDir = dirname(dirname(__dirname));
const cliDir = rootDir + '/CliClient';
const cliLocalesDir = cliDir + '/locales';
const rnDir = rootDir + '/ReactNativeClient';
const electronDir = rootDir + '/ElectronClient/app';
function execCommand(command) {
if (!silentLog) console.info('Running: ' + command);
@ -116,6 +117,9 @@ async function main() {
await createPotFile(potFilePath, [
cliDir + '/app/*.js',
cliDir + '/app/gui/*.js',
electronDir + '/*.js',
electronDir + '/gui/*.js',
rnDir + '/lib/*.js',
rnDir + '/lib/models/*.js',
rnDir + '/lib/services/*.js',
@ -141,7 +145,7 @@ async function main() {
const rnJsonLocaleDir = rnDir + '/locales';
await execCommand('rsync -a "' + jsonLocalesDir + '/" "' + rnJsonLocaleDir + '"');
const electronJsonLocaleDir = rootDir + '/ElectronClient/app/locales';
const electronJsonLocaleDir = electronDir + '/locales';
await execCommand('rsync -a "' + jsonLocalesDir + '/" "' + electronJsonLocaleDir + '"');
}

View File

@ -33,6 +33,7 @@ class Command extends BaseCommand {
if (!args.name && !args.value) {
let keys = Setting.keys(!verbose, 'cli');
keys.sort();
for (let i = 0; i < keys.length; i++) {
const value = Setting.value(keys[i]);
if (!verbose && !value) continue;

View File

@ -466,6 +466,111 @@ msgid ""
"will be shared with any third party."
msgstr ""
msgid "Search:"
msgstr ""
msgid "New note"
msgstr ""
msgid "New to-do"
msgstr ""
msgid "New notebook"
msgstr ""
msgid "Import Evernote notes"
msgstr ""
msgid "Evernote Export Files"
msgstr ""
msgid "Quit"
msgstr ""
msgid "Tools"
msgstr ""
msgid "Options"
msgstr ""
msgid "Help"
msgstr ""
msgid "Documentation"
msgstr ""
msgid "About Joplin"
msgstr ""
msgid "OK"
msgstr ""
msgid "Cancel"
msgstr ""
msgid "Back"
msgstr ""
#, javascript-format
msgid ""
"New notebook \"%s\" will be created and file \"%s\" will be imported into it"
msgstr ""
msgid "Note title:"
msgstr ""
msgid "To-do title:"
msgstr ""
msgid "Notebook title:"
msgstr ""
msgid "Add or remove tags:"
msgstr ""
msgid "Separate each tag by a comma."
msgstr ""
msgid "Layout"
msgstr ""
msgid "Add or remove tags"
msgstr ""
msgid "Switch between note and to-do"
msgstr ""
msgid "Delete"
msgstr ""
msgid "No notes in here. Create one by clicking on \"New note\"."
msgstr ""
#, javascript-format
msgid "Unsupported link or message: %s"
msgstr ""
msgid "Attach file"
msgstr ""
msgid "Refresh"
msgstr ""
msgid "Delete notebook?"
msgstr ""
msgid "Remove this tag from all the notes?"
msgstr ""
msgid "Notebooks"
msgstr ""
msgid "Tags"
msgstr ""
msgid "Synchronise"
msgstr ""
#, javascript-format
msgid "Usage: %s"
msgstr ""
@ -597,10 +702,16 @@ msgstr ""
msgid "Language"
msgstr ""
msgid "Show uncompleted todos on top of the lists"
msgid "Theme"
msgstr ""
msgid "Show advanced options"
msgid "Light"
msgstr ""
msgid "Dark"
msgstr ""
msgid "Show uncompleted todos on top of the lists"
msgstr ""
msgid "Save geo-location with notes"
@ -624,13 +735,7 @@ msgstr ""
msgid "%d hours"
msgstr ""
msgid "Theme"
msgstr ""
msgid "Light"
msgstr ""
msgid "Dark"
msgid "Show advanced options"
msgstr ""
msgid "Sync status (synced items / total items)"
@ -659,15 +764,6 @@ msgstr ""
msgid "%s: %d notes"
msgstr ""
msgid "New to-do"
msgstr ""
msgid "New note"
msgstr ""
msgid "New notebook"
msgstr ""
msgid "There are currently no notes. Create one by clicking on the (+) button."
msgstr ""
@ -680,9 +776,6 @@ msgstr ""
msgid "Configuration"
msgstr ""
msgid "Synchronise"
msgstr ""
msgid "Cancel synchronisation"
msgstr ""
@ -693,9 +786,6 @@ msgstr ""
msgid "Edit notebook"
msgstr ""
msgid "Refresh"
msgstr ""
msgid "This note has been modified:"
msgstr ""
@ -705,12 +795,6 @@ msgstr ""
msgid "Discard changes"
msgstr ""
msgid "Cancel"
msgstr ""
msgid "Attach file"
msgstr ""
msgid "Delete note"
msgstr ""
@ -732,9 +816,6 @@ msgstr ""
msgid "Edit"
msgstr ""
msgid "Delete notebook?"
msgstr ""
msgid "Delete notebook"
msgstr ""

View File

@ -516,6 +516,122 @@ msgstr ""
"aucun fichier en dehors de ce répertoire, ni à d'autres données "
"personnelles. Aucune donnée ne sera partagé avec aucun tier."
#, fuzzy
msgid "Search:"
msgstr "Chercher"
msgid "New note"
msgstr "Nouvelle note"
msgid "New to-do"
msgstr "Nouvelle tâche"
msgid "New notebook"
msgstr "Nouveau carnet"
msgid "Import Evernote notes"
msgstr "Importer notes d'Evernotes"
msgid "Evernote Export Files"
msgstr "Fichiers d'export Evernote"
msgid "Quit"
msgstr "Quitter"
msgid "Tools"
msgstr "Outils"
msgid "Options"
msgstr "Options"
msgid "Help"
msgstr "Aide"
msgid "Documentation"
msgstr "Documentation"
msgid "About Joplin"
msgstr "A props de Joplin"
msgid "OK"
msgstr "OK"
msgid "Cancel"
msgstr "Annulation"
msgid "Back"
msgstr "Retour"
#, fuzzy, javascript-format
msgid ""
"New notebook \"%s\" will be created and file \"%s\" will be imported into it"
msgstr ""
"Un nouveau carnet \"%s\" va être créé et le fichier \"%s\" va être importé "
"dedans. Continuer ?"
#, fuzzy
msgid "Note title:"
msgstr "cat <titre>"
#, fuzzy
msgid "To-do title:"
msgstr "cat <titre>"
#, fuzzy
msgid "Notebook title:"
msgstr "cat <titre>"
msgid "Add or remove tags:"
msgstr "Modifier les étiquettes"
msgid "Separate each tag by a comma."
msgstr ""
msgid "Layout"
msgstr ""
msgid "Add or remove tags"
msgstr ""
msgid "Switch between note and to-do"
msgstr ""
#, fuzzy
msgid "Delete"
msgstr "Supprimer la note"
#, fuzzy
msgid "No notes in here. Create one by clicking on \"New note\"."
msgstr ""
"Vous n'avez pour l'instant pas de carnets. Créez-en un en pressant le bouton "
"(+)."
#, javascript-format
msgid "Unsupported link or message: %s"
msgstr ""
msgid "Attach file"
msgstr "Attacher un fichier"
msgid "Refresh"
msgstr "Rafraîchir"
msgid "Delete notebook?"
msgstr "Supprimer le carnet ?"
msgid "Remove this tag from all the notes?"
msgstr ""
#, fuzzy
msgid "Notebooks"
msgstr "Nouveau carnet"
msgid "Tags"
msgstr ""
msgid "Synchronise"
msgstr "Synchroniser"
#, javascript-format
msgid "Usage: %s"
msgstr "Utilisation : %s"
@ -657,12 +773,18 @@ msgstr ""
msgid "Language"
msgstr "Langue"
msgid "Theme"
msgstr "Apparence"
msgid "Light"
msgstr "Clair"
msgid "Dark"
msgstr "Sombre"
msgid "Show uncompleted todos on top of the lists"
msgstr "Tâches non-terminées en haut des listes"
msgid "Show advanced options"
msgstr "Montrer les options avancées"
msgid "Save geo-location with notes"
msgstr "Enregistrer l'emplacement avec les notes"
@ -684,14 +806,8 @@ msgstr "%d heure"
msgid "%d hours"
msgstr "%d heures"
msgid "Theme"
msgstr "Apparence"
msgid "Light"
msgstr "Clair"
msgid "Dark"
msgstr "Sombre"
msgid "Show advanced options"
msgstr "Montrer les options avancées"
msgid "Sync status (synced items / total items)"
msgstr "Status de la synchronisation (objets synchro. / total)"
@ -719,15 +835,6 @@ msgstr "Carnets"
msgid "%s: %d notes"
msgstr "%s : %d notes"
msgid "New to-do"
msgstr "Nouvelle tâche"
msgid "New note"
msgstr "Nouvelle note"
msgid "New notebook"
msgstr "Nouveau carnet"
msgid "There are currently no notes. Create one by clicking on the (+) button."
msgstr ""
"Ce carnet ne contient aucune note. Créez-en une en appuyant sur le bouton "
@ -742,9 +849,6 @@ msgstr "Etat"
msgid "Configuration"
msgstr "Configuration"
msgid "Synchronise"
msgstr "Synchroniser"
msgid "Cancel synchronisation"
msgstr "Annuler synchronisation"
@ -755,9 +859,6 @@ msgstr "Ce carnet n'a pas pu être sauvegardé : %s"
msgid "Edit notebook"
msgstr "Editer le carnet"
msgid "Refresh"
msgstr "Rafraîchir"
msgid "This note has been modified:"
msgstr "Cette note a été modifiée :"
@ -767,12 +868,6 @@ msgstr "Enregistrer les changements"
msgid "Discard changes"
msgstr "Ignorer les changements"
msgid "Cancel"
msgstr "Annulation"
msgid "Attach file"
msgstr "Attacher un fichier"
msgid "Delete note"
msgstr "Supprimer la note"
@ -794,9 +889,6 @@ msgstr "Voir l'emplacement sur la carte"
msgid "Edit"
msgstr "Editer"
msgid "Delete notebook?"
msgstr "Supprimer le carnet ?"
msgid "Delete notebook"
msgstr "Supprimer le carnet"
@ -924,9 +1016,6 @@ msgstr "Bienvenue"
#~ msgid "Usage: --log-level <none|error|warn|info|debug>"
#~ msgstr "Utilisation: --log-level <none|error|warn|info|debug>"
#~ msgid "cat <title>"
#~ msgstr "cat <titre>"
#~ msgid "config [name] [value]"
#~ msgstr "config [nom] [valeur]"
@ -936,10 +1025,6 @@ msgstr "Bienvenue"
#~ msgid "edit <title>"
#~ msgstr "edit <titre>"
#, fuzzy
#~ msgid "geoloc <title>"
#~ msgstr "cat <titre>"
#~ msgid "import-enex <file> [notebook]"
#~ msgstr "import-enex <fichier> [carnet]"

View File

@ -466,6 +466,111 @@ msgid ""
"will be shared with any third party."
msgstr ""
msgid "Search:"
msgstr ""
msgid "New note"
msgstr ""
msgid "New to-do"
msgstr ""
msgid "New notebook"
msgstr ""
msgid "Import Evernote notes"
msgstr ""
msgid "Evernote Export Files"
msgstr ""
msgid "Quit"
msgstr ""
msgid "Tools"
msgstr ""
msgid "Options"
msgstr ""
msgid "Help"
msgstr ""
msgid "Documentation"
msgstr ""
msgid "About Joplin"
msgstr ""
msgid "OK"
msgstr ""
msgid "Cancel"
msgstr ""
msgid "Back"
msgstr ""
#, javascript-format
msgid ""
"New notebook \"%s\" will be created and file \"%s\" will be imported into it"
msgstr ""
msgid "Note title:"
msgstr ""
msgid "To-do title:"
msgstr ""
msgid "Notebook title:"
msgstr ""
msgid "Add or remove tags:"
msgstr ""
msgid "Separate each tag by a comma."
msgstr ""
msgid "Layout"
msgstr ""
msgid "Add or remove tags"
msgstr ""
msgid "Switch between note and to-do"
msgstr ""
msgid "Delete"
msgstr ""
msgid "No notes in here. Create one by clicking on \"New note\"."
msgstr ""
#, javascript-format
msgid "Unsupported link or message: %s"
msgstr ""
msgid "Attach file"
msgstr ""
msgid "Refresh"
msgstr ""
msgid "Delete notebook?"
msgstr ""
msgid "Remove this tag from all the notes?"
msgstr ""
msgid "Notebooks"
msgstr ""
msgid "Tags"
msgstr ""
msgid "Synchronise"
msgstr ""
#, javascript-format
msgid "Usage: %s"
msgstr ""
@ -597,10 +702,16 @@ msgstr ""
msgid "Language"
msgstr ""
msgid "Show uncompleted todos on top of the lists"
msgid "Theme"
msgstr ""
msgid "Show advanced options"
msgid "Light"
msgstr ""
msgid "Dark"
msgstr ""
msgid "Show uncompleted todos on top of the lists"
msgstr ""
msgid "Save geo-location with notes"
@ -624,13 +735,7 @@ msgstr ""
msgid "%d hours"
msgstr ""
msgid "Theme"
msgstr ""
msgid "Light"
msgstr ""
msgid "Dark"
msgid "Show advanced options"
msgstr ""
msgid "Sync status (synced items / total items)"
@ -659,15 +764,6 @@ msgstr ""
msgid "%s: %d notes"
msgstr ""
msgid "New to-do"
msgstr ""
msgid "New note"
msgstr ""
msgid "New notebook"
msgstr ""
msgid "There are currently no notes. Create one by clicking on the (+) button."
msgstr ""
@ -680,9 +776,6 @@ msgstr ""
msgid "Configuration"
msgstr ""
msgid "Synchronise"
msgstr ""
msgid "Cancel synchronisation"
msgstr ""
@ -693,9 +786,6 @@ msgstr ""
msgid "Edit notebook"
msgstr ""
msgid "Refresh"
msgstr ""
msgid "This note has been modified:"
msgstr ""
@ -705,12 +795,6 @@ msgstr ""
msgid "Discard changes"
msgstr ""
msgid "Cancel"
msgstr ""
msgid "Attach file"
msgstr ""
msgid "Delete note"
msgstr ""
@ -732,9 +816,6 @@ msgstr ""
msgid "Edit"
msgstr ""
msgid "Delete notebook?"
msgstr ""
msgid "Delete notebook"
msgstr ""

View File

@ -4,7 +4,7 @@ const { BaseApplication } = require('lib/BaseApplication');
const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
const { Setting } = require('lib/models/setting.js');
const { BaseModel } = require('lib/base-model.js');
const { _ } = require('lib/locale.js');
const { _, setLocale } = require('lib/locale.js');
const os = require('os');
const fs = require('fs-extra');
const { Logger } = require('lib/logger.js');
@ -101,9 +101,14 @@ class Application extends BaseApplication {
}
async generalMiddleware(store, next, action) {
if (action.type == 'SETTING_UPDATE_ONE' && action.key == 'locale' || action.type == 'SETTING_UPDATE_ALL') {
setLocale(Setting.value('locale'));
this.refreshMenu();
}
if (['NOTE_UPDATE_ONE', 'NOTE_DELETE', 'FOLDER_UPDATE_ONE', 'FOLDER_DELETE'].indexOf(action.type) >= 0) {
if (!await reg.syncStarted()) reg.scheduleSync();
}
}
const result = await super.generalMiddleware(store, next, action);
const newState = store.getState();
@ -113,7 +118,12 @@ class Application extends BaseApplication {
}
return result;
}
refreshMenu() {
const screen = this.lastMenuScreen_;
this.lastMenuScreen_ = null;
this.updateMenu(screen);
}
updateMenu(screen) {
@ -121,7 +131,7 @@ class Application extends BaseApplication {
const template = [
{
label: 'File',
label: _('File'),
submenu: [{
label: _('New note'),
accelerator: 'CommandOrControl+N',
@ -180,14 +190,36 @@ class Application extends BaseApplication {
click: () => { bridge().electronApp().exit() }
}]
}, {
label: 'Help',
label: _('Tools'),
submenu: [{
label: _('Options'),
click: () => {
this.dispatch({
type: 'NAV_GO',
routeName: 'Config',
});
}
}]
}, {
label: _('Help'),
submenu: [{
label: _('Documentation'),
accelerator: 'F1',
click () { bridge().openExternal('http://joplin.cozic.net') }
}, {
label: _('About Joplin'),
click () { }
click: () => {
const p = require('./package.json');
let message = [
p.description,
'',
'Copyright © 2016-2017',
_('%s %s (%s)', p.name, p.version, Setting.value('env')),
];
bridge().showMessageBox({
message: message.join('\n'),
});
}
}]
},
];

View File

@ -0,0 +1,114 @@
const React = require('react');
const { connect } = require('react-redux');
const { reg } = require('lib/registry.js');
const { Setting } = require('lib/models/setting.js');
const { bridge } = require('electron').remote.require('./bridge');
const { Header } = require('./Header.min.js');
const { themeStyle } = require('../theme.js');
const { _ } = require('lib/locale.js');
class ConfigScreenComponent extends React.Component {
settingToComponent(key, value) {
const theme = themeStyle(this.props.theme);
let output = null;
const rowStyle = {
marginBottom: 10,
};
const labelStyle = Object.assign({}, theme.textStyle, {
display: 'inline-block',
marginRight: 10,
});
const controlStyle = {
display: 'inline-block',
};
const updateSettingValue = (key, value) => {
Setting.setValue(key, value);
}
const md = Setting.settingMetadata(key);
if (md.isEnum) {
let items = [];
const settingOptions = md.options();
for (let k in settingOptions) {
if (!settingOptions.hasOwnProperty(k)) continue;
items.push(<option value={k.toString()} key={k}>{settingOptions[k]}</option>);
}
return (
<div key={key} style={rowStyle}>
<div style={labelStyle}><label>{md.label()}</label></div>
<select value={value} style={controlStyle} onChange={(event) => { updateSettingValue(key, event.target.value) }}>
{items}
</select>
</div>
);
} else if (md.type === Setting.TYPE_BOOL) {
return (
<div key={key} style={rowStyle}>
<div style={controlStyle}>
<label><input type="checkbox" defaultChecked={!!value} onChange={(event) => { updateSettingValue(key, !!event.target.checked) }}/><span style={labelStyle}> {md.label()}</span></label>
</div>
</div>
);
}
return output;
}
render() {
const theme = themeStyle(this.props.theme);
const style = this.props.style;
const settings = this.props.settings;
const headerStyle = {
width: style.width,
};
const containerStyle = {
padding: 10,
};
let settingComps = [];
let keys = Setting.keys(true, 'desktop');
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
if (key === 'sync.target') continue;
if (!(key in settings)) {
console.warn('Missing setting: ' + key);
continue;
}
const comp = this.settingToComponent(key, settings[key]);
if (!comp) continue;
settingComps.push(comp);
}
return (
<div style={style}>
<Header style={headerStyle} />
<div style={containerStyle}>
{ settingComps }
</div>
</div>
);
}
}
const mapStateToProps = (state) => {
return {
theme: state.settings.theme,
settings: state.settings,
locale: state.settings.locale,
};
};
const ConfigScreen = connect(mapStateToProps)(ConfigScreenComponent);
module.exports = { ConfigScreen };

View File

@ -164,6 +164,7 @@ const mapStateToProps = (state) => {
notes: state.notes,
selectedNoteId: state.selectedNoteId,
theme: state.settings.theme,
// uncompletedTodosOnTop: state.settings.uncompletedTodosOnTop,
};
};

View File

@ -6,6 +6,7 @@ const { connect, Provider } = require('react-redux');
const { MainScreen } = require('./MainScreen.min.js');
const { OneDriveLoginScreen } = require('./OneDriveLoginScreen.min.js');
const { ImportScreen } = require('./ImportScreen.min.js');
const { ConfigScreen } = require('./ConfigScreen.min.js');
const { Navigator } = require('./Navigator.min.js');
const { app } = require('../app');
@ -61,6 +62,7 @@ class RootComponent extends React.Component {
Main: { screen: MainScreen },
OneDriveLogin: { screen: OneDriveLoginScreen },
Import: { screen: ImportScreen },
Config: { screen: ConfigScreen },
};
return (

View File

@ -33,6 +33,7 @@ class SideBarComponent extends React.Component {
display: 'flex',
alignItems: 'center',
cursor: 'default',
opacity: 0.8,
},
listItemSelected: {
backgroundColor: theme.selectedColor2,
@ -68,7 +69,7 @@ class SideBarComponent extends React.Component {
fontFamily: theme.fontFamily,
fontSize: Math.round(theme.fontSize * .9),
color: theme.color2,
opacity: .8,
opacity: .5,
display: 'flex',
alignItems: 'left',
justifyContent: 'top',
@ -147,7 +148,7 @@ class SideBarComponent extends React.Component {
makeHeader(key, label, iconName) {
const style = this.style().header;
const icon = <i style={{fontSize: style.fontSize * 1.2, marginRight: 5}} className={"icon " + iconName}></i>
const icon = <i style={{fontSize: style.fontSize * 1.2, marginRight: 5}} className={"fa " + iconName}></i>
return <div style={style} key={key}>{icon}{label}</div>
}
@ -165,14 +166,14 @@ class SideBarComponent extends React.Component {
let items = [];
items.push(this.makeHeader('folderHeader', _('Notebooks'), 'ion-android-folder'));
items.push(this.makeHeader('folderHeader', _('Notebooks'), 'fa-folder-o'));
if (this.props.folders.length) {
const folderItems = shared.renderFolders(this.props, this.folderItem.bind(this));
items = items.concat(folderItems);
}
items.push(this.makeHeader('tagHeader', _('Tags'), 'ion-pricetags'));
items.push(this.makeHeader('tagHeader', _('Tags'), 'fa-tags'));
if (this.props.tags.length) {
const tagItems = shared.renderTags(this.props, this.tagItem.bind(this));

View File

@ -216,6 +216,10 @@ class BaseApplication {
await this.refreshNotes(Folder.modelType(), newState.selectedFolderId);
}
if (this.hasGui() && action.type == 'SETTING_UPDATE_ONE' && action.key == 'uncompletedTodosOnTop' || action.type == 'SETTING_UPDATE_ALL') {
await this.refreshNotes(Folder.modelType(), newState.selectedFolderId);
}
if (action.type == 'TAG_SELECT') {
await this.refreshNotes(Tag.modelType(), action.id);
}

View File

@ -283,6 +283,7 @@ function localeStrings(canonicalName) {
function setLocale(canonicalName) {
if (currentLocale_ == canonicalName) return;
currentLocale_ = closestSupportedLocale(canonicalName);
console.info('Set locale to ' + currentLocale_);
}
function languageCode() {

View File

@ -32,7 +32,7 @@ class Setting extends BaseModel {
if (!this.metadata_.hasOwnProperty(n)) continue;
this.keys_.push(n);
}
this.keys_.sort();
//this.keys_.sort();
}
if (appType || publicOnly) {
@ -334,6 +334,12 @@ Setting.metadata_ = {
'locale': { value: defaultLocale(), type: Setting.TYPE_STRING, isEnum: true, public: true, label: () => _('Language'), options: () => {
return supportedLocalesToLanguages();
}},
'theme': { value: Setting.THEME_LIGHT, type: Setting.TYPE_INT, public: true, appTypes: ['mobile', 'desktop'], isEnum: true, label: () => _('Theme'), options: () => {
let output = {};
output[Setting.THEME_LIGHT] = _('Light');
output[Setting.THEME_DARK] = _('Dark');
return output;
}},
// 'logLevel': { value: Logger.LEVEL_INFO, type: Setting.TYPE_STRING, isEnum: true, public: true, label: () => _('Log level'), options: () => {
// return Logger.levelEnum();
// }},
@ -344,7 +350,6 @@ Setting.metadata_ = {
// nonCompleted: _('Non-completed ones only'),
// })},
'uncompletedTodosOnTop': { value: true, type: Setting.TYPE_BOOL, public: true, label: () => _('Show uncompleted todos on top of the lists') },
'showAdvancedOptions': { value: false, type: Setting.TYPE_BOOL, public: true, appTypes: ['mobile'], label: () => _('Show advanced options') },
'trackLocation': { value: true, type: Setting.TYPE_BOOL, public: true, label: () => _('Save geo-location with notes') },
'sync.interval': { value: 300, type: Setting.TYPE_INT, isEnum: true, public: true, label: () => _('Synchronisation interval'), options: () => {
return {
@ -357,12 +362,7 @@ Setting.metadata_ = {
86400: _('%d hours', 24),
};
}},
'theme': { value: Setting.THEME_LIGHT, type: Setting.TYPE_INT, public: true, appTypes: ['mobile'], isEnum: true, label: () => _('Theme'), options: () => {
let output = {};
output[Setting.THEME_LIGHT] = _('Light');
output[Setting.THEME_DARK] = _('Dark');
return output;
}},
'showAdvancedOptions': { value: false, type: Setting.TYPE_BOOL, public: true, appTypes: ['mobile', 'desktop'], label: () => _('Show advanced options') },
};
// Contains constants that are set by the application and