modify the directory structure and rename the function

This commit is contained in:
Jiaxin Peng
2023-11-02 14:32:25 +00:00
parent 9be9b18efb
commit ae9e0c14fb
8 changed files with 13 additions and 11 deletions

View File

@@ -1,8 +1,8 @@
import {App, Editor, MarkdownView, Notice, Plugin, PluginSettingTab, Setting} from "obsidian";
import {addIcons} from 'src/icon';
import {Upload2Notion} from "src/Upload2Notion";
import {Upload2NotionNext} from "src/Upload2Notion_NN";
import {i18nConfig} from "src/I18n";
import {addIcons} from 'src/ui/icon';
import {Upload2NotionGeneral} from "src/upload/Upload2NotionGeneral";
import {Upload2NotionNext} from "src/upload/Upload2NotionNext";
import {i18nConfig} from "src/lang/I18n";
import ribbonCommands from "src/NotionCommands";
// Remember to rename these classes and interfaces!
@@ -88,14 +88,16 @@ export default class ObsidianSyncNotionPlugin extends Plugin {
if (markDownData) {
const {basename} = nowFile;
let upload;
let res;
if (NNon) {
upload = new Upload2NotionNext(this);
res = await upload.syncMarkdownToNotionNext(basename, emoji, cover, tags, type, slug, stats, category, summary, paword, favicon, datetime, markDownData, nowFile, this.app, this.settings);
} else {
upload = new Upload2Notion(this);
upload = new Upload2NotionGeneral(this);
res = await upload.syncMarkdownToNotionGeneral(basename, emoji, cover, tags, type, slug, stats, category, summary, paword, favicon, datetime, markDownData, nowFile, this.app, this.settings);
}
const res = await upload.syncMarkdownToNotion(basename, emoji, cover, tags, type, slug, stats, category, summary, paword, favicon, datetime, markDownData, nowFile, this.app, this.settings);
if (res.status === 200) {
new Notice(`${i18nConfig["sync-success"]}${basename}`);