mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-29 16:35:57 +08:00
modify the directory structure and rename the function
This commit is contained in:
14
src/main.ts
14
src/main.ts
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user