mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-17 05:20:01 -04:00
Reset button for HTTP proxy
This commit is contained in:
parent
2c22a6afc6
commit
fbff40d7f8
1 changed files with 25 additions and 9 deletions
|
@ -14,6 +14,14 @@ function ProxyInput(props: BareInputProps) {
|
|||
const bareServer = localStorage.getItem("bare") || "/bare/";
|
||||
const HTTPProxy = localStorage.getItem("HTTPProxy") || "";
|
||||
const [inputValue, setInputValue] = useState(HTTPProxy);
|
||||
|
||||
function resetProxy() {
|
||||
set("HTTPProxy", "");
|
||||
localStorage.setItem("HTTPProxy", "");
|
||||
uninstallServiceWorkers();
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
function validateUrl(url: string) {
|
||||
let finalUrl = url;
|
||||
|
||||
|
@ -110,12 +118,20 @@ function ProxyInput(props: BareInputProps) {
|
|||
id="pinput"
|
||||
className="font-roboto flex h-14 w-56 flex-row rounded-2xl border border-input-border-color bg-input p-4 text-center text-sm"
|
||||
/>
|
||||
<div class="flex flex-row gap-4">
|
||||
<div
|
||||
className="font-roboto mt-2 flex h-4 w-36 cursor-pointer flex-row items-center justify-center rounded-xl border border-input-border-color bg-input p-5 text-center text-lg"
|
||||
onClick={handleChange}
|
||||
>
|
||||
{t("settings.bare.select")}
|
||||
</div>
|
||||
<div
|
||||
className="font-roboto mt-2 flex h-4 w-36 cursor-pointer flex-row items-center justify-center rounded-xl border border-input-border-color bg-input p-5 text-center text-lg"
|
||||
onClick={resetProxy}
|
||||
>
|
||||
Reset
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue