mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-11-05 09:50:11 +00:00
add refresh button that uses url base if given
This commit is contained in:
parent
764639bbba
commit
79987ffa22
@ -446,6 +446,7 @@
|
|||||||
<div class="row col flex center">
|
<div class="row col flex center">
|
||||||
<span class="button ~neutral !normal back mr-1">{{ .lang.Strings.back }}</span>
|
<span class="button ~neutral !normal back mr-1">{{ .lang.Strings.back }}</span>
|
||||||
<span class="button ~urge !normal" id="restart">{{ .lang.Strings.submit }}</span>
|
<span class="button ~urge !normal" id="restart">{{ .lang.Strings.submit }}</span>
|
||||||
|
<span class="button ~urge !normal unfocused" id="refresh">{{ .lang.EndPage.refreshPage }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,7 +25,8 @@
|
|||||||
},
|
},
|
||||||
"endPage": {
|
"endPage": {
|
||||||
"finished": "Finished!",
|
"finished": "Finished!",
|
||||||
"restartMessage": "There are more settings you can configure on the admin page. Click below to restart, then refresh the page."
|
"restartMessage": "There are more settings you can configure on the admin page. Click below to restart, then refresh the page.",
|
||||||
|
"refreshPage": "Refresh"
|
||||||
},
|
},
|
||||||
"language": {
|
"language": {
|
||||||
"title": "Language",
|
"title": "Language",
|
||||||
|
11
ts/setup.ts
11
ts/setup.ts
@ -317,9 +317,14 @@ const serialize = () => {
|
|||||||
_post("/config", config, (req: XMLHttpRequest) => {
|
_post("/config", config, (req: XMLHttpRequest) => {
|
||||||
if (req.readyState == 4) {
|
if (req.readyState == 4) {
|
||||||
toggleLoader(restartButton);
|
toggleLoader(restartButton);
|
||||||
restartButton.classList.add("~positive");
|
restartButton.parentElement.querySelector("span.back").classList.add("unfocused");
|
||||||
restartButton.classList.remove("~urge");
|
restartButton.classList.add("unfocused");
|
||||||
restartButton.textContent = window.lang.strings("success");
|
const refresh = document.getElementById("refresh") as HTMLSpanElement;
|
||||||
|
refresh.classList.remove("unfocused");
|
||||||
|
refresh.onclick = () => {
|
||||||
|
let host = window.location.href.split("#")[0].split("?")[0] + settings["ui"]["url_base"].value;
|
||||||
|
window.location.href = host;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}, true, true);
|
}, true, true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user