fix: uploads
This commit is contained in:
parent
e1dd679c47
commit
5c97cc515f
2 changed files with 25 additions and 19 deletions
|
|
@ -144,6 +144,10 @@
|
||||||
|
|
||||||
<div class="chat-input-wrapper">
|
<div class="chat-input-wrapper">
|
||||||
<form id="message-form" class="message-form">
|
<form id="message-form" class="message-form">
|
||||||
|
<input id="media-file-input" type="file" class="hidden-file-input" accept="image/*,video/*,audio/*,.pdf,.txt,.zip,.rar,.7z,.tar,.gz,.json,.csv,.md" />
|
||||||
|
<button type="button" id="media-upload-btn" class="input-action-btn" title="Upload File">
|
||||||
|
<i data-lucide="paperclip"></i>
|
||||||
|
</button>
|
||||||
<button type="button" id="gif-btn" class="input-action-btn" title="Open GIF Picker">
|
<button type="button" id="gif-btn" class="input-action-btn" title="Open GIF Picker">
|
||||||
<i data-lucide="image"></i>
|
<i data-lucide="image"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -1914,6 +1914,7 @@ async function init() {
|
||||||
} catch (err) { alert(err.message); }
|
} catch (err) { alert(err.message); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (el.mediaUploadBtn && el.mediaFileInput) {
|
||||||
el.mediaUploadBtn.onclick = () => {
|
el.mediaUploadBtn.onclick = () => {
|
||||||
if (!state.selectedTextChannelId && !state.selectedDmUserId) {
|
if (!state.selectedTextChannelId && !state.selectedDmUserId) {
|
||||||
alert("Select a chat first.");
|
alert("Select a chat first.");
|
||||||
|
|
@ -1933,6 +1934,7 @@ async function init() {
|
||||||
el.mediaFileInput.value = "";
|
el.mediaFileInput.value = "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// 4. Voice/Soundboard Controls
|
// 4. Voice/Soundboard Controls
|
||||||
el.voiceVideoBtn.onclick = toggleVideo;
|
el.voiceVideoBtn.onclick = toggleVideo;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue