ReleaseV16+ChatBarRemoved

This commit is contained in:
Flatlogic Bot 2026-02-21 16:56:38 +00:00
parent f6a1c63d68
commit c5948928c6
2 changed files with 10 additions and 7 deletions

View File

@ -645,7 +645,7 @@ document.addEventListener('DOMContentLoaded', () => {
chatForm?.addEventListener('submit', (e) => { chatForm?.addEventListener('submit', (e) => {
e.preventDefault(); e.preventDefault();
const content = chatInput.value.trim(); const content = chatInput.value.trim();
const file = fileUpload.files[0]; const file = fileUpload?.files?.[0];
if (!content && !file) return; if (!content && !file) return;
chatInput.value = ''; chatInput.value = '';
@ -665,7 +665,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (file) { if (file) {
formData.append('file', file); formData.append('file', file);
fileUpload.value = ''; // Clear file input if (fileUpload) fileUpload.value = ''; // Clear file input
// Show progress bar // Show progress bar
progressContainer.style.display = 'block'; progressContainer.style.display = 'block';

View File

@ -1599,8 +1599,6 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>
</div> </div>
<div id="typing-indicator" class="typing-indicator"></div>
<div class="chat-input-container">
<?php <?php
require_once 'includes/permissions.php'; require_once 'includes/permissions.php';
if ($active_thread) { if ($active_thread) {
@ -1612,8 +1610,13 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
if ($channel_type === 'rules') $show_input = false; if ($channel_type === 'rules') $show_input = false;
if ($channel_type === 'forum' && !$active_thread) $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 (($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) { if (!$can_send) {
echo '<div class="chat-input-wrapper justify-content-center p-3 text-muted small" style="background-color: #2b2d31; border-radius: 8px;"> 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. <i class="fa-solid fa-lock me-2"></i> Vous ne disposez pas de la permission d\'envoyer des messages dans ce salon.
@ -1668,8 +1671,8 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
</div> </div>
</form> </form>
<?php } ?> <?php } ?>
<?php endif; ?>
</div> </div>
<?php endif; ?>
</div> </div>
<!-- Members Sidebar --> <!-- Members Sidebar -->