diff --git a/webapp/titanembeds/static/css/embed.css b/webapp/titanembeds/static/css/embed.css index 11ac1d5..11785fd 100644 --- a/webapp/titanembeds/static/css/embed.css +++ b/webapp/titanembeds/static/css/embed.css @@ -915,7 +915,7 @@ p.mentioned span.chatmessage { .wdt-emoji-picker { bottom: 13px; - right: 10px; + right: 41px; } #wdt-emoji-search, #wdt-emoji-search:focus { @@ -930,6 +930,10 @@ p.mentioned span.chatmessage { #upload-file-btn { display: none; } + + #send-msg-btn { + display: none; + } } @media only screen and (min-width: 321px) { @@ -940,12 +944,16 @@ p.mentioned span.chatmessage { #upload-file-btn { display: block; } + + #send-msg-btn { + display: block; + } } #upload-file-btn { position: absolute; bottom: 5px; - right: 38px; + right: 67px; color: gray; padding: 1px; transition: .3s ease-out; @@ -955,6 +963,19 @@ p.mentioned span.chatmessage { color: white; } +#send-msg-btn { + position: absolute; + bottom: 7px; + right: 6px; + width: 30px; + height: 30px; +} + +#send-msg-btn > i { + position: relative; + top: -13px; +} + #fileinput { display: none; } diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index fecdc9b..c693f63 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -289,6 +289,9 @@ } } + $("#upload-file-btn").hide(); + $("#send-msg-btn").hide(); + $('select').material_select(); $("#loginmodal").modal({ @@ -608,12 +611,14 @@ $("#emoji-tray-toggle").hide(); $(".wdt-emoji-picker").hide(); $("#upload-file-btn").hide(); + $("#send-msg-btn").hide(); } else { $("#visitor_mode_message").hide(); $("#messagebox").show(); $("#emoji-tray-toggle").show(); $(".wdt-emoji-picker").show(); $("#upload-file-btn").show(); + $("#send-msg-btn").show(); } } @@ -820,6 +825,7 @@ $("#messagebox").prop('disabled', true); $("#messagebox").prop('placeholder', "NO TEXT CHANNELS"); $("#upload-file-btn").hide(); + $("#send-msg-btn").hide(); Materialize.toast("You find yourself in a strange place. You don't have access to any text channels, or there are none in this server.", 20000); return; } @@ -830,11 +836,13 @@ $("#messagebox").prop('disabled', false); $("#messagebox").prop('placeholder', "Enter message"); $("#upload-file-btn").show(); + $("#send-msg-btn").show(); $(".wdt-emoji-picker").show(); } else { $("#messagebox").prop('disabled', true); $("#messagebox").prop('placeholder', "Messaging is disabled in this channel."); $("#upload-file-btn").hide(); + $("#send-msg-btn").hide(); $(".wdt-emoji-picker").hide(); } if (this_channel.attach_files) { @@ -1989,6 +1997,7 @@ $("#messagebox-filemodal").attr('readonly', true); $("#proceed_fileupload_btn").attr("disabled", true); $("#messagebox").attr('readonly', true); + $("#send-msg-btn").attr("disabled", true); var emojiConvertor = new EmojiConvertor(); emojiConvertor.init_env(); emojiConvertor.replace_mode = "unified"; @@ -2027,6 +2036,7 @@ $("#messagebox-filemodal").attr('readonly', false); $("#proceed_fileupload_btn").attr("disabled", false); $("#filemodalprogress").hide(); + $("#send-msg-btn").attr("disabled", false); if ($("#filemodal").is(":visible")) { $("#messagebox-filemodal").focus(); } else { @@ -2057,6 +2067,11 @@ $("#messagebox").trigger(jQuery.Event("keydown", { keyCode: 13 } )); } }); + + $("#send-msg-btn").click(function () { + $("#messagebox").focus(); + $("#messagebox").trigger(jQuery.Event("keydown", { keyCode: 13 } )); + }); $('#guild-btn').sideNav({ menuWidth: 300, // Default is 300 diff --git a/webapp/titanembeds/templates/embed.html.j2 b/webapp/titanembeds/templates/embed.html.j2 index 781a85b..30e23cf 100644 --- a/webapp/titanembeds/templates/embed.html.j2 +++ b/webapp/titanembeds/templates/embed.html.j2 @@ -80,6 +80,7 @@ file_upload + send