Skip to content

Commit

Permalink
Feat:Add feedback button (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
littlestar642 committed Feb 25, 2018
1 parent 65542aa commit dfee7eb
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
10 changes: 10 additions & 0 deletions public/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
margin-bottom: 2.5px;
margin-top: 2.5px;
}
.feed{
font-size: 2em;
}

.white-text {
color: #ffffff;
Expand Down Expand Up @@ -72,8 +75,12 @@

.ui.mini.modal {
margin-top: -5%;
text-align: center;
}

#feedbtn{
margin-left:10px;
}
#msgs .one .right,
#msgs .one .left {
position: relative;
Expand Down Expand Up @@ -131,4 +138,7 @@
height: auto;
align-self: auto
}
#feedbtn{
margin-left:0;
}
}
14 changes: 11 additions & 3 deletions public/js/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
let newbtn = document.querySelector('#newbtn');
let close = document.querySelector('#close');
let cancel = document.querySelector('#cancel');
let cancelFeed = document.querySelector('#cancelFeed');
let feedback = document.querySelector('#feedback');
let feedBtn = document.querySelector('#feedbtn');
let confirm = document.querySelector('#confirm');
socket.emit('privateRoom', {
"room": "private room"
});
Expand Down Expand Up @@ -82,15 +86,19 @@
});

endbtn.addEventListener('click', () => {
let confirm = document.querySelector('#confirm');
confirm.classList.add('visible');
});
feedBtn.addEventListener('click', () => {
feedback.classList.add('visible');
});

cancel.addEventListener('click', () => {
let confirm = document.querySelector('#confirm');
confirm.classList.remove('visible');
});

cancelFeed.addEventListener('click', () => {
feedback.classList.remove('visible');
});

close.addEventListener('click', () => {
let confirm = document.querySelector('#confirm');
message.classList.add('hide');
Expand Down
18 changes: 18 additions & 0 deletions views/chat.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
<i class="fitted send icon"></i>
<span class="txt">Send</span>
</button>
<button class="ui teal labeled icon button" id="feedbtn">
<i class="user icon"></i>
<span class="txt">Feedback</span>
</button>
<a href="/">
<button class="ui red icon button right-float hide" id="homebtn">
<span>Home</span>
Expand All @@ -70,6 +74,20 @@
</div>
</div>
</div>
<div class="ui mini modal transition tada" id="feedback">
<div class="header sty">
Did Something Happened?
</div>
<div class="content sty">
<p> &#128562; Trouble Encountered &#128562;</p>
<p><a target="_blank" href="https://github.com/wdlsvnit/omeclone/issues">Click Here</a> &#10165; Submit your issue &#10165; We will take care</p>
</div>
<div class="actions">
<div class="ui teal button" id="cancelFeed">
Return To Chat
</div>
</div>
</div>
</body>
<script src="/bower_components/Autolinker.js/dist/Autolinker.min.js"></script>
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
Expand Down

0 comments on commit dfee7eb

Please sign in to comment.