mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-31 01:48:35 +08:00
update the script and support both notionnext and general database
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {i18nConfig} from "src/lang/I18n";
|
||||
import {Editor, MarkdownView} from "obsidian";
|
||||
import {FuzzySuggester, DatabaseList} from "./FuzzySuggester";
|
||||
import {uploadCommand} from "../upload/uploadCommand";
|
||||
import {uploadCommandGeneral, uploadCommandNext} from "../upload/uploadCommand";
|
||||
import ObsidianSyncNotionPlugin from "src/main";
|
||||
|
||||
// create the commands list
|
||||
@@ -12,19 +12,19 @@ export default class RibbonCommands {
|
||||
Ncommand = [
|
||||
{
|
||||
id: "share-to-notionnext",
|
||||
name: i18nConfig.ribbonIcon, // Use the translated text from i18nConfig
|
||||
name: i18nConfig.CommandName, // Use the translated text from i18nConfig
|
||||
editorCallback: async (editor: Editor, view: MarkdownView) => {
|
||||
// await this.plugin.uploadCommand()
|
||||
await uploadCommand(this.plugin, this.plugin.settings, this.plugin.app)
|
||||
await uploadCommandNext(this.plugin, this.plugin.settings, this.plugin.app)
|
||||
}
|
||||
},
|
||||
// {
|
||||
// id: "share-to-notion",
|
||||
// name: i18nConfig.CommandNameGeneral, // Use the translated text from i18nConfig
|
||||
// editorCallback: async (editor: Editor, view: MarkdownView) => {
|
||||
// await this.plugin.upload();
|
||||
// }
|
||||
// }
|
||||
{
|
||||
id: "share-to-notion",
|
||||
name: i18nConfig.CommandNameGeneral, // Use the translated text from i18nConfig
|
||||
editorCallback: async (editor: Editor, view: MarkdownView) => {
|
||||
await uploadCommandGeneral(this.plugin, this.plugin.settings, this.plugin.app);
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
async ribbonDisplay() {
|
||||
|
||||
Reference in New Issue
Block a user