Skip to content

Commit b723b1d

Browse files
committed
chore: resolve conflict
1 parent a8bf07e commit b723b1d

File tree

1 file changed

+0
-192
lines changed

1 file changed

+0
-192
lines changed

src/setting.ts

Lines changed: 0 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -508,199 +508,7 @@ export class TaskProgressBarSettingTab extends PluginSettingTab {
508508
}
509509

510510
private displayTimeParsingSettings(containerEl: HTMLElement): void {
511-
<<<<<<< HEAD
512511
renderTimeParsingSettingsTab(this, containerEl);
513-
=======
514-
containerEl.createEl("h2", { text: t("Time Parsing Settings") });
515-
516-
// Enable Time Parsing
517-
new Setting(containerEl)
518-
.setName(t("Enable Time Parsing"))
519-
.setDesc(
520-
t(
521-
"Automatically parse natural language time expressions in Quick Capture"
522-
)
523-
)
524-
.addToggle((toggle) =>
525-
toggle
526-
.setValue(this.plugin.settings.timeParsing?.enabled ?? true)
527-
.onChange(async (value) => {
528-
if (!this.plugin.settings.timeParsing) {
529-
this.plugin.settings.timeParsing = {
530-
enabled: value,
531-
supportedLanguages: ["en", "zh"],
532-
dateKeywords: {
533-
start: [
534-
"start",
535-
"begin",
536-
"from",
537-
"开始",
538-
"从",
539-
],
540-
due: [
541-
"due",
542-
"deadline",
543-
"by",
544-
"until",
545-
"截止",
546-
"到期",
547-
"之前",
548-
],
549-
scheduled: [
550-
"scheduled",
551-
"on",
552-
"at",
553-
"安排",
554-
"计划",
555-
"在",
556-
],
557-
},
558-
removeOriginalText: true,
559-
perLineProcessing: false,
560-
realTimeReplacement: false,
561-
};
562-
} else {
563-
this.plugin.settings.timeParsing.enabled = value;
564-
}
565-
this.applySettingsUpdate();
566-
})
567-
);
568-
569-
// Remove Original Text
570-
new Setting(containerEl)
571-
.setName(t("Remove Original Time Expressions"))
572-
.setDesc(t("Remove parsed time expressions from the task text"))
573-
.addToggle((toggle) =>
574-
toggle
575-
.setValue(
576-
this.plugin.settings.timeParsing?.removeOriginalText ??
577-
true
578-
)
579-
.onChange(async (value) => {
580-
if (!this.plugin.settings.timeParsing) return;
581-
this.plugin.settings.timeParsing.removeOriginalText =
582-
value;
583-
this.applySettingsUpdate();
584-
})
585-
);
586-
587-
// Supported Languages
588-
containerEl.createEl("h3", { text: t("Supported Languages") });
589-
containerEl.createEl("p", {
590-
text: t(
591-
"Currently supports English and Chinese time expressions. More languages may be added in future updates."
592-
),
593-
cls: "setting-item-description",
594-
});
595-
596-
// Date Keywords Configuration
597-
containerEl.createEl("h3", { text: t("Date Keywords Configuration") });
598-
599-
// Start Date Keywords
600-
new Setting(containerEl)
601-
.setName(t("Start Date Keywords"))
602-
.setDesc(t("Keywords that indicate start dates (comma-separated)"))
603-
.addTextArea((text) => {
604-
const keywords =
605-
this.plugin.settings.timeParsing?.dateKeywords?.start || [];
606-
text.setValue(keywords.join(", "))
607-
.setPlaceholder("start, begin, from, 开始, 从")
608-
.onChange(async (value) => {
609-
if (!this.plugin.settings.timeParsing) return;
610-
this.plugin.settings.timeParsing.dateKeywords.start =
611-
value
612-
.split(",")
613-
.map((k) => k.trim())
614-
.filter((k) => k.length > 0);
615-
this.applySettingsUpdate();
616-
});
617-
text.inputEl.rows = 2;
618-
});
619-
620-
// Due Date Keywords
621-
new Setting(containerEl)
622-
.setName(t("Due Date Keywords"))
623-
.setDesc(t("Keywords that indicate due dates (comma-separated)"))
624-
.addTextArea((text) => {
625-
const keywords =
626-
this.plugin.settings.timeParsing?.dateKeywords?.due || [];
627-
text.setValue(keywords.join(", "))
628-
.setPlaceholder(
629-
"due, deadline, by, until, 截止, 到期, 之前"
630-
)
631-
.onChange(async (value) => {
632-
if (!this.plugin.settings.timeParsing) return;
633-
this.plugin.settings.timeParsing.dateKeywords.due =
634-
value
635-
.split(",")
636-
.map((k) => k.trim())
637-
.filter((k) => k.length > 0);
638-
this.applySettingsUpdate();
639-
});
640-
text.inputEl.rows = 2;
641-
});
642-
643-
// Scheduled Date Keywords
644-
new Setting(containerEl)
645-
.setName(t("Scheduled Date Keywords"))
646-
.setDesc(
647-
t("Keywords that indicate scheduled dates (comma-separated)")
648-
)
649-
.addTextArea((text) => {
650-
const keywords =
651-
this.plugin.settings.timeParsing?.dateKeywords?.scheduled ||
652-
[];
653-
text.setValue(keywords.join(", "))
654-
.setPlaceholder("scheduled, on, at, 安排, 计划, 在")
655-
.onChange(async (value) => {
656-
if (!this.plugin.settings.timeParsing) return;
657-
this.plugin.settings.timeParsing.dateKeywords.scheduled =
658-
value
659-
.split(",")
660-
.map((k) => k.trim())
661-
.filter((k) => k.length > 0);
662-
this.applySettingsUpdate();
663-
});
664-
text.inputEl.rows = 2;
665-
});
666-
667-
// Examples
668-
containerEl.createEl("h3", { text: t("Examples") });
669-
const examplesEl = containerEl.createEl("div", {
670-
cls: "time-parsing-examples",
671-
});
672-
673-
const examples = [
674-
{ input: "go to bed tomorrow", output: "go to bed 📅 2025-01-05" },
675-
{ input: "meeting next week", output: "meeting 📅 2025-01-11" },
676-
{ input: "project due by Friday", output: "project 📅 2025-01-04" },
677-
{ input: "明天开会", output: "开会 📅 2025-01-05" },
678-
{ input: "3天后完成", output: "完成 📅 2025-01-07" },
679-
];
680-
681-
examples.forEach((example) => {
682-
const exampleEl = examplesEl.createEl("div", {
683-
cls: "time-parsing-example",
684-
});
685-
exampleEl.createEl("span", {
686-
text: "Input: ",
687-
cls: "example-label",
688-
});
689-
exampleEl.createEl("code", {
690-
text: example.input,
691-
cls: "example-input",
692-
});
693-
exampleEl.createEl("br");
694-
exampleEl.createEl("span", {
695-
text: "Output: ",
696-
cls: "example-label",
697-
});
698-
exampleEl.createEl("code", {
699-
text: example.output,
700-
cls: "example-output",
701-
});
702-
});
703-
>>>>>>> ead40d2 (fix: tests issue)
704512
}
705513

706514
private displayTimelineSidebarSettings(containerEl: HTMLElement): void {

0 commit comments

Comments
 (0)