This commit is contained in:
Flatlogic Bot 2026-02-16 02:58:09 +00:00
parent 7aa3b7d910
commit 1a0b8da2ba
3 changed files with 64 additions and 22 deletions

View File

@ -1033,6 +1033,15 @@ document.addEventListener('DOMContentLoaded', () => {
rulesRoleContainer.style.display = (channelType === 'rules') ? 'block' : 'none';
}
// Hide limit, files and clear chat for rules
const editLimitContainer = document.getElementById('edit-channel-limit-container');
const editFilesContainer = document.getElementById('edit-channel-files-container');
const clearChatBtn = document.getElementById('clear-channel-history-btn');
if (editLimitContainer) editLimitContainer.style.display = (channelType === 'rules') ? 'none' : 'block';
if (editFilesContainer) editFilesContainer.style.display = (channelType === 'rules') ? 'none' : 'block';
if (clearChatBtn) clearChatBtn.style.display = (channelType === 'rules') ? 'none' : 'inline-block';
// Reset delete zone
document.getElementById('delete-confirm-zone').style.display = 'none';
@ -1072,6 +1081,20 @@ document.addEventListener('DOMContentLoaded', () => {
rssTabNav.style.display = (type === 'announcement') ? 'block' : 'none';
statusContainer.style.display = (type === 'voice') ? 'block' : 'none';
// Rules specific visibility
const rulesRoleContainer = document.getElementById('edit-channel-rules-role-container');
if (rulesRoleContainer) {
rulesRoleContainer.style.display = (type === 'rules') ? 'block' : 'none';
}
const editLimitContainer = document.getElementById('edit-channel-limit-container');
const editFilesContainer = document.getElementById('edit-channel-files-container');
const clearChatBtn = document.getElementById('clear-channel-history-btn');
if (editLimitContainer) editLimitContainer.style.display = (type === 'rules') ? 'none' : 'block';
if (editFilesContainer) editFilesContainer.style.display = (type === 'rules') ? 'none' : 'block';
if (clearChatBtn) clearChatBtn.style.display = (type === 'rules') ? 'none' : 'inline-block';
});
// RSS Management
@ -2031,18 +2054,15 @@ document.addEventListener('DOMContentLoaded', () => {
const addChannelTypeSelect = document.getElementById('add-channel-type');
addChannelTypeSelect?.addEventListener('change', (e) => {
const type = e.target.value;
const container = document.getElementById('add-channel-rules-role-container');
if (container) {
container.style.display = (e.target.value === 'rules') ? 'block' : 'none';
}
});
const editChannelTypeSelect = document.getElementById('edit-channel-type');
editChannelTypeSelect?.addEventListener('change', (e) => {
const container = document.getElementById('edit-channel-rules-role-container');
if (container) {
container.style.display = (e.target.value === 'rules') ? 'block' : 'none';
container.style.display = (type === 'rules') ? 'block' : 'none';
}
const limitContainer = document.getElementById('add-channel-limit-container');
const filesContainer = document.getElementById('add-channel-files-container');
if (limitContainer) limitContainer.style.display = (type === 'rules') ? 'none' : 'block';
if (filesContainer) filesContainer.style.display = (type === 'rules') ? 'none' : 'block';
});
// User Settings - Avatar Search

View File

@ -1187,14 +1187,18 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
<?php endforeach; ?>
</select>
</div>
<div class="form-check form-switch mb-3">
<input class="form-check-input" type="checkbox" name="allow_file_sharing" id="add-channel-files" value="1" checked>
<label class="form-check-label text-white" for="add-channel-files">Allow File Sharing</label>
<div id="add-channel-files-container">
<div class="form-check form-switch mb-3">
<input class="form-check-input" type="checkbox" name="allow_file_sharing" id="add-channel-files" value="1" checked>
<label class="form-check-label text-white" for="add-channel-files">Allow File Sharing</label>
</div>
</div>
<div class="mb-3">
<label class="form-label text-uppercase fw-bold" style="font-size: 0.7em; color: var(--text-muted);">Message Limit</label>
<input type="number" name="message_limit" class="form-control" placeholder="e.g. 50 (Leave empty for no limit)">
<div class="form-text text-muted" style="font-size: 0.8em;">Automatically keeps only the last X messages in this channel.</div>
<div id="add-channel-limit-container">
<div class="mb-3">
<label class="form-label text-uppercase fw-bold" style="font-size: 0.7em; color: var(--text-muted);">Message Limit</label>
<input type="number" name="message_limit" class="form-control" placeholder="e.g. 50 (Leave empty for no limit)">
<div class="form-text text-muted" style="font-size: 0.8em;">Automatically keeps only the last X messages in this channel.</div>
</div>
</div>
</div>
<div class="modal-footer">
@ -1311,14 +1315,18 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
<input type="text" name="status" id="edit-channel-status" class="form-control bg-dark text-white border-secondary" placeholder="What's happening?">
</div>
<div class="mb-3">
<label class="form-label text-uppercase fw-bold" style="font-size: 0.7em; color: var(--text-muted);">Message Retention</label>
<input type="number" name="message_limit" id="edit-channel-limit" class="form-control bg-dark text-white border-secondary" placeholder="Keep all messages">
<div id="edit-channel-limit-container">
<div class="mb-3">
<label class="form-label text-uppercase fw-bold" style="font-size: 0.7em; color: var(--text-muted);">Message Retention</label>
<input type="number" name="message_limit" id="edit-channel-limit" class="form-control bg-dark text-white border-secondary" placeholder="Keep all messages">
</div>
</div>
<div class="form-check form-switch mb-4">
<input class="form-check-input" type="checkbox" name="allow_file_sharing" id="edit-channel-files" value="1">
<label class="form-check-label text-white" for="edit-channel-files">Allow users to upload files</label>
<div id="edit-channel-files-container">
<div class="form-check form-switch mb-4">
<input class="form-check-input" type="checkbox" name="allow_file_sharing" id="edit-channel-files" value="1">
<label class="form-check-label text-white" for="edit-channel-files">Allow users to upload files</label>
</div>
</div>
</div>
</div>

View File

@ -124,3 +124,17 @@
2026-02-16 00:34:34 - GET /index.php?server_id=1&channel_id=15 - POST: []
2026-02-16 00:34:36 - GET /index.php?server_id=1&channel_id=6 - POST: []
2026-02-16 00:34:39 - GET /index.php?server_id=1&channel_id=1 - POST: []
2026-02-16 00:36:39 - GET /index.php?server_id=dms - POST: []
2026-02-16 00:36:43 - GET /index.php?server_id=dms&channel_id=7 - POST: []
2026-02-16 00:36:46 - GET /index.php?server_id=dms&channel_id=7 - POST: []
2026-02-16 00:36:48 - GET /index.php?server_id=1 - POST: []
2026-02-16 00:36:56 - GET /index.php?server_id=1 - POST: []
2026-02-16 00:37:04 - GET /index.php?server_id=dms - POST: []
2026-02-16 00:37:05 - GET /index.php?server_id=1 - POST: []
2026-02-16 00:38:00 - GET /index.php?server_id=1&channel_id=15 - POST: []
2026-02-16 00:39:58 - GET /index.php?server_id=1 - POST: []
2026-02-16 02:38:56 - GET / - POST: []
2026-02-16 02:54:58 - GET /?fl_project=38443 - POST: []
2026-02-16 02:56:39 - GET /index.php?server_id=1 - POST: []
2026-02-16 02:57:05 - GET /index.php?server_id=1 - POST: []
2026-02-16 02:57:17 - GET /index.php?server_id=1 - POST: []