Embed message box fix and remove fetching spinner

This commit is contained in:
Jeremy Zhang 2017-11-07 07:43:02 +00:00
parent 071552dbf7
commit fa08af8864
3 changed files with 32 additions and 27 deletions

View File

@ -262,6 +262,7 @@ nav .brand-logo {
} }
.footercontainer { .footercontainer {
display: flex;
width: 100%; width: 100%;
position: relative; position: relative;
margin: 10px; margin: 10px;
@ -276,6 +277,28 @@ nav .brand-logo {
#messageboxouter { #messageboxouter {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
height: 46px;
}
.input-field.inline {
display: inline-block;
vertical-align: middle;
margin-left: 0px;
}
textarea.materialize-textarea {
overflow-y: hidden;
padding: 8px 0px 0px 5px;
resize: none;
min-height: 50px;
margin: 0px 0px 0px 0px;
line-height: initial;
border-bottom: none;
}
textarea.materialize-textarea:focus:not([readonly]) {
border-bottom: none;
box-shadow: none;
} }
.currentuserchip { .currentuserchip {
@ -287,11 +310,17 @@ nav .brand-logo {
background-color: #455a64; background-color: #455a64;
} }
#currentuserimage_parent {
display: inline-block;
vertical-align: middle;
}
.currentuserimage { .currentuserimage {
width: 30px; width: 30px;
} }
.currentusername { .currentusername {
display: inline-block;
position: relative; position: relative;
top: 7px; top: 7px;
left: 5px; left: 5px;
@ -308,7 +337,6 @@ nav .brand-logo {
} }
#currentuserimage { #currentuserimage {
margin-top: 4px;
margin-right: 4px; margin-right: 4px;
} }
@ -354,14 +382,6 @@ a {
text-decoration: underline; text-decoration: underline;
} }
#fetching-indicator {
position: absolute;
right: 1vw;
bottom: 13px;
width: 25px;
height: 25px;
}
.brand-logo img { .brand-logo img {
width: 25px; width: 25px;
margin-right: 10px; margin-right: 10px;

View File

@ -976,7 +976,6 @@
var channel_id = selected_channel; var channel_id = selected_channel;
var fet; var fet;
var jumpscroll; var jumpscroll;
$("#fetching-indicator").fadeIn(800);
if (last_message_id == null) { if (last_message_id == null) {
$("#chatcontent").empty(); $("#chatcontent").empty();
fet = fetch(channel_id); fet = fetch(channel_id);
@ -1020,9 +1019,6 @@
} }
setVisitorMode(true); setVisitorMode(true);
}); });
fet.always(function() {
$("#fetching-indicator").fadeOut(800);
});
} }
function process_message_users_cache() { function process_message_users_cache() {

View File

@ -165,24 +165,13 @@
</div> </div>
<footer id="footer" class="footer"> <footer id="footer" class="footer">
<div id="fetching-indicator" class="preloader-wrapper small active" style="display: none;">
<div class="spinner-layer spinner-blue-only">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
<div id="emoji-tray-toggle"> <div id="emoji-tray-toggle">
<a class="btn-floating btn-large waves-effect waves-light"><i class="material-icons">tag_faces</i></a> <a class="btn-floating btn-large waves-effect waves-light"><i class="material-icons">tag_faces</i></a>
</div> </div>
<div id="footercontainer" class="footercontainer"> <div id="footercontainer" class="footercontainer">
<div class="currentuserchip left" id="nameplate"> <div class="currentuserchip" id="nameplate">
<div class="left"><img id="currentuserimage" src="" class="circle left currentuserimage" style="display: none;"></div> <div id="currentuserimage_parent"><img id="currentuserimage" src="" class="circle currentuserimage" style="display: none;"></div>
<div id="currentusername" class="currentusername left"><span id="curuser_name">Titan</span><span id="curuser_discrim">#0001</span></div> <div id="currentusername" class="currentusername"><span id="curuser_name">Titan</span><span id="curuser_discrim">#0001</span></div>
</div> </div>
<div id="messageboxouter" class="input-field inline"> <div id="messageboxouter" class="input-field inline">
<textarea placeholder="Enter message" id="messagebox" type="text" class="materialize-textarea" rows="1"></textarea> <textarea placeholder="Enter message" id="messagebox" type="text" class="materialize-textarea" rows="1"></textarea>