Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat:Add feedback button (#106) #116

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 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 @@ -76,6 +79,9 @@
top:20%;
}

#feedbtn{
margin-left:10px;
}
#msgs .one .right,
#msgs .one .left {
position: relative;
Expand Down Expand Up @@ -135,6 +141,7 @@
height: auto;
align-self: auto
}

.ui.mini.modal {
position: fixed;
z-index: 9999999;
Expand Down
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
35 changes: 35 additions & 0 deletions views/chat.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,48 @@
<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>
</button>
</a>
</div>
</div>
<div class="ui mini modal transition tada" id="confirm">
<div class="header">
End This Chat
</div>
<div class="content">
<p>Are you sure you want to end this chat?</p>
</div>
<div class="actions">
<div class="ui teal button" id="cancel">
No
</div>
<div class="ui red right labeled icon button" id="close">
Yes
<i class="sign out icon"></i>
</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