Improved js minification

This commit is contained in:
djmaze 2021-01-26 11:46:30 +01:00
parent 8884adcb72
commit b31bf3d7f5
16 changed files with 99 additions and 150 deletions

View file

@ -20,17 +20,18 @@ export class SecurityUserSettings {
this.autoLogout = SettinsStore.autoLogout;
this.autoLogout.trigger = ko.observable(SaveSettingsStep.Idle);
let i18nLogout = (key, params) => i18n('SETTINGS_SECURITY/AUTOLOGIN_' + key, params);
this.autoLogoutOptions = ko.computed(() => {
translatorTrigger();
return [
{ 'id': 0, 'name': i18n('SETTINGS_SECURITY/AUTOLOGIN_NEVER_OPTION_NAME') },
{ 'id': 5, 'name': i18n('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', { 'MINUTES': 5 }) },
{ 'id': 10, 'name': i18n('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', { 'MINUTES': 10 }) },
{ 'id': 30, 'name': i18n('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', { 'MINUTES': 30 }) },
{ 'id': 60, 'name': i18n('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', { 'MINUTES': 60 }) },
{ 'id': 60 * 2, 'name': i18n('SETTINGS_SECURITY/AUTOLOGIN_HOURS_OPTION_NAME', { 'HOURS': 2 }) },
{ 'id': 60 * 5, 'name': i18n('SETTINGS_SECURITY/AUTOLOGIN_HOURS_OPTION_NAME', { 'HOURS': 5 }) },
{ 'id': 60 * 10, 'name': i18n('SETTINGS_SECURITY/AUTOLOGIN_HOURS_OPTION_NAME', { 'HOURS': 10 }) }
{ 'id': 0, 'name': i18nLogout('NEVER_OPTION_NAME') },
{ 'id': 5, 'name': i18nLogout('MINUTES_OPTION_NAME', { 'MINUTES': 5 }) },
{ 'id': 10, 'name': i18nLogout('MINUTES_OPTION_NAME', { 'MINUTES': 10 }) },
{ 'id': 30, 'name': i18nLogout('MINUTES_OPTION_NAME', { 'MINUTES': 30 }) },
{ 'id': 60, 'name': i18nLogout('MINUTES_OPTION_NAME', { 'MINUTES': 60 }) },
{ 'id': 60 * 2, 'name': i18nLogout('HOURS_OPTION_NAME', { 'HOURS': 2 }) },
{ 'id': 60 * 5, 'name': i18nLogout('HOURS_OPTION_NAME', { 'HOURS': 5 }) },
{ 'id': 60 * 10, 'name': i18nLogout('HOURS_OPTION_NAME', { 'HOURS': 10 }) }
];
});
}