mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-27 01:59:08 +00:00
added profile change functionality
This commit is contained in:
parent
1293de346e
commit
f195b81974
@ -14,7 +14,13 @@
|
|||||||
<h1 id="mainhead">TitanScout- Sign In</h1>
|
<h1 id="mainhead">TitanScout- Sign In</h1>
|
||||||
<p id="status">You are not signed in.</p>
|
<p id="status">You are not signed in.</p>
|
||||||
<input type="button" name="Sign Out" value="Sign Out" onclick="signout();" id="signout">
|
<input type="button" name="Sign Out" value="Sign Out" onclick="signout();" id="signout">
|
||||||
|
<input type="button" name="Update Profile" onClick="loadupdpi();" value='Update Profile Info' id="updpi">
|
||||||
<input type="button" name="DelAcc" value="Delete Account" onclick="deleteAccount();" id="deleteacc">
|
<input type="button" name="DelAcc" value="Delete Account" onclick="deleteAccount();" id="deleteacc">
|
||||||
|
<div id="ProfileUpdate">
|
||||||
|
New Username: <input type="text" name="NewDN" value="" id="newDN">
|
||||||
|
New Profile Pic URL: <input type="text" name="NewPP" value="" id='newPP'>
|
||||||
|
New Email: <input type="text" name="NewEM" value="" id="newEM">
|
||||||
|
</div>
|
||||||
<div id="firebaseui-auth-container"></div>
|
<div id="firebaseui-auth-container"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -50,12 +50,14 @@ var handleSignedInUser = function(user) {
|
|||||||
document.getElementById('status').innerHTML = "You are signed in.";
|
document.getElementById('status').innerHTML = "You are signed in.";
|
||||||
}
|
}
|
||||||
document.getElementById('signout').style.display='inline-block';
|
document.getElementById('signout').style.display='inline-block';
|
||||||
|
document.getElementById('updpi').style.display='inline-block';
|
||||||
document.getElementById('deleteacc').style.display='inline-block';
|
document.getElementById('deleteacc').style.display='inline-block';
|
||||||
}
|
}
|
||||||
var handleSignedOutUser = function() {
|
var handleSignedOutUser = function() {
|
||||||
document.getElementById("mainhead").innerHTML = "TitanScout- Sign In";
|
document.getElementById("mainhead").innerHTML = "TitanScout- Sign In";
|
||||||
document.getElementById('status').innerHTML = "You are not signed in.";
|
document.getElementById('status').innerHTML = "You are not signed in.";
|
||||||
document.getElementById('signout').style.display='none';
|
document.getElementById('signout').style.display='none';
|
||||||
|
document.getElementById('updpi').style.display='none';
|
||||||
document.getElementById('deleteacc').style.display='none';
|
document.getElementById('deleteacc').style.display='none';
|
||||||
ui.start('#firebaseui-auth-container', uiConfig);
|
ui.start('#firebaseui-auth-container', uiConfig);
|
||||||
};
|
};
|
||||||
@ -86,3 +88,13 @@ function signout() {
|
|||||||
firebase.auth().signOut()
|
firebase.auth().signOut()
|
||||||
handleSignedOutUser()
|
handleSignedOutUser()
|
||||||
}
|
}
|
||||||
|
function loadupdpi(){
|
||||||
|
if(firebase.auth().currentUser != null){
|
||||||
|
document.getElementById('ProfileUpdate').display='block';
|
||||||
|
}else {
|
||||||
|
setTimeout(function() {
|
||||||
|
alert('Please sign in to change your account info.');
|
||||||
|
}, 1);
|
||||||
|
handleSignedOutUser();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -9,3 +9,10 @@ body{
|
|||||||
#deleteacc{
|
#deleteacc{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
#updpi{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ProfileUpdate{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user