mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
feat(time_selector): add minimumSeconds class property
This commit is contained in:
parent
50d37bbcb1
commit
fd2c65dcc0
@ -9,6 +9,7 @@ type TimeSelectorConstructor = {
|
||||
optionValueId: keyof OptionDefinitions;
|
||||
optionTimeScaleId: keyof OptionDefinitions;
|
||||
includedTimeScales?: Set<TimeSelectorScale>;
|
||||
minimumSeconds?: number;
|
||||
};
|
||||
|
||||
type TimeSelectorScale = "seconds" | "minutes" | "hours" | "days";
|
||||
@ -43,6 +44,7 @@ export default class TimeSelector extends OptionsWidget {
|
||||
private optionValueId: keyof OptionDefinitions;
|
||||
private optionTimeScaleId: keyof OptionDefinitions;
|
||||
private includedTimeScales: Set<TimeSelectorScale>;
|
||||
private minimumSeconds: number;
|
||||
|
||||
constructor(options: TimeSelectorConstructor) {
|
||||
super();
|
||||
@ -51,6 +53,7 @@ export default class TimeSelector extends OptionsWidget {
|
||||
this.optionValueId = options.optionValueId;
|
||||
this.optionTimeScaleId = options.optionTimeScaleId;
|
||||
this.includedTimeScales = !options.includedTimeScales ? new Set(["seconds", "minutes", "hours", "days"]) : options.includedTimeScales;
|
||||
this.minimumSeconds = options.minimumSeconds || 0
|
||||
}
|
||||
|
||||
doRender() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user