User Settings General messages per page use <input number instead of select

This commit is contained in:
djmaze 2021-09-03 16:40:16 +02:00
parent 023c8f603b
commit 081761b593
4 changed files with 7 additions and 17 deletions

View file

@ -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, {