diff --git a/assets/js/main.js b/assets/js/main.js index 87eac19..8d0118b 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -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 diff --git a/index.php b/index.php index 7a6c852..4dddbcf 100644 --- a/index.php +++ b/index.php @@ -1187,14 +1187,18 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? ''; -
- - +
+
+ + +
-
- - -
Automatically keeps only the last X messages in this channel.
+
+
+ + +
Automatically keeps only the last X messages in this channel.
+
-
- - +
+
+ + +
-
- - +
+
+ + +
diff --git a/requests.log b/requests.log index 9941543..e68003c 100644 --- a/requests.log +++ b/requests.log @@ -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: []