mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-31 01:48:35 +08:00
Added custom banner url
This commit is contained in:
16
main.ts
16
main.ts
@@ -22,12 +22,14 @@ import { Upload2Notion } from "Upload2Notion";
|
||||
interface MyPluginSettings {
|
||||
notionAPI: string;
|
||||
databaseID: string;
|
||||
bannerUrl: string;
|
||||
proxy: string;
|
||||
}
|
||||
|
||||
const DEFAULT_SETTINGS: MyPluginSettings = {
|
||||
notionAPI: "",
|
||||
databaseID: "",
|
||||
bannerUrl: "",
|
||||
proxy: "",
|
||||
};
|
||||
|
||||
@@ -185,6 +187,20 @@ class SampleSettingTab extends PluginSettingTab {
|
||||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("Banner Url")
|
||||
.setDesc("page banner url")
|
||||
.addText((text) =>
|
||||
text
|
||||
.setPlaceholder("Enter banner pic url: ")
|
||||
.setValue(this.plugin.settings.bannerUrl)
|
||||
.onChange(async (value) => {
|
||||
console.log("Secret: " + value);
|
||||
this.plugin.settings.bannerUrl = value;
|
||||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user