switch from req.session.jwt to cookies
This commit is contained in:
		@@ -6,7 +6,7 @@ html {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body {
 | 
			
		||||
    margin: 0;  
 | 
			
		||||
    margin: 0;
 | 
			
		||||
    padding: 0;
 | 
			
		||||
    height: 100%;
 | 
			
		||||
    width: 100%;
 | 
			
		||||
@@ -62,7 +62,7 @@ canvas {
 | 
			
		||||
    padding-left: 3%;
 | 
			
		||||
    padding-right: 3%;
 | 
			
		||||
    margin-top: 0%;
 | 
			
		||||
    border:solid 2px gray;
 | 
			
		||||
    border: solid 2px gray;
 | 
			
		||||
    box-shadow: 0px 20px 150px rgba(0, 0, 0, 1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -100,3 +100,29 @@ canvas {
 | 
			
		||||
    overflow: scroll;
 | 
			
		||||
    border: black solid
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.messages-container {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    height: 75%;
 | 
			
		||||
    border: gray solid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.input-container {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    height: 5%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#chat-input {
 | 
			
		||||
    width: calc(100% - 150px);
 | 
			
		||||
    height: 100%;
 | 
			
		||||
    margin: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#send-message-button {
 | 
			
		||||
    float: right;
 | 
			
		||||
    width: 150px;
 | 
			
		||||
    height: 100%;
 | 
			
		||||
    font-size: 15pt;
 | 
			
		||||
    margin: 0;
 | 
			
		||||
    padding: 0
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										16
									
								
								public/js/chat.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								public/js/chat.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
$(document).ready(() => {
 | 
			
		||||
    const sendData = async () => {
 | 
			
		||||
        alert(1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $("#send-message-button").click(sendData);
 | 
			
		||||
 | 
			
		||||
    $('#chat-input').keyup(function(e){
 | 
			
		||||
        if(e.keyCode == 13)
 | 
			
		||||
        {
 | 
			
		||||
            $(this).trigger("enterKey");
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $("#chat-input").bind("enterKey", sendData);
 | 
			
		||||
});
 | 
			
		||||
		Reference in New Issue
	
	Block a user