ReleaseV16+ChatBarRemoved
This commit is contained in:
parent
f6a1c63d68
commit
c5948928c6
@ -645,7 +645,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
chatForm?.addEventListener('submit', (e) => {
|
||||
e.preventDefault();
|
||||
const content = chatInput.value.trim();
|
||||
const file = fileUpload.files[0];
|
||||
const file = fileUpload?.files?.[0];
|
||||
if (!content && !file) return;
|
||||
|
||||
chatInput.value = '';
|
||||
@ -665,7 +665,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
if (file) {
|
||||
formData.append('file', file);
|
||||
fileUpload.value = ''; // Clear file input
|
||||
if (fileUpload) fileUpload.value = ''; // Clear file input
|
||||
|
||||
// Show progress bar
|
||||
progressContainer.style.display = 'block';
|
||||
|
||||
13
index.php
13
index.php
@ -1599,8 +1599,6 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div id="typing-indicator" class="typing-indicator"></div>
|
||||
<div class="chat-input-container">
|
||||
<?php
|
||||
require_once 'includes/permissions.php';
|
||||
if ($active_thread) {
|
||||
@ -1612,8 +1610,13 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||
if ($channel_type === 'rules') $show_input = false;
|
||||
if ($channel_type === 'forum' && !$active_thread) $show_input = false;
|
||||
if (($channel_type === 'announcement' || $channel_type === 'text') && !$can_manage_channels) $show_input = false;
|
||||
if (in_array($channel_type, ['autorole', 'event', 'poll'])) $show_input = false;
|
||||
?>
|
||||
|
||||
if ($show_input):
|
||||
<?php if ($show_input): ?>
|
||||
<div id="typing-indicator" class="typing-indicator"></div>
|
||||
<div class="chat-input-container">
|
||||
<?php
|
||||
if (!$can_send) {
|
||||
echo '<div class="chat-input-wrapper justify-content-center p-3 text-muted small" style="background-color: #2b2d31; border-radius: 8px;">
|
||||
<i class="fa-solid fa-lock me-2"></i> Vous ne disposez pas de la permission d\'envoyer des messages dans ce salon.
|
||||
@ -1626,7 +1629,7 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<div id="upload-progress-container" class="upload-progress-container" style="display: none;">
|
||||
<div class="progress" style="height: 4px; background-color: var(--separator); border-radius: 2px; overflow: hidden;">
|
||||
<div id="upload-progress-bar" class="progress-bar" role="progressbar" style="width: 0%; background-color: var(--blurple);"></div>
|
||||
@ -1668,8 +1671,8 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Members Sidebar -->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user