mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-29 08:08:34 +08:00
fix the error of the display of title custom button
This commit is contained in:
@@ -177,9 +177,9 @@ export class EditModal extends SettingModal {
|
||||
.setDesc(i18nConfig.NotionCustomTitleDesc)
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(this.dataTemp.CustomTitleButtonTemp)
|
||||
.setValue(this.dataTemp.customTitleButtonTemp)
|
||||
.onChange(async (value) => {
|
||||
this.dataTemp.CustomTitleButtonTemp = value;
|
||||
this.dataTemp.customTitleButtonTemp = value;
|
||||
|
||||
this.updateSettingEl(CustomNameEl, value)
|
||||
|
||||
@@ -192,8 +192,8 @@ export class EditModal extends SettingModal {
|
||||
|
||||
|
||||
// add custom title name
|
||||
const CustomNameEl = this.createStyleDiv('custom-name', (this.dataTemp.CustomTitleButtonTemp), nextTabs);
|
||||
this.createSettingEl(CustomNameEl, i18nConfig.NotionCustomTitleName, i18nConfig.NotionCustomTitleNameDesc, 'text', i18nConfig.NotionCustomTitleText, this.dataTemp.CustomTitleNameTemp,'dataTemp', 'CustomTitleNameTemp')
|
||||
const CustomNameEl = this.createStyleDiv('custom-name', (this.dataTemp.customTitleButtonTemp), nextTabs);
|
||||
this.createSettingEl(CustomNameEl, i18nConfig.NotionCustomTitleName, i18nConfig.NotionCustomTitleNameDesc, 'text', i18nConfig.NotionCustomTitleText, this.dataTemp.customTitleNameTemp,'dataTemp', 'customTitleNameTemp')
|
||||
|
||||
|
||||
// add api key
|
||||
@@ -236,7 +236,7 @@ export class EditModal extends SettingModal {
|
||||
this.createSettingEl(nextTabs, i18nConfig.DatabaseID, i18nConfig.NotionAPIDesc, 'password', i18nConfig.DatabaseIDText, this.dataTemp.databaseIDTemp, 'dataTemp', 'databaseIDTemp')
|
||||
|
||||
// add custom title name
|
||||
this.createSettingEl(nextTabs, i18nConfig.NotionCustomTitleName, i18nConfig.NotionCustomTitleNameDesc, 'text', i18nConfig.NotionCustomTitleText, this.dataTemp.CustomTitleNameTemp, 'dataTemp', 'CustomTitleNameTemp')
|
||||
this.createSettingEl(nextTabs, i18nConfig.NotionCustomTitleName, i18nConfig.NotionCustomTitleNameDesc, 'text', i18nConfig.NotionCustomTitleText, this.dataTemp.customTitleNameTemp, 'dataTemp', 'customTitleNameTemp')
|
||||
|
||||
// add new property button
|
||||
new Setting(nextTabs)
|
||||
|
||||
@@ -155,9 +155,9 @@ export class SettingModal extends Modal {
|
||||
.setDesc(i18nConfig.NotionCustomTitleDesc)
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(this.data.CustomTitleButton)
|
||||
.setValue(this.data.customTitleButton)
|
||||
.onChange(async (value) => {
|
||||
this.data.CustomTitleButton = value;
|
||||
this.data.customTitleButton = value;
|
||||
|
||||
this.updateSettingEl(CustomNameEl, value)
|
||||
|
||||
@@ -170,8 +170,8 @@ export class SettingModal extends Modal {
|
||||
|
||||
|
||||
// add custom title name
|
||||
const CustomNameEl = this.createStyleDiv('custom-name', (this.data.CustomTitleButton), nextTabs);
|
||||
this.createSettingEl(CustomNameEl, i18nConfig.NotionCustomTitleName, i18nConfig.NotionCustomTitleNameDesc, 'text', i18nConfig.NotionCustomTitleText, this.data.CustomTitleName, 'data', 'CustomTitleName')
|
||||
const CustomNameEl = this.createStyleDiv('custom-name', (this.data.customTitleButton), nextTabs);
|
||||
this.createSettingEl(CustomNameEl, i18nConfig.NotionCustomTitleName, i18nConfig.NotionCustomTitleNameDesc, 'text', i18nConfig.NotionCustomTitleText, this.data.customTitleName, 'data', 'customTitleName')
|
||||
|
||||
|
||||
// add api key
|
||||
@@ -199,6 +199,7 @@ export class SettingModal extends Modal {
|
||||
this.createSettingEl(nextTabs, i18nConfig.DatabaseID, i18nConfig.NotionAPIDesc, 'password', i18nConfig.DatabaseIDText, this.data.databaseID, 'data', 'databaseID')
|
||||
|
||||
} else if (value === 'custom') {
|
||||
|
||||
nextTabs.createEl('h3', {text: i18nConfig.NotionCustomSettingHeader});
|
||||
|
||||
// add full name
|
||||
@@ -214,7 +215,7 @@ export class SettingModal extends Modal {
|
||||
this.createSettingEl(nextTabs, i18nConfig.DatabaseID, i18nConfig.NotionAPIDesc, 'password', i18nConfig.DatabaseIDText, this.data.databaseID, 'data', 'databaseID')
|
||||
|
||||
// add custom title name
|
||||
this.createSettingEl(nextTabs, i18nConfig.NotionCustomTitleName, i18nConfig.NotionCustomTitleNameDesc, 'text', i18nConfig.NotionCustomTitleText, this.data.CustomTitleName, 'data', 'CustomTitleName')
|
||||
this.createSettingEl(nextTabs, i18nConfig.NotionCustomTitleName, i18nConfig.NotionCustomTitleNameDesc, 'text', i18nConfig.NotionCustomTitleText, this.data.customTitleName, 'data', 'customTitleName')
|
||||
|
||||
// add new property button
|
||||
new Setting(nextTabs)
|
||||
|
||||
@@ -16,8 +16,8 @@ export interface PluginSettings {
|
||||
proxy: string;
|
||||
GeneralButton: boolean;
|
||||
tagButton: boolean;
|
||||
CustomTitleButton: boolean;
|
||||
CustomTitleName: string;
|
||||
customTitleButton: boolean;
|
||||
customTitleName: string;
|
||||
notionAPIGeneral: string;
|
||||
databaseIDGeneral: string;
|
||||
CustomButton: boolean;
|
||||
@@ -51,8 +51,8 @@ export const DEFAULT_SETTINGS: PluginSettings = {
|
||||
proxy: "",
|
||||
GeneralButton: true,
|
||||
tagButton: true,
|
||||
CustomTitleButton: false,
|
||||
CustomTitleName: "",
|
||||
customTitleButton: false,
|
||||
customTitleName: "",
|
||||
notionAPIGeneral: "",
|
||||
databaseIDGeneral: "",
|
||||
CustomButton: false,
|
||||
|
||||
Reference in New Issue
Block a user