ddd
This commit is contained in:
		@@ -21,6 +21,7 @@ var config = {
 | 
			
		||||
 | 
			
		||||
  //verifyInvite(last_segment);
 | 
			
		||||
  getList(last_segment);
 | 
			
		||||
  verifyInvite(last_segment);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  function verifyInvite(link) {
 | 
			
		||||
@@ -34,12 +35,13 @@ var config = {
 | 
			
		||||
                link: link
 | 
			
		||||
            },
 | 
			
		||||
            success(){
 | 
			
		||||
               // window.location.href = "/dash/" + idtoken
 | 
			
		||||
               alert("Success");
 | 
			
		||||
               window.location.href = "/dash/" + idtoken
 | 
			
		||||
               //alert("Success");
 | 
			
		||||
            },
 | 
			
		||||
            error(err){
 | 
			
		||||
                console.error("Error: " + err);
 | 
			
		||||
                alert("Error");
 | 
			
		||||
                //alert("Error");
 | 
			
		||||
                window.location.href = "/dash/" + idtoken
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }).catch((error) => console.error("Get id token client error: ", error));}else{console.log("Check Auth error", user)}});
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								express-server/public/invite/style.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								express-server/public/invite/style.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
body {
 | 
			
		||||
    background-color: #121212;
 | 
			
		||||
    display:none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.cont {
 | 
			
		||||
    background-color: #f5f5f5;
 | 
			
		||||
}
 | 
			
		||||
@@ -15,26 +15,35 @@
 | 
			
		||||
var msg = firebase.messaging();
 | 
			
		||||
msg.requestPermission()
 | 
			
		||||
.then(function(){
 | 
			
		||||
    console.log("Zugriff auf msg")
 | 
			
		||||
    console.log("Zugriff auf msg");
 | 
			
		||||
    return msg.getToken();
 | 
			
		||||
})
 | 
			
		||||
.then(token => {
 | 
			
		||||
    console.log("MSG TOKEN: ", token)
 | 
			
		||||
    updateUser(token);
 | 
			
		||||
    
 | 
			
		||||
})
 | 
			
		||||
.catch(err => {
 | 
			
		||||
    console.error("Msg Error: ", err)
 | 
			
		||||
    console.error("Msg Error: ", err);
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
axios.post('/user', {
 | 
			
		||||
    message_id: 'test',
 | 
			
		||||
  })
 | 
			
		||||
  .then(function (response) {
 | 
			
		||||
    console.log(response);
 | 
			
		||||
  })
 | 
			
		||||
  .catch(function (error) {
 | 
			
		||||
    console.log(error);
 | 
			
		||||
});
 | 
			
		||||
function updateUser(token) {
 | 
			
		||||
  firebase.auth().onAuthStateChanged(function(user){if(user){firebase.auth().currentUser.getIdToken(/* forceRefresh */ true).then(function(idtoken) {
 | 
			
		||||
      $.ajax({
 | 
			
		||||
          type: "POST",
 | 
			
		||||
          url: "/user",
 | 
			
		||||
          data:{
 | 
			
		||||
              idtoken: idtoken,
 | 
			
		||||
              message_id: token
 | 
			
		||||
          },
 | 
			
		||||
          success(){
 | 
			
		||||
              console.log("User updated");
 | 
			
		||||
          },
 | 
			
		||||
          error(err){
 | 
			
		||||
              console.error("Error: " + err);
 | 
			
		||||
          }
 | 
			
		||||
      });
 | 
			
		||||
  }).catch((error) => console.error("Get id token client error: ", error));}else{console.log("Check Auth error", user)}});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
msg.onMessage(payload => {
 | 
			
		||||
    const title = payload.data.title
 | 
			
		||||
 
 | 
			
		||||
@@ -18,6 +18,7 @@ function checkAuth(){
 | 
			
		||||
            try{
 | 
			
		||||
            firebase.auth().currentUser.getIdToken(/* forceRefresh */ true).then(function(idToken) {
 | 
			
		||||
                console.log("Vor Replace");
 | 
			
		||||
 | 
			
		||||
                window.location.replace("/dash/" + idToken);
 | 
			
		||||
              }).catch(function(error) {
 | 
			
		||||
                console.error("Get id token client error: ", error)
 | 
			
		||||
@@ -40,6 +41,7 @@ window.onload = function(){
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
var vue = new Vue({
 | 
			
		||||
    el: '#vue-app',
 | 
			
		||||
    data:{
 | 
			
		||||
@@ -71,6 +73,7 @@ var vue = new Vue({
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    },
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
    mounted() {
 | 
			
		||||
        /*axios.post('/user', {
 | 
			
		||||
            message_id: 'test',
 | 
			
		||||
@@ -82,4 +85,17 @@ var vue = new Vue({
 | 
			
		||||
            console.log(error);
 | 
			
		||||
          });*/
 | 
			
		||||
    }
 | 
			
		||||
=======
 | 
			
		||||
    // mounted() {
 | 
			
		||||
    //     axios.post('/user', {
 | 
			
		||||
    //         message_id: 'test',
 | 
			
		||||
    //       })
 | 
			
		||||
    //       .then(function (response) {
 | 
			
		||||
    //         console.log(response);
 | 
			
		||||
    //       })
 | 
			
		||||
    //       .catch(function (error) {
 | 
			
		||||
    //         console.log(error);
 | 
			
		||||
    //       });
 | 
			
		||||
    // }
 | 
			
		||||
>>>>>>> 51e8fe7ad3886f317cd447a9b70b535cd6668806
 | 
			
		||||
});
 | 
			
		||||
@@ -44,8 +44,11 @@ var config = {
 | 
			
		||||
  firebase.initializeApp(config);
 | 
			
		||||
 | 
			
		||||
  getAllShoppinglists();
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
  updateUser();
 | 
			
		||||
  displayShoppinglist();
 | 
			
		||||
=======
 | 
			
		||||
>>>>>>> 51e8fe7ad3886f317cd447a9b70b535cd6668806
 | 
			
		||||
 | 
			
		||||
function movePurchases(text) {
 | 
			
		||||
    firebase.auth().onAuthStateChanged(function(user){if(user){firebase.auth().currentUser.getIdToken(/* forceRefresh */ true).then(function(idtoken) {
 | 
			
		||||
@@ -189,58 +192,3 @@ var loading = false;
 | 
			
		||||
}
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
function updateUser() {
 | 
			
		||||
    firebase.auth().onAuthStateChanged(function(user){if(user){firebase.auth().currentUser.getIdToken(/* forceRefresh */ true).then(function(idtoken) {
 | 
			
		||||
        $.ajax({
 | 
			
		||||
            type: "POST",
 | 
			
		||||
            url: "/user",
 | 
			
		||||
            data:{
 | 
			
		||||
                idtoken: idtoken,
 | 
			
		||||
                message_id: "msgtest"
 | 
			
		||||
            },
 | 
			
		||||
            success(){
 | 
			
		||||
                console.log("USer updated");
 | 
			
		||||
            },
 | 
			
		||||
            error(err){
 | 
			
		||||
                console.error("Error: " + err);
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }).catch((error) => console.error("Get id token client error: ", error));}else{console.log("Check Auth error", user)}});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function updateUser() {
 | 
			
		||||
    firebase.auth().onAuthStateChanged(function(user){if(user){firebase.auth().currentUser.getIdToken(/* forceRefresh */ true).then(function(idtoken) {
 | 
			
		||||
        $.ajax({
 | 
			
		||||
            type: "POST",
 | 
			
		||||
            url: "/user",
 | 
			
		||||
            data:{
 | 
			
		||||
                idtoken: idtoken,
 | 
			
		||||
                message_id: "msgtest"
 | 
			
		||||
            },
 | 
			
		||||
            success(){
 | 
			
		||||
                console.log("USer updated");
 | 
			
		||||
            },
 | 
			
		||||
            error(err){
 | 
			
		||||
                console.error("Error: " + err);
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }).catch((error) => console.error("Get id token client error: ", error));}else{console.log("Check Auth error", user)}});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function displayShoppinglist() {
 | 
			
		||||
    firebase.auth().onAuthStateChanged(function(user){if(user){firebase.auth().currentUser.getIdToken(/* forceRefresh */ true).then(function(idtoken) {
 | 
			
		||||
        $.ajax({
 | 
			
		||||
            type: "GET",
 | 
			
		||||
            url: "/shoppinglist_json/4tezJYMK",
 | 
			
		||||
            data:{
 | 
			
		||||
                idtoken: idtoken
 | 
			
		||||
            },
 | 
			
		||||
            success(data){
 | 
			
		||||
                console.log("Result: ", data.sl_id);
 | 
			
		||||
            },
 | 
			
		||||
            error(err){
 | 
			
		||||
                console.error("Error: " + err);
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }).catch((error) => console.error("Get id token client error: ", error));}else{console.log("Check Auth error", user)}});
 | 
			
		||||
}
 | 
			
		||||
@@ -10,29 +10,46 @@
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.opt2 {
 | 
			
		||||
    background-color: #039be5 ;
 | 
			
		||||
    background-color: #039be5 !important;
 | 
			
		||||
    height: 100%;
 | 
			
		||||
    max-height: 100%;
 | 
			
		||||
    transition: 1s;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.opt2:hover {
 | 
			
		||||
    background-color: #4fc3f7;
 | 
			
		||||
    background-color: #4fc3f7 !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.r1 {
 | 
			
		||||
    height: 100%;
 | 
			
		||||
    max-height: 100%;
 | 
			
		||||
    margin-top: 100%;
 | 
			
		||||
    transform: translateY(100%);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.r2 {
 | 
			
		||||
    height: 100%;
 | 
			
		||||
    max-height: 100%;
 | 
			
		||||
    transform: translateY(100%);
 | 
			
		||||
    background-color: #242424;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.row {
 | 
			
		||||
    margin-bottom: 0px !important;
 | 
			
		||||
    margin-top: 0px !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.container {
 | 
			
		||||
    margin-bottom: 0px !important;
 | 
			
		||||
    margin-top: 0px !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
html, body {
 | 
			
		||||
    height: 100%;
 | 
			
		||||
    margin: 0;
 | 
			
		||||
    max-height: 100%;
 | 
			
		||||
    overflow: hidden;
 | 
			
		||||
    background-color: #161616;
 | 
			
		||||
    background-color: #242424;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
.ico {
 | 
			
		||||
@@ -44,5 +61,30 @@ html, body {
 | 
			
		||||
 | 
			
		||||
.collection .collection-item.active {
 | 
			
		||||
    /* background-color: #00c853; */
 | 
			
		||||
    background-color: rgb(0, 195, 255);
 | 
			
		||||
    color: rgb(24, 24, 24);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.collection .collection-item.active {
 | 
			
		||||
    /* background-color: #00c853; */
 | 
			
		||||
    background-color: rgb(0, 195, 255);
 | 
			
		||||
    color: rgb(24, 24, 24);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.collection-item {
 | 
			
		||||
    /* background-color: #00c853; */
 | 
			
		||||
    color: rgb(24, 24, 24) !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.btn-choose {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.progress .indeterminate {
 | 
			
		||||
    background-color: #f4511e;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.progress {
 | 
			
		||||
    background-color: #f8cfc3;
 | 
			
		||||
} 
 | 
			
		||||
		Reference in New Issue
	
	Block a user