Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
changes
  • Loading branch information
met18001 committed Mar 12, 2020
1 parent 10f7f95 commit 4baa55a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.html
Expand Up @@ -14,8 +14,8 @@
<body>

<div class="box">
<header><h1>Sending messages as <img class="smallImage" src="#" id="profilePicInput"/><a href="profile.html"><span id="usernameInput">{UserName}</span></a> <span class="small" id="statusInput">{Status}</span></h1></header>
<header><h1>~Meira's Mobile App Chat Room~</h1></header>
<header><h1>Sending messages as <img class="smallImage" src="#" id="profilePicInput"/><span id="usernameInput">{UserName}</span></a> <span class="small" id="statusInput">{Status}</span></h1></header>
<header><h1><a href="profile.html">~Set your profile here~</a></h1></header>
</div>

<div id="chatBox">
Expand Down
5 changes: 4 additions & 1 deletion js/main.js
Expand Up @@ -53,11 +53,14 @@ function saveProfileImageLocally() {
//}

function displayMessage(message) {
let curr_date = new Date(message.dateStamp);
let month = curr_date.getMonth() + 1;
let date_str = month.toString() + "/" + curr_date.getDate().toString() + "/" + curr_date.getFullYear().toString();
var messageParagraph = document.createElement("p");
if (message.sentBy == localStorage.userName){
messageParagraph.style.color = "coral";
}
messageParagraph.innerHTML = message.dateStamp + " " + message.message + " " + message.sentBy;
messageParagraph.innerHTML = date_str + " " + message.message + " " + message.sentBy;

chatBox.appendChild(messageParagraph);
messageParagraph.scrollIntoView();
Expand Down
2 changes: 1 addition & 1 deletion profile.html
Expand Up @@ -13,7 +13,7 @@
<p><input type="text" placeholder="Status Message" name="StatusMessage" id="statusInput"></p>
<p><input type="file" id="profilePicInput" name="profilePicInput"></p>
<button id="saveProfile">Save Profile</button>
<h1 class="button"> <a href="https://github.uconn.edu/pages/met18001/mobile-app-chat-app/index.html">Go Back to Chat App</a></h1>
<h1 class="button"> <a href="index.html">Go Back to Chat App</a></h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Deserunt numquam, consequatur eos error ducimus quisquam nam ut quasi sint adipisci sit molestiae, ad dolorum iste possimus deleniti rerum ipsum repudiandae.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui amet a non quas blanditiis animi, unde modi aliquid voluptatem voluptatibus ipsam repudiandae ea maxime perferendis esse dolores molestias at minus?
Expand Down

0 comments on commit 4baa55a

Please sign in to comment.