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