Check window location host value to show the close button.
The close button was available even if the interface is requested remotely. Now the script hides the close button if the value of window.location.host is equal to 127.0.0.1 or localhost.
This commit is contained in:
parent
fd66d2274e
commit
1d8c2387ca
@ -53,7 +53,7 @@ export default {
|
||||
load_config: function() {
|
||||
axios.get(`/api/misc/config`, { timeout: 60000 })
|
||||
.then(response => {
|
||||
this.quit_available = response.data.quit_option
|
||||
this.quit_available = (response.data.quit_option && (["localhost", "127.0.0.1"].some(h => window.location.host.includes(h) )))
|
||||
this.off_available = response.data.shutdown_option
|
||||
})
|
||||
.catch(error => { console.log(error) });
|
||||
@ -73,4 +73,4 @@ export default {
|
||||
this.check_update();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user