forked from rDrama/rDrama
fix chat file button
parent
6368ad7e9a
commit
904d41230f
|
@ -185,6 +185,6 @@ h1, h2, h3, h4, h5, h6 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#shrink .format * {
|
#shrink .format .fas {
|
||||||
font-size: 1.3rem !important;
|
font-size: 1.3rem !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,9 @@ function send() {
|
||||||
document.getElementById('quotes_id').value = null;
|
document.getElementById('quotes_id').value = null;
|
||||||
oldfiles[ta.id] = new DataTransfer();
|
oldfiles[ta.id] = new DataTransfer();
|
||||||
input.value = null;
|
input.value = null;
|
||||||
input.previousElementSibling.innerHTML = '<i class="fas fa-image" style="font-size:1.3rem!important"></i>'
|
|
||||||
|
input.previousElementSibling.className = "fas fa-image";
|
||||||
|
input.previousElementSibling.textContent = "";
|
||||||
|
|
||||||
box.scrollTo(0, box.scrollHeight);
|
box.scrollTo(0, box.scrollHeight);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
@ -301,6 +303,7 @@ const input = document.getElementById('file')
|
||||||
function handle_files() {
|
function handle_files() {
|
||||||
if (!input.files.length) return
|
if (!input.files.length) return
|
||||||
const char_limit = screen_width >= 768 ? 50 : 5;
|
const char_limit = screen_width >= 768 ? 50 : 5;
|
||||||
|
input.previousElementSibling.className = "";
|
||||||
input.previousElementSibling.textContent = input.files[0].name.substr(0, char_limit);
|
input.previousElementSibling.textContent = input.files[0].name.substr(0, char_limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
|
|
||||||
{% macro file_btn(input_id, disabled, image_only) %}
|
{% macro file_btn(input_id, disabled, image_only) %}
|
||||||
<label class="btn btn-secondary format m-0" for="{{input_id}}" {% if g.is_tor or disabled %}disabled{% endif %}>
|
<label class="btn btn-secondary format m-0" for="{{input_id}}" {% if g.is_tor or disabled %}disabled{% endif %}>
|
||||||
<i class="fas fa-{% if image_only %}image{% else %}file{% endif %}"></i>
|
<span class="fas fa-{% if image_only %}image{% else %}file{% endif %}"></span>
|
||||||
<input autocomplete="off" id="{{input_id}}" accept="image/*{% if not image_only %}, video/*, audio/*{% endif %}" type="file" multiple="multiple" name="file" {% if g.is_tor or disabled %}disabled{% endif %} hidden>
|
<input autocomplete="off" id="{{input_id}}" accept="image/*{% if not image_only %}, video/*, audio/*{% endif %}" type="file" multiple="multiple" name="file" {% if g.is_tor or disabled %}disabled{% endif %} hidden>
|
||||||
</label>
|
</label>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
Loading…
Reference in New Issue