mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-29 08:08:34 +08:00
reorganise the setting coding
This commit is contained in:
@@ -142,19 +142,9 @@ export class ObsidianSettingTab extends PluginSettingTab {
|
||||
})
|
||||
);
|
||||
|
||||
const notionAPINextEl = containerEl.createDiv('api-next', (div) => {
|
||||
div.style.alignItems = "center";
|
||||
div.style.borderTop = "none";
|
||||
div.style.paddingBottom = "0";
|
||||
}
|
||||
);
|
||||
const notionAPINextEl = this.createStyleDiv('api-next')
|
||||
|
||||
const databaseIDNextEl = containerEl.createDiv('databaseID-next', (div) => {
|
||||
div.style.alignItems = "center";
|
||||
div.style.borderTop = "none";
|
||||
div.style.paddingBottom = "0";
|
||||
}
|
||||
);
|
||||
const databaseIDNextEl = this.createStyleDiv('databaseID-next')
|
||||
|
||||
|
||||
|
||||
@@ -274,18 +264,9 @@ export class ObsidianSettingTab extends PluginSettingTab {
|
||||
})
|
||||
);
|
||||
|
||||
const CustomTitleEl = containerEl.createDiv('api-general', (div) => {
|
||||
div.style.alignItems = "center";
|
||||
div.style.borderTop = "none";
|
||||
div.style.paddingBottom = "0";
|
||||
}
|
||||
);
|
||||
const CustomTitleEl = this.createStyleDiv('custom-title');
|
||||
|
||||
const dynamicSettingContainer = containerEl.createDiv('setting-popover', (div) => {
|
||||
div.style.alignItems = "center";
|
||||
div.style.borderTop = "none";
|
||||
div.style.paddingBottom = "0";
|
||||
});
|
||||
const dynamicSettingContainer = this.createStyleDiv('dynamic-setting');
|
||||
|
||||
// new Setting(containerEl)
|
||||
// .setName("Convert tags(optional)")
|
||||
@@ -299,21 +280,9 @@ export class ObsidianSettingTab extends PluginSettingTab {
|
||||
// })
|
||||
// );
|
||||
|
||||
const notionAPIGeneralEl = this.createStyleDiv('api-general');
|
||||
|
||||
const notionAPIGeneralEl = containerEl.createDiv('api-general', (div) => {
|
||||
div.style.alignItems = "center";
|
||||
div.style.borderTop = "none";
|
||||
div.style.paddingBottom = "0";
|
||||
}
|
||||
);
|
||||
|
||||
const databaseIDGeneralEl = containerEl.createDiv('databaseID-general', (div) => {
|
||||
div.style.alignItems = "center";
|
||||
div.style.borderTop = "none";
|
||||
div.style.paddingBottom = "0";
|
||||
}
|
||||
);
|
||||
|
||||
const databaseIDGeneralEl = this.createStyleDiv('databaseID-general');
|
||||
|
||||
// Custom Database Settings
|
||||
|
||||
@@ -331,4 +300,23 @@ export class ObsidianSettingTab extends PluginSettingTab {
|
||||
// })
|
||||
// );
|
||||
}
|
||||
|
||||
// create a function to create a div with a style for pop over elements
|
||||
private createStyleDiv(className: string | DomElementInfo) {
|
||||
return this.containerEl.createDiv(className, (div) => {
|
||||
div.style.alignItems = "center";
|
||||
div.style.borderTop = "none";
|
||||
div.style.paddingBottom = "0";
|
||||
});
|
||||
}
|
||||
|
||||
// function to add one setting element in the setting tab.
|
||||
private createSettingEl() {
|
||||
|
||||
}
|
||||
|
||||
// update the setting display style in the setting tab
|
||||
private updateSettingEl() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user