mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
More JSON properties to JavaScript camelCase
This commit is contained in:
parent
07f6b7545a
commit
d1823af111
21 changed files with 83 additions and 80 deletions
|
|
@ -27,7 +27,7 @@ export class AdminApp extends AbstractApp {
|
|||
rl.route.root();
|
||||
setTimeout(() => location.href = '/', 1);
|
||||
} else if (SettingsGet('Auth')) {
|
||||
this.weakPassword(SettingsGet('WeakPassword'));
|
||||
this.weakPassword(SettingsGet('weakPassword'));
|
||||
startScreens([SettingsAdminScreen]);
|
||||
} else {
|
||||
startScreens([LoginAdminScreen]);
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ export class AppUser extends AbstractApp {
|
|||
? items.map(oValue => new AccountModel(oValue.email, oValue.name))
|
||||
: []
|
||||
);
|
||||
AccountUserStore.unshift(new AccountModel(SettingsGet('MainEmail'), '', false));
|
||||
AccountUserStore.unshift(new AccountModel(SettingsGet('mainEmail'), '', false));
|
||||
|
||||
items = oData.Result.Identities;
|
||||
IdentityUserStore(isArray(items)
|
||||
|
|
@ -204,7 +204,7 @@ export class AppUser extends AbstractApp {
|
|||
|
||||
refresh() {
|
||||
ThemeStore.populate();
|
||||
LanguageStore.language(SettingsGet('Language'));
|
||||
LanguageStore.language(SettingsGet('language'));
|
||||
changeTheme(SettingsGet('Theme'));
|
||||
this.start();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export const
|
|||
*/
|
||||
serverRequestRaw = (type, hash) =>
|
||||
BASE + '?/Raw/' + SUB_QUERY_PREFIX + '/'
|
||||
+ '0/' // Settings.get('AccountHash') ?
|
||||
+ '0/' // Settings.get('accountHash') ?
|
||||
+ (type
|
||||
? type + '/' + (hash ? SUB_QUERY_PREFIX + '/' + hash : '')
|
||||
: ''),
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class RemoteUserFetch extends AbstractFetchRemote {
|
|||
|
||||
let sGetAdd = '';
|
||||
if (folderETag) {
|
||||
params.hash = folderETag + '-' + SettingsGet('AccountHash');
|
||||
params.hash = folderETag + '-' + SettingsGet('accountHash');
|
||||
sGetAdd = 'MessageList/' + SUB_QUERY_PREFIX + '/' + b64EncodeJSONSafe(params);
|
||||
params = {};
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ class RemoteUserFetch extends AbstractFetchRemote {
|
|||
sFolderFullName,
|
||||
iUid,
|
||||
AppUserStore.threadsAllowed() && SettingsUserStore.useThreads() ? 1 : 0,
|
||||
SettingsGet('AccountHash')
|
||||
SettingsGet('accountHash')
|
||||
])
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ export class AdminSettingsContacts extends AbstractViewSettings {
|
|||
super();
|
||||
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
|
||||
|
||||
this.addSetting('ContactsPdoDsn');
|
||||
this.addSetting('ContactsPdoUser');
|
||||
this.addSetting('ContactsPdoPassword');
|
||||
this.addSetting('ContactsPdoType', () => {
|
||||
this.addSetting('contactsPdoDsn');
|
||||
this.addSetting('contactsPdoUser');
|
||||
this.addSetting('contactsPdoPassword');
|
||||
this.addSetting('contactsPdoType', () => {
|
||||
this.testContactsSuccess(false);
|
||||
this.testContactsError(false);
|
||||
this.testContactsErrorMessage('');
|
||||
|
|
@ -31,7 +31,7 @@ export class AdminSettingsContacts extends AbstractViewSettings {
|
|||
testContactsErrorMessage: ''
|
||||
});
|
||||
|
||||
this.addSetting('ContactsSuggestionsLimit');
|
||||
this.addSetting('contactsSuggestionsLimit');
|
||||
|
||||
const supportedTypes = SettingsGet('supportedPdoDrivers') || [],
|
||||
types = [{
|
||||
|
|
@ -92,10 +92,10 @@ export class AdminSettingsContacts extends AbstractViewSettings {
|
|||
|
||||
this.testing(false);
|
||||
}, {
|
||||
ContactsPdoType: this.contactsPdoType(),
|
||||
ContactsPdoDsn: this.contactsPdoDsn(),
|
||||
ContactsPdoUser: this.contactsPdoUser(),
|
||||
ContactsPdoPassword: this.contactsPdoPassword()
|
||||
contactsPdoType: this.contactsPdoType(),
|
||||
contactsPdoDsn: this.contactsPdoDsn(),
|
||||
contactsPdoUser: this.contactsPdoUser(),
|
||||
contactsPdoPassword: this.contactsPdoPassword()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export class AdminSettingsGeneral extends AbstractViewSettings {
|
|||
|
||||
const aLanguagesAdmin = Settings.app('languagesAdmin');
|
||||
this.languagesAdmin = ko.observableArray(isArray(aLanguagesAdmin) ? aLanguagesAdmin : []);
|
||||
this.languageAdmin = ko.observable(SettingsGet('LanguageAdmin'));
|
||||
this.languageAdmin = ko.observable(SettingsGet('languageAdmin'));
|
||||
|
||||
this.theme = ThemeStore.theme;
|
||||
this.themes = ThemeStore.themes;
|
||||
|
|
@ -53,11 +53,11 @@ export class AdminSettingsGeneral extends AbstractViewSettings {
|
|||
*/
|
||||
|
||||
this.attachmentLimit = ko
|
||||
.observable(SettingsGet('AttachmentLimit') / (1024 * 1024))
|
||||
.observable(SettingsGet('attachmentLimit') / (1024 * 1024))
|
||||
.extend({ debounce: 500 });
|
||||
|
||||
this.addSetting('Language');
|
||||
this.addSetting('AttachmentLimit');
|
||||
this.addSetting('language');
|
||||
this.addSetting('attachmentLimit');
|
||||
this.addSetting('Theme', value => changeTheme(value, this.themeTrigger));
|
||||
|
||||
this.uploadData = SettingsGet('phpUploadSizes');
|
||||
|
|
@ -91,7 +91,7 @@ export class AdminSettingsGeneral extends AbstractViewSettings {
|
|||
this.languageAdminTrigger(SaveSettingStatus.Saving);
|
||||
translatorReload(value, 1)
|
||||
.then(fReloadLanguageHelper(SaveSettingStatus.Success), fReloadLanguageHelper(SaveSettingStatus.Failed))
|
||||
.then(() => Remote.saveSetting('LanguageAdmin', value));
|
||||
.then(() => Remote.saveSetting('languageAdmin', value));
|
||||
},
|
||||
|
||||
capaAdditionalAccounts: fSaveHelper('CapaAdditionalAccounts'),
|
||||
|
|
@ -114,7 +114,7 @@ export class AdminSettingsGeneral extends AbstractViewSettings {
|
|||
showScreenPopup(LanguagesPopupView, [
|
||||
this.languageAdmin,
|
||||
this.languagesAdmin(),
|
||||
SettingsGet('UserLanguageAdmin')
|
||||
SettingsGet('languageUsers')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export class AdminSettingsSecurity extends AbstractViewSettings {
|
|||
this.weakPassword = rl.app.weakPassword;
|
||||
|
||||
addObservablesTo(this, {
|
||||
adminLogin: SettingsGet('AdminLogin'),
|
||||
adminLogin: SettingsGet('adminLogin'),
|
||||
adminLoginError: false,
|
||||
adminPassword: '',
|
||||
adminPasswordNew: '',
|
||||
|
|
@ -68,7 +68,7 @@ export class AdminSettingsSecurity extends AbstractViewSettings {
|
|||
capaOpenPGP: value => Remote.saveSetting('CapaOpenPGP', value)
|
||||
});
|
||||
|
||||
this.adminTOTP(SettingsGet('AdminTOTP'));
|
||||
this.adminTOTP(SettingsGet('adminTOTP'));
|
||||
|
||||
decorateKoCommands(this, {
|
||||
saveAdminUserCommand: self => self.adminLogin().trim() && self.adminPassword()
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export class UserSettingsAccounts /*extends AbstractViewSettings*/ {
|
|||
this.accounts = AccountUserStore;
|
||||
this.loading = AccountUserStore.loading;
|
||||
this.identities = IdentityUserStore;
|
||||
this.mainEmail = SettingsGet('MainEmail');
|
||||
this.mainEmail = SettingsGet('mainEmail');
|
||||
|
||||
this.accountForDeletion = ko.observable(null).askDeleteHelper();
|
||||
this.identityForDeletion = ko.observable(null).askDeleteHelper();
|
||||
|
|
@ -88,7 +88,7 @@ export class UserSettingsAccounts /*extends AbstractViewSettings*/ {
|
|||
|
||||
accountsAndIdentitiesAfterMove() {
|
||||
Remote.request('AccountsAndIdentitiesSortOrder', null, {
|
||||
Accounts: AccountUserStore.getEmailAddresses().filter(v => v != SettingsGet('MainEmail')),
|
||||
Accounts: AccountUserStore.getEmailAddresses().filter(v => v != SettingsGet('mainEmail')),
|
||||
Identities: IdentityUserStore.map(item => (item ? item.id() : ""))
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
|||
this.languageTrigger(SaveSettingStatus.Saving);
|
||||
translatorReload(value)
|
||||
.then(fReloadLanguageHelper(SaveSettingStatus.Success), fReloadLanguageHelper(SaveSettingStatus.Failed))
|
||||
.then(() => Remote.saveSetting('Language', value));
|
||||
.then(() => Remote.saveSetting('language', value));
|
||||
},
|
||||
|
||||
hourCycle: value =>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ export const LanguageStore = {
|
|||
populate: function() {
|
||||
const aLanguages = Settings.app('languages');
|
||||
this.languages(isArray(aLanguages) ? aLanguages : []);
|
||||
this.language(SettingsGet('Language'));
|
||||
this.userLanguage(SettingsGet('UserLanguage'));
|
||||
this.language(SettingsGet('language'));
|
||||
this.userLanguage(SettingsGet('userLanguage'));
|
||||
this.hourCycle(SettingsGet('hourCycle'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { addObservablesTo } from 'External/ko';
|
|||
import { ThemeStore } from 'Stores/Theme';
|
||||
|
||||
export const AppUserStore = {
|
||||
allowContacts: () => !!SettingsGet('ContactsIsAllowed')
|
||||
allowContacts: () => !!SettingsGet('contactsAllowed')
|
||||
};
|
||||
|
||||
addObservablesTo(AppUserStore, {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export const SettingsUserStore = new class {
|
|||
let iAutoLogoutTimer;
|
||||
self.delayLogout = (() => {
|
||||
clearTimeout(iAutoLogoutTimer);
|
||||
if (0 < self.autoLogout() && !SettingsGet('AccountSignMe')) {
|
||||
if (0 < self.autoLogout() && !SettingsGet('accountSignMe')) {
|
||||
iAutoLogoutTimer = setTimeout(
|
||||
rl.app.logout,
|
||||
self.autoLogout() * 60000
|
||||
|
|
|
|||
|
|
@ -1005,7 +1005,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
clickElement: dom.querySelector('#composeUploadButton'),
|
||||
dragAndDropElement: dom.querySelector('.b-attachment-place')
|
||||
}),
|
||||
attachmentSizeLimit = pInt(SettingsGet('AttachmentLimit'));
|
||||
attachmentSizeLimit = pInt(SettingsGet('attachmentLimit'));
|
||||
|
||||
oJua
|
||||
.on('onDragEnter', () => {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ export class LoginUserView extends AbstractViewLogin {
|
|||
|
||||
if (valid) {
|
||||
this.submitRequest(true);
|
||||
data.set('Language', this.bSendLanguage ? this.language() : '');
|
||||
data.set('language', this.bSendLanguage ? this.language() : '');
|
||||
data.set('signMe', this.signMe() ? 1 : 0);
|
||||
Remote.request('Login',
|
||||
(iError, oData) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue