summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorAlexander Maslov <30986874+steam3d@users.noreply.github.com>2025-04-23 17:21:49 +0300
committerGitHub <noreply@github.com>2025-04-23 10:21:49 -0400
commit0b738820122ad859182e4403af29ae4dacb06084 (patch)
tree77ee8c434caef1fdec20d4d0743d6d1bdf2bc60e /frontend
parentb15392b5f260123e75cf5606b7d507838f1fb77d (diff)
downloaddecky-loader-0b738820122ad859182e4403af29ae4dacb06084.tar.gz
decky-loader-0b738820122ad859182e4403af29ae4dacb06084.zip
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
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/components/settings/pages/developer/index.tsx11
1 files changed, 10 insertions, 1 deletions
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={<FaLink style={{ display: 'block' }} />}
>
- <DialogButton disabled={pluginURL.length == 0} onClick={() => installFromURL(pluginURL)}>
+ <DialogButton
+ disabled={pluginURL.length == 0}
+ onClick={() => {
+ if (/^https?:\/\//.test(pluginURL)) {
+ installFromURL(pluginURL);
+ } else {
+ installFromURL('https://' + pluginURL);
+ }
+ }}
+ >
{t('SettingsDeveloperIndex.third_party_plugins.button_install')}
</DialogButton>
</Field>