login terms and condition mandatory acceptation

This commit is contained in:
Allan Cueff
2022-12-28 01:10:56 +01:00
parent ca5837d028
commit b04c27a2b9
3 changed files with 9 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ body {
main {
overflow: hidden;
position: relative;
height: 100vh;
}
@@ -92,6 +93,7 @@ main {
}
#accountAuthButton {
visibility: hidden;
text-align: center;
margin-top : 3vh;
}
}

View File

@@ -28,7 +28,7 @@
<input type="radio" id="conditions">
<label id="conditions">J'accepte les conditions d'utilisations</label>
</form>
<a id="accountAuthButton" href="">
<a id="accountAuthButton" href="localhost" target="_self" disabled>
<img src="./images/btn_strava_connectwith_orange.svg" alt="Bouton de connexion Strava">
</a>

View File

@@ -5,4 +5,8 @@ fetch('/appid', {
document.querySelector('body a#accountAuthButton').href = `https://www.strava.com/oauth/authorize?client_id=${res}&redirect_uri=http://localhost:8080&response_type=code&scope=read_all,profile:read_all,activity:read_all`;
});
}
)
)
document.querySelector('#conditions').addEventListener('click', () => {
document.querySelector('#accountAuthButton').style.visibility = "visible"
})