Skip to content

Commit

Permalink
🔖 v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Achuan-2 committed Nov 20, 2024
1 parent 61b2fc9 commit 25f750d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class PluginFootnote extends Plugin {

this.settingUtils.addItem({
key: "saveLocation",
value: 1,
value: '1',
type: "select",
title: this.i18n.settings.saveLocation.title,
description: this.i18n.settings.saveLocation.description,
Expand Down Expand Up @@ -127,7 +127,7 @@ export default class PluginFootnote extends Plugin {
});
this.settingUtils.addItem({
key: "footnoteRefStyle",
value: 1,
value: '1',
type: "select",
title: this.i18n.settings.footnoteRefStyle.title,
description: this.i18n.settings.footnoteRefStyle.description,
Expand Down Expand Up @@ -156,7 +156,7 @@ export default class PluginFootnote extends Plugin {
});
this.settingUtils.addItem({
key: "selectFontStyle",
value: 1,
value: '1',
type: "select",
title: this.i18n.settings.selectFontStyle.title,
description: this.i18n.settings.selectFontStyle.description,
Expand All @@ -175,7 +175,7 @@ export default class PluginFootnote extends Plugin {
});
this.settingUtils.addItem({
key: "order",
value: 1,
value: '1',
type: "select",
title: this.i18n.settings.order.title,
description: this.i18n.settings.order.description,
Expand Down Expand Up @@ -284,6 +284,7 @@ export default class PluginFootnote extends Plugin {
let currentDocTitle = currentDoc[0].content;

// 获取脚注容器标题
console.log(this.settingUtils.get("saveLocation"))
const footnoteContainerTitle = this.settingUtils.get("saveLocation") == 1
? this.settingUtils.get("footnoteContainerTitle").replace(/\$\{filename\}/g, currentDocTitle)
: this.settingUtils.get("footnoteContainerTitle2").replace(/\$\{filename\}/g, currentDocTitle);
Expand All @@ -292,6 +293,7 @@ export default class PluginFootnote extends Plugin {
let footnoteContainerID: string;
let query_res;
switch (this.settingUtils.get("saveLocation")) {
default:
case '1': // 当前文档
docID = protyle.block.id;
query_res = await sql(
Expand Down Expand Up @@ -373,10 +375,6 @@ export default class PluginFootnote extends Plugin {
}
footnoteContainerID = docID;
break;

default:
docID = protyle.block.id;
await handleFootnoteTitleContainer();
}


Expand Down

0 comments on commit 25f750d

Please sign in to comment.