mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
User Settings General messages per page use <input number instead of select
This commit is contained in:
parent
023c8f603b
commit
081761b593
4 changed files with 7 additions and 17 deletions
|
|
@ -1,3 +1 @@
|
|||
export const MESSAGES_PER_PAGE_VALUES = [10, 20, 30, 50, 100];
|
||||
|
||||
export const UNUSED_OPTION_VALUE = '__UNUSE__';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { MESSAGES_PER_PAGE_VALUES } from 'Common/Consts';
|
||||
import { SaveSettingsStep } from 'Common/Enums';
|
||||
import { EditorDefaultType, Layout } from 'Common/EnumsUser';
|
||||
import { Settings, SettingsGet } from 'Common/Globals';
|
||||
|
|
@ -27,7 +26,6 @@ export class GeneralUserSettings {
|
|||
this.languages = LanguageStore.languages;
|
||||
this.messageReadDelay = SettingsUserStore.messageReadDelay;
|
||||
this.messagesPerPage = SettingsUserStore.messagesPerPage;
|
||||
this.messagesPerPageArray = MESSAGES_PER_PAGE_VALUES;
|
||||
|
||||
this.editorDefaultType = SettingsUserStore.editorDefaultType;
|
||||
this.layout = SettingsUserStore.layout;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { MESSAGES_PER_PAGE_VALUES } from 'Common/Consts';
|
||||
import { Layout, EditorDefaultType } from 'Common/EnumsUser';
|
||||
import { pInt, addObservablesTo } from 'Common/Utils';
|
||||
import { $htmlCL, SettingsGet } from 'Common/Globals';
|
||||
|
|
@ -21,10 +20,12 @@ export const SettingsUserStore = new class {
|
|||
]
|
||||
});
|
||||
|
||||
this.messagesPerPage = ko.observable(SettingsGet('MPP')).extend({ limitedList: MESSAGES_PER_PAGE_VALUES });
|
||||
this.messagesPerPage = ko.observable(pInt(SettingsGet('MPP'))).extend(
|
||||
{ rateLimit: { timeout: 999, method: "notifyWhenChangesStop" } }
|
||||
);
|
||||
|
||||
this.messageReadDelay = ko.observable(pInt(SettingsGet('MessageReadDelay'))).extend(
|
||||
{ rateLimit: { timeout: 500, method: "notifyWhenChangesStop" } }
|
||||
{ rateLimit: { timeout: 999, method: "notifyWhenChangesStop" } }
|
||||
);
|
||||
|
||||
addObservablesTo(this, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue