Simplify the typing of the plugin URL for users (#769)
Builder Win / Build PluginLoader for Win (push) Has been cancelled
Builder / Build PluginLoader (push) Has been cancelled
Push Updated Plugin Stub to Template / copy-stub (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Type Check / Run type checkers (push) Has been cancelled

* Simplify the typing of the plugin URL for the user. Make the http/https prefix optional.

* Fixed the formatting using prettier --write
This commit is contained in:
Alexander Maslov
2025-04-23 17:21:49 +03:00
committed by GitHub
parent b15392b5f2
commit 0b73882012
@@ -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>