mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Many AppData properties to JavaScript camelCase
This commit is contained in:
parent
c53d9adaba
commit
ce2fb9d7f2
21 changed files with 82 additions and 66 deletions
|
|
@ -268,13 +268,13 @@ export class AppUser extends AbstractApp {
|
|||
navigator.registerProtocolHandler?.(
|
||||
'mailto',
|
||||
location.protocol + '//' + location.host + location.pathname + '?mailto&to=%s',
|
||||
(SettingsGet('Title') || 'SnappyMail')
|
||||
(SettingsGet('title') || 'SnappyMail')
|
||||
);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
setTimeout(() => mailToHelper(SettingsGet('MailToEmail')), 500);
|
||||
setTimeout(() => mailToHelper(SettingsGet('mailToEmail')), 500);
|
||||
} else {
|
||||
this.logout();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ export class MessageModel extends AbstractModel {
|
|||
hasImages = true;
|
||||
},
|
||||
attr = 'data-x-src',
|
||||
src, useProxy = !!SettingsGet('UseLocalProxyForExternalImages');
|
||||
src, useProxy = !!SettingsGet('useLocalProxyForExternalImages');
|
||||
body.querySelectorAll('img[' + attr + ']').forEach(node => {
|
||||
src = node.getAttribute(attr);
|
||||
if (isValid(src)) {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { AbstractViewSettings } from 'Knoin/AbstractViews';
|
|||
export class AdminSettingsBranding extends AbstractViewSettings {
|
||||
constructor() {
|
||||
super();
|
||||
this.addSetting('Title');
|
||||
this.addSetting('LoadingDescription');
|
||||
this.addSetting('FaviconUrl');
|
||||
this.addSetting('title');
|
||||
this.addSetting('loadingDescription');
|
||||
this.addSetting('faviconUrl');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export class AdminSettingsContacts extends AbstractViewSettings {
|
|||
this.testContactsErrorMessage('');
|
||||
});
|
||||
|
||||
this.addSettings(['ContactsEnable','ContactsSync']);
|
||||
this.addSettings(['contactsEnable','contactsSync']);
|
||||
|
||||
addObservablesTo(this, {
|
||||
testing: false,
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export class AdminSettingsGeneral extends AbstractViewSettings {
|
|||
this.theme = ThemeStore.theme;
|
||||
this.themes = ThemeStore.themes;
|
||||
|
||||
this.addSettings(['AllowLanguagesOnSettings']);
|
||||
this.addSettings(['allowLanguagesOnSettings']);
|
||||
|
||||
addObservablesTo(this, {
|
||||
capaThemes: SettingsCapa('Themes'),
|
||||
|
|
@ -60,7 +60,7 @@ export class AdminSettingsGeneral extends AbstractViewSettings {
|
|||
this.addSetting('AttachmentLimit');
|
||||
this.addSetting('Theme', value => changeTheme(value, this.themeTrigger));
|
||||
|
||||
this.uploadData = SettingsGet('PhpUploadSizes');
|
||||
this.uploadData = SettingsGet('phpUploadSizes');
|
||||
this.uploadDataDesc =
|
||||
(this.uploadData?.upload_max_filesize || this.uploadData?.post_max_size)
|
||||
? [
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { AbstractViewSettings } from 'Knoin/AbstractViews';
|
|||
export class AdminSettingsLogin extends AbstractViewSettings {
|
||||
constructor() {
|
||||
super();
|
||||
this.addSetting('LoginDefaultDomain');
|
||||
this.addSettings(['DetermineUserLanguage','DetermineUserDomain','AllowLanguagesOnLogin']);
|
||||
this.addSetting('loginDefaultDomain');
|
||||
this.addSettings(['determineUserLanguage','determineUserDomain','allowLanguagesOnLogin']);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export class AdminSettingsPackages extends AbstractViewSettings {
|
|||
constructor() {
|
||||
super();
|
||||
|
||||
this.addSettings(['EnabledPlugins']);
|
||||
this.addSettings(['pluginsEnable']);
|
||||
|
||||
addObservablesTo(this, {
|
||||
packagesError: ''
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export class AdminSettingsSecurity extends AbstractViewSettings {
|
|||
constructor() {
|
||||
super();
|
||||
|
||||
this.addSettings(['UseLocalProxyForExternalImages']);
|
||||
this.addSettings(['useLocalProxyForExternalImages']);
|
||||
|
||||
this.weakPassword = rl.app.weakPassword;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
|||
|
||||
this.soundNotification = SMAudio.notifications;
|
||||
this.notificationSound = ko.observable(SettingsGet('NotificationSound'));
|
||||
this.notificationSounds = ko.observableArray(SettingsGet('NewMailSounds'));
|
||||
this.notificationSounds = ko.observableArray(SettingsGet('newMailSounds'));
|
||||
|
||||
this.desktopNotification = NotificationUserStore.enabled;
|
||||
this.isDesktopNotificationAllowed = NotificationUserStore.allowed;
|
||||
|
|
@ -48,7 +48,7 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
|||
'useCheckboxesInList', 'listGrouped', 'useThreads', 'replySameFolder', 'msgDefaultAction', 'allowSpellcheck'
|
||||
].forEach(name => this[name] = SettingsUserStore[name]);
|
||||
|
||||
this.allowLanguagesOnSettings = !!SettingsGet('AllowLanguagesOnSettings');
|
||||
this.allowLanguagesOnSettings = !!SettingsGet('allowLanguagesOnSettings');
|
||||
|
||||
this.languageTrigger = ko.observable(SaveSettingStatus.Idle);
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ export class FilterPopupView extends rl.pluginPopupView {
|
|||
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
|
||||
this.folderSelectList = koComputable(() =>
|
||||
folderListOptionsBuilder(
|
||||
[rl.settings.get('SieveAllowFileintoInbox') ? '' : 'INBOX'],
|
||||
[rl.settings.get('sieveAllowFileintoInbox') ? '' : 'INBOX'],
|
||||
[['', '']],
|
||||
item => item?.localName() || ''
|
||||
)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ export const
|
|||
ThemeStore.themes(isArray(themes) ? themes : []);
|
||||
ThemeStore.theme(SettingsGet('Theme'));
|
||||
if (!ThemeStore.isMobile()) {
|
||||
ThemeStore.userBackgroundName(SettingsGet('UserBackgroundName'));
|
||||
ThemeStore.userBackgroundHash(SettingsGet('UserBackgroundHash'));
|
||||
ThemeStore.userBackgroundName(SettingsGet('userBackgroundName'));
|
||||
ThemeStore.userBackgroundHash(SettingsGet('userBackgroundHash'));
|
||||
}
|
||||
ThemeStore.fontSansSerif(SettingsGet('fontSansSerif'));
|
||||
ThemeStore.fontSerif(SettingsGet('fontSerif'));
|
||||
|
|
|
|||
|
|
@ -1292,7 +1292,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
*/
|
||||
let text = this.oEditor.getData(),
|
||||
encrypted = PgpUserStore.isEncrypted(text),
|
||||
size = SettingsGet('PhpUploadSizes')['post_max_size'],
|
||||
size = SettingsGet('phpUploadSizes')['post_max_size'],
|
||||
quota = pInt(size);
|
||||
switch (size.slice(-1)) {
|
||||
case 'G': quota *= 1024; // fallthrough
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export class LoginUserView extends AbstractViewLogin {
|
|||
super();
|
||||
|
||||
addObservablesTo(this, {
|
||||
loadingDesc: SettingsGet('LoadingDescription'),
|
||||
loadingDesc: SettingsGet('loadingDescription'),
|
||||
|
||||
email: SettingsGet('DevEmail'),
|
||||
password: SettingsGet('DevPassword'),
|
||||
|
|
@ -44,7 +44,7 @@ export class LoginUserView extends AbstractViewLogin {
|
|||
signMeType: SignMeUnused
|
||||
});
|
||||
|
||||
this.allowLanguagesOnLogin = !!SettingsGet('AllowLanguagesOnLogin');
|
||||
this.allowLanguagesOnLogin = !!SettingsGet('allowLanguagesOnLogin');
|
||||
|
||||
this.language = LanguageStore.language;
|
||||
this.languages = LanguageStore.languages;
|
||||
|
|
@ -111,7 +111,7 @@ export class LoginUserView extends AbstractViewLogin {
|
|||
if (valid) {
|
||||
this.submitRequest(true);
|
||||
data.set('Language', this.bSendLanguage ? this.language() : '');
|
||||
data.set('SignMe', this.signMe() ? 1 : 0);
|
||||
data.set('signMe', this.signMe() ? 1 : 0);
|
||||
Remote.request('Login',
|
||||
(iError, oData) => {
|
||||
fireEvent('sm-user-login-response', {
|
||||
|
|
@ -142,7 +142,7 @@ export class LoginUserView extends AbstractViewLogin {
|
|||
onBuild(dom) {
|
||||
super.onBuild(dom);
|
||||
|
||||
const signMe = (SettingsGet('SignMe') || '').toLowerCase();
|
||||
const signMe = (SettingsGet('signMe') || '').toLowerCase();
|
||||
|
||||
switch (signMe) {
|
||||
case 'defaultoff':
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ window.rl = {
|
|||
},
|
||||
|
||||
setTitle: title =>
|
||||
doc.title = (title || '') + (RL_APP_DATA.Title ? (title ? ' - ' : '') + RL_APP_DATA.Title : ''),
|
||||
doc.title = (title || '') + (RL_APP_DATA.title ? (title ? ' - ' : '') + RL_APP_DATA.title : ''),
|
||||
|
||||
initData: appData => {
|
||||
RL_APP_DATA = appData;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue