add a reset button
This commit is contained in:
parent
26ffd13f2b
commit
53a92c0016
4 changed files with 36 additions and 2 deletions
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
|
|
@ -1,5 +1,11 @@
|
||||||
{
|
{
|
||||||
"search.exclude": {
|
"search.exclude": {
|
||||||
"/public/games/**": true
|
"/public/games/**": true
|
||||||
|
},
|
||||||
|
"files.exclude": {
|
||||||
|
"**/*.rpyc": true,
|
||||||
|
"**/*.rpa": true,
|
||||||
|
"**/*.rpymc": true,
|
||||||
|
"**/cache/": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,28 @@ const wispURLList = [
|
||||||
<label aria-label="Wisp Transport" for="dropdown__transport" class="setting-label">{t("settings.proxy.transport")}</label>
|
<label aria-label="Wisp Transport" for="dropdown__transport" class="setting-label">{t("settings.proxy.transport")}</label>
|
||||||
<Dropdown buttonNameDefault="Epoxy" dropdownList={transportsList} localStorageKey="transport" id="dropdown__transport" />
|
<Dropdown buttonNameDefault="Epoxy" dropdownList={transportsList} localStorageKey="transport" id="dropdown__transport" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="setting__reset">
|
||||||
|
<button id="reset-button">Reset Settings</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting__searxng-url">
|
<div class="setting__searxng-url">
|
||||||
<label aria-label="SearXNG URL" for="searxng-url-input" class="setting-label">{t("settings.proxy.searxngURL")}</label>
|
<label aria-label="SearXNG URL" for="searxng-url-input" class="setting-label">{t("settings.proxy.searxngURL")}</label>
|
||||||
<Input height="50px" inputName="searxng-url" defaultTextContent="https://searxng.site/" />
|
<Input height="50px" inputName="searxng-url" defaultTextContent="https://searxng.site/" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.setting__reset {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
#reset-button {
|
||||||
|
background-color: var(--background-highlight);
|
||||||
|
border: none;
|
||||||
|
color: var(--text-color);
|
||||||
|
border-radius: 1rem;
|
||||||
|
padding: 10px;
|
||||||
|
margin-top: 40px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -176,6 +176,14 @@ function setupProxySettings() {
|
||||||
const currentTransportDropdown = document.getElementById("dropdown__transport");
|
const currentTransportDropdown = document.getElementById("dropdown__transport");
|
||||||
const wispURLDropdown = document.getElementById("dropdown__wisp-url");
|
const wispURLDropdown = document.getElementById("dropdown__wisp-url");
|
||||||
|
|
||||||
|
const resetSettings = document.getElementById("reset-button");
|
||||||
|
if (resetSettings) {
|
||||||
|
resetSettings.onclick = () => {
|
||||||
|
localStorage.removeItem("AluStore");
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Inputs
|
// Inputs
|
||||||
const searxngUrlInput = document.getElementById("searxng-url-input") as HTMLInputElement;
|
const searxngUrlInput = document.getElementById("searxng-url-input") as HTMLInputElement;
|
||||||
const bareURLInput = document.getElementById("bare-url-input") as HTMLInputElement;
|
const bareURLInput = document.getElementById("bare-url-input") as HTMLInputElement;
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,8 @@ const { title, optionalPreloads } = Astro.props;
|
||||||
return <link rel="preload" href={item.href} as={item.as} />;
|
return <link rel="preload" href={item.href} as={item.as} />;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
<script src="https://www.googletagmanager.com/gtag/js?id=G-P1JX4G9KSF" is:inline></script>
|
<script src="https://www.googletagmanager.com/gtag/js?id=G-P1JX4G9KSF" defer is:inline></script>
|
||||||
<script is:inline>
|
<script is:inline defer>
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
function gtag() {
|
function gtag() {
|
||||||
window.dataLayer.push(arguments);
|
window.dataLayer.push(arguments);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue