Add function to hide the login required notice

This commit is contained in:
Fred Boniface 2023-04-28 13:56:04 +01:00
parent f525466b84
commit ad38085e64
2 changed files with 8 additions and 1 deletions

View File

@ -165,6 +165,13 @@ async function getApi(path,auth = false) {
}
}
async function showHideAuthNotice() {
let uuid = localStorage.getItem("uuid")
if (uuid) {
document.getElementById('auth-notice').style = 'display:none'
}
}
async function vibe(type) {
let canVibrate = "vibrate" in navigator || "mozVibrate" in navigator
if (canVibrate && !("vibrate" in navigator)){

View File

@ -46,7 +46,7 @@
<p>Enter a services start and end station CRS codes to see code options and
stopping patterns.</p>
<p>Currently supported (Beta): GWR Bristol Metro region only.</p>
<p id="auth-required">You will need to be logged into a free <a href="./settings.html">rail staff version</a> account for this feature once it has finished testing.</p>
<p id="auth-required">You need to be logged into a free <a href="./settings.html">rail staff version</a> account for this feature.</p>
<label for="origin">Origin:</label><br>
<input type="text" class="small-lookup-box" id="origin" name="origin" maxlength="3"><br><br>
<label for="destination">Destination:</label><br>