aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/css/main.css6
-rw-r--r--shared/js/Dashboard.js16
2 files changed, 10 insertions, 12 deletions
diff --git a/shared/css/main.css b/shared/css/main.css
index 5b21812..831ec8a 100644
--- a/shared/css/main.css
+++ b/shared/css/main.css
@@ -68,4 +68,10 @@
}
.recents {
padding: 1.5rem;
+}
+#sign {
+ display: block;
+}
+#signed {
+ display: none;
} \ No newline at end of file
diff --git a/shared/js/Dashboard.js b/shared/js/Dashboard.js
index 2135fed..d67299d 100644
--- a/shared/js/Dashboard.js
+++ b/shared/js/Dashboard.js
@@ -1,14 +1,4 @@
$(document).ready(function(){
- function showAlert(message) {
- // Get the snackbar DIV
- var x = document.getElementById("snackbar");
- $('#snackbar').text(message)
- // Add the "show" class to DIV
- x.className = "show";
-
- // After 3 seconds, remove the show class from DIV
- setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
- }
$('#signout').click(function(){
firebase.auth().signOut().then(function() {
window.location.replace('../')
@@ -17,8 +7,10 @@ $(document).ready(function(){
});
})
firebase.auth().onAuthStateChanged(function(user) {
- if (!user) {
- window.location.replace('../')
+ if (user) {
+ console.log(user)
+ $("#sign").hide()
+ $("#signed").show()
}
});
// var url = window.location.href;