mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-04 11:49:02 +08:00
fix: correct variable name obsidianVault in Obsidian export (#6796)
This commit is contained in:
parent
ecf770e183
commit
a4aab3fd4e
@ -405,11 +405,11 @@ export const exportMarkdownToYuque = async (title: string, content: string) => {
|
|||||||
export const exportMarkdownToObsidian = async (attributes: any) => {
|
export const exportMarkdownToObsidian = async (attributes: any) => {
|
||||||
try {
|
try {
|
||||||
// 从参数获取Vault名称
|
// 从参数获取Vault名称
|
||||||
const obsidianValut = attributes.vault
|
const obsidianVault = attributes.vault
|
||||||
let obsidianFolder = attributes.folder || ''
|
let obsidianFolder = attributes.folder || ''
|
||||||
let isMarkdownFile = false
|
let isMarkdownFile = false
|
||||||
|
|
||||||
if (!obsidianValut) {
|
if (!obsidianVault) {
|
||||||
window.message.error(i18n.t('chat.topics.export.obsidian_not_configured'))
|
window.message.error(i18n.t('chat.topics.export.obsidian_not_configured'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -441,7 +441,7 @@ export const exportMarkdownToObsidian = async (attributes: any) => {
|
|||||||
filePath = obsidianFolder + fileName + '.md'
|
filePath = obsidianFolder + fileName + '.md'
|
||||||
}
|
}
|
||||||
|
|
||||||
let obsidianUrl = `obsidian://new?file=${encodeURIComponent(filePath)}&vault=${encodeURIComponent(obsidianValut)}&clipboard`
|
let obsidianUrl = `obsidian://new?file=${encodeURIComponent(filePath)}&vault=${encodeURIComponent(obsidianVault)}&clipboard`
|
||||||
|
|
||||||
if (attributes.processingMethod === '3') {
|
if (attributes.processingMethod === '3') {
|
||||||
obsidianUrl += '&overwrite=true'
|
obsidianUrl += '&overwrite=true'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user