mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-29 08:08:34 +08:00
Added right share url link
This commit is contained in:
18
main.ts
18
main.ts
@@ -22,6 +22,7 @@ interface PluginSettings {
|
||||
notionAPI: string;
|
||||
databaseID: string;
|
||||
bannerUrl: string;
|
||||
notionID: string;
|
||||
proxy: string;
|
||||
langConfig: any;
|
||||
}
|
||||
@@ -30,6 +31,7 @@ const DEFAULT_SETTINGS: PluginSettings = {
|
||||
notionAPI: "",
|
||||
databaseID: "",
|
||||
bannerUrl: "",
|
||||
notionID: "",
|
||||
proxy: "",
|
||||
langConfig: NoticeMConfig( window.localStorage.getItem('language') || 'en')
|
||||
};
|
||||
@@ -84,7 +86,7 @@ export default class ObsidianSyncNotionPlugin extends Plugin {
|
||||
if (markDownData) {
|
||||
const { basename } = nowFile;
|
||||
const upload = new Upload2Notion(this);
|
||||
const res = await upload.syncMarkdownToNotion(basename, markDownData,nowFile, this.app)
|
||||
const res = await upload.syncMarkdownToNotion(basename, markDownData,nowFile, this.app, this.settings)
|
||||
if(res.status === 200){
|
||||
new Notice(`${this.settings.langConfig["sync-success"]}${basename}`)
|
||||
}else {
|
||||
@@ -179,5 +181,19 @@ class SampleSettingTab extends PluginSettingTab {
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("Notion ID(optional)")
|
||||
.setDesc("Your notion ID(optional),share link likes:https://username.notion.site/,your notion id is [username]")
|
||||
.addText((text) =>
|
||||
text
|
||||
.setPlaceholder("Enter notion ID(options) ")
|
||||
.setValue(this.plugin.settings.notionID)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.notionID = value;
|
||||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user