Skip to content

Commit

Permalink
fix: placeholder invisible
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Feb 14, 2023
1 parent 79f9024 commit 8350184
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion plugin/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const DEFAULT_FOLDER_SETTINGS: FolderSettings = {
type: TemplateType.none,
format: "",
position: Position.append,
separator: " ",
separator: "",
},
fileName: "Untitled",
opening: DefaultOpening.newTab,
Expand Down
16 changes: 9 additions & 7 deletions plugin/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class AddFolderModal extends Modal {
.setDesc(desc)
.addText(cb => {
cb
.setPlaceholder("YYYY-MM-DD")
.setValue(this.result.template.format)
.onChange((value) => {
this.result.template.format = value as string;
Expand All @@ -51,6 +52,7 @@ export class AddFolderModal extends Modal {
} else if (TemplateType.folderName === this.result.template.type) {
this.result.template.format = this.result.path.split("/").pop() as string;
}

new Setting(contentEl)
.setName(t("template.position.title") as string)
.addDropdown(cb => {
Expand All @@ -62,14 +64,14 @@ export class AddFolderModal extends Modal {
this.result.template.position = value as Position;
});
})

.addText(cb => {
cb.inputEl.classList.add("input-small");
cb
.setPlaceholder(t("template.separator") as string)
.setValue(this.result.template.separator)
.onChange((value) => {
this.result.template.separator = value as string;
});
cb.inputEl.style.width = "30%";
cb.setPlaceholder(t("template.separator") as string);
cb.setValue(this.result.template.separator);
cb.onChange((value) => {
this.result.template.separator = value as string;
});
});
}
return paramName;
Expand Down

0 comments on commit 8350184

Please sign in to comment.