mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-26 17:49:09 +00:00
adding standalone profile page
This commit is contained in:
parent
3da5a0cbd7
commit
95eab24247
50
website/public/profile/index.html
Normal file
50
website/public/profile/index.html
Normal file
@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>titanscout</title>
|
||||
<script src="https://www.gstatic.com/firebasejs/5.7.2/firebase.js"></script>
|
||||
<script src="https://cdn.firebase.com/libs/firebaseui/3.5.1/firebaseui.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/3.5.1/firebaseui.css" />
|
||||
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
|
||||
<script type="text/javascript" src="scripts.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="mySidenav" class="sidenav">
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
|
||||
<a href="#">Profile</a>
|
||||
<a href="team">Team</a>
|
||||
<a href="scout">Scout Matches</a>
|
||||
<a href="stats">Torunament Stats</a>
|
||||
</div>
|
||||
<div id="main">
|
||||
<span onclick="openNav()" id="topbar">
|
||||
<img id="sideload" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Hamburger_icon.svg/1200px-Hamburger_icon.svg.png">
|
||||
</span>
|
||||
<h1 id="mainhead">TitanScout- Sign In</h1>
|
||||
<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="Update Profile" onClick="loadupdpi();" value='Update Profile Info' id="updpi">
|
||||
<input type="button" name="DelAcc" value="Delete Account" onclick="deleteAccount();" id="deleteacc">
|
||||
<div id="profileupd">
|
||||
<div class="profupdopt">
|
||||
New Username: <input type="text" name="NewDN" value="" id="newDN">
|
||||
</div>
|
||||
<div class="profupdopt">
|
||||
New Profile Pic URL: <input type="text" name="NewPP" value="" id='newPP'>
|
||||
</div>
|
||||
<div class="profileupdopt">
|
||||
New Email: <input type="text" name="NewEM" value="" id="newEM">
|
||||
</div>
|
||||
<div class="profileupdopt">
|
||||
<input type='button' name="upd" value="Update Profile" id="upd" onclick="upProfileInfo();">
|
||||
</div>
|
||||
</div>
|
||||
<div id="firebaseui-auth-container"></div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
42
website/public/profile/scripts.js
Normal file
42
website/public/profile/scripts.js
Normal file
@ -0,0 +1,42 @@
|
||||
/* Set the width of the side navigation to 250px and the left margin of the page content to 250px and add a black background color to body */
|
||||
function openNav() {
|
||||
document.getElementById("mySidenav").style.width = "250px";
|
||||
document.getElementById("main").style.marginLeft = "250px";
|
||||
document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
|
||||
}
|
||||
|
||||
/* Set the width of the side navigation to 0 and the left margin of the page content to 0, and the background color of body to white */
|
||||
function closeNav() {
|
||||
document.getElementById("mySidenav").style.width = "0";
|
||||
document.getElementById("main").style.marginLeft = "0";
|
||||
document.body.style.backgroundColor = "white";
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
document.getElementById('sideload').style.display = 'block';
|
||||
var config = {
|
||||
apiKey: "(insert the TitanScout Api Key Here)",
|
||||
authDomain: "titanscoutandroid.firebaseapp.com",
|
||||
databaseURL: "https://titanscoutandroid.firebaseio.com",
|
||||
projectId: "titanscoutandroid",
|
||||
storageBucket: "titanscoutandroid.appspot.com",
|
||||
messagingSenderId: "1097635313476"
|
||||
};
|
||||
firebase.initializeApp(config);
|
||||
user = firebase.auth().currentUser
|
||||
setTimeout(function() {
|
||||
if (user != null) {
|
||||
if (user.displayName != null) {
|
||||
document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName;
|
||||
} else if (user.email != null) {
|
||||
document.getElementById('status').innerHTML = "You are signed in as: " + user.email;
|
||||
} else if (user.phoneNumber != null) {
|
||||
document.getElementById('status').innerHTML = "You are signed in as: " + user.phoneNumber;
|
||||
} else {
|
||||
document.getElementById('status').innerHTML = "You are signed in.";
|
||||
}
|
||||
} else {
|
||||
window.location.replace('../');
|
||||
}, 10)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user