Skip to content

Commit

Permalink
fix: Expose Offset and Interval parameters for Months in Creator
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Mar 8, 2024
1 parent 2e6e646 commit a8a27aa
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions src/settings/modals/month/month.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ export class MonthModal extends CanceableCalendariumModal<Month> {
(v) => (this.item.name = v)
);
});
new Setting(this.contentEl).setName("Length").addText((t) => {
t.setValue(`${this.item.length}` ?? "").onChange(
(v) => (this.item.length = Number(v))
);
t.inputEl.type = "number";
t.inputEl.min = "0";
});
new Setting(this.contentEl).setName("Type").addDropdown((d) => {
d.addOption("month", "Month");
d.addOption("intercalary", "Intercalary");
Expand All @@ -45,5 +38,26 @@ export class MonthModal extends CanceableCalendariumModal<Month> {
this.item.type = v;
});
});
new Setting(this.contentEl).setName("Length").addText((t) => {
t.setValue(`${this.item.length}` ?? "").onChange(
(v) => (this.item.length = Number(v))
);
t.inputEl.type = "number";
t.inputEl.min = "0";
});
new Setting(this.contentEl).setName("Interval").addText((t) => {
t.setValue(`${this.item.interval}` ?? "").onChange(
(v) => (this.item.interval = Number(v))
);
t.inputEl.type = "number";
t.inputEl.min = "0";
});
new Setting(this.contentEl).setName("Offset").addText((t) => {
t.setValue(`${this.item.offset}` ?? "").onChange(
(v) => (this.item.offset = Number(v))
);
t.inputEl.type = "number";
t.inputEl.min = "0";
});
}
}

0 comments on commit a8a27aa

Please sign in to comment.