Skip to content

Commit e4b27f3

Browse files
committed
feat(useHost): Disable auto hosting settings.
1 parent b91a4a5 commit e4b27f3

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

src/settings.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -456,32 +456,32 @@ export class InvioSettingTab extends PluginSettingTab {
456456

457457
// =============== Hosting Settings ======================
458458

459-
const useHostDiv = containerEl.createEl("div");
460-
useHostDiv.createEl("h2", { text: t('settings_host') });
461-
new Setting(useHostDiv)
462-
.setName(t('settings_host_switch_title'))
463-
.setDesc(t('settings_host_switch_desc'))
464-
.addToggle(tog => {
465-
tog.setValue(this.plugin.settings.useHost)
466-
.onChange(async (val) => {
467-
this.plugin.settings.useHost = val;
468-
await this.plugin.saveSettings();
469-
if (this.plugin.settings.useHost) {
470-
await this.plugin.enableHostService()
471-
.catch(err => {
472-
new Notice(t('settings_host_enable_error'));
473-
})
474-
.finally(() => {
475-
this.hide();
476-
this.display();
477-
})
478-
} else {
479-
await this.plugin.disableHostService();
480-
this.hide();
481-
this.display();
482-
}
483-
})
484-
})
459+
// const useHostDiv = containerEl.createEl("div");
460+
// useHostDiv.createEl("h2", { text: t('settings_host') });
461+
// new Setting(useHostDiv)
462+
// .setName(t('settings_host_switch_title'))
463+
// .setDesc(t('settings_host_switch_desc'))
464+
// .addToggle(tog => {
465+
// tog.setValue(this.plugin.settings.useHost)
466+
// .onChange(async (val) => {
467+
// this.plugin.settings.useHost = val;
468+
// await this.plugin.saveSettings();
469+
// if (this.plugin.settings.useHost) {
470+
// await this.plugin.enableHostService()
471+
// .catch(err => {
472+
// new Notice(t('settings_host_enable_error'));
473+
// })
474+
// .finally(() => {
475+
// this.hide();
476+
// this.display();
477+
// })
478+
// } else {
479+
// await this.plugin.disableHostService();
480+
// this.hide();
481+
// this.display();
482+
// }
483+
// })
484+
// })
485485

486486
if (this.plugin.settings.useHost) {
487487
const hostingDiv = containerEl.createEl("div", { cls: 'settings-config-section' });

0 commit comments

Comments
 (0)