From 0b738820122ad859182e4403af29ae4dacb06084 Mon Sep 17 00:00:00 2001
From: Alexander Maslov <30986874+steam3d@users.noreply.github.com>
Date: Wed, 23 Apr 2025 17:21:49 +0300
Subject: Simplify the typing of the plugin URL for users (#769)
* Simplify the typing of the plugin URL for the user. Make the http/https prefix optional.
* Fixed the formatting using prettier --write
---
frontend/src/components/settings/pages/developer/index.tsx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/frontend/src/components/settings/pages/developer/index.tsx b/frontend/src/components/settings/pages/developer/index.tsx
index 099f2610..05989806 100644
--- a/frontend/src/components/settings/pages/developer/index.tsx
+++ b/frontend/src/components/settings/pages/developer/index.tsx
@@ -72,7 +72,16 @@ export default function DeveloperSettings() {
}
icon={}
>
- installFromURL(pluginURL)}>
+ {
+ if (/^https?:\/\//.test(pluginURL)) {
+ installFromURL(pluginURL);
+ } else {
+ installFromURL('https://' + pluginURL);
+ }
+ }}
+ >
{t('SettingsDeveloperIndex.third_party_plugins.button_install')}
--
cgit v1.2.3