From 41f3d0ed929bd66b63cbe33be36c51198c7d10ff Mon Sep 17 00:00:00 2001 From: "Addo.Zhang" Date: Mon, 22 Jan 2024 17:12:00 +0800 Subject: [PATCH] fix region modification issue --- manifest.json | 2 +- package.json | 2 +- src/ui/publishSettingTab.ts | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 344645c..b47f594 100644 --- a/manifest.json +++ b/manifest.json @@ -6,5 +6,5 @@ "authorUrl": "https://atbug.com", "isDesktopOnly": true, "minAppVersion": "0.11.0", - "version": "0.3.4" + "version": "0.3.5" } diff --git a/package.json b/package.json index cb870ce..2a53c20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-image-upload-toolkit", - "version": "0.3.4", + "version": "0.3.5", "description": "", "author": "addozhang", "main": "main.js", diff --git a/src/ui/publishSettingTab.ts b/src/ui/publishSettingTab.ts index 2dd8c0c..ac1bddf 100644 --- a/src/ui/publishSettingTab.ts +++ b/src/ui/publishSettingTab.ts @@ -129,7 +129,11 @@ export default class PublishSettingTab extends PluginSettingTab { .addDropdown(dropdown => dropdown .addOptions(RegionList) - .onChange(value => this.plugin.settings.ossSetting.region = value) + .setValue(this.plugin.settings.ossSetting.region) + .onChange(value => { + this.plugin.settings.ossSetting.region = value; + this.plugin.settings.ossSetting.endpoint = `https://${value}.aliyuncs.com/`; + }) ) new Setting(parentEL) .setName("Access Key Id")