+ a coté du nom de serveur

This commit is contained in:
Flatlogic Bot 2026-02-17 10:15:53 +00:00
parent 95cfa227e9
commit 920e26ada3
4 changed files with 45 additions and 10 deletions

View File

@ -471,6 +471,12 @@ body {
box-shadow: 0 0 0 0.25rem rgba(88, 101, 242, 0.25); box-shadow: 0 0 0 0.25rem rgba(88, 101, 242, 0.25);
} }
.form-control:disabled, .form-control[readonly] {
background-color: var(--bg-servers) !important;
color: var(--text-primary) !important;
opacity: 0.6;
}
/* User Panel */ /* User Panel */
.user-panel { .user-panel {
height: 52px; height: 52px;
@ -1252,6 +1258,10 @@ body {
color: #ffffff; color: #ffffff;
} }
[data-theme="dark"] .text-muted {
color: var(--text-muted) !important;
}
.permission-item { .permission-item {
border-bottom: 1px solid rgba(255, 255, 255, 0.05); border-bottom: 1px solid rgba(255, 255, 255, 0.05);
} }

View File

@ -10,8 +10,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if ($username && $email && $password) { if ($username && $email && $password) {
$hash = password_hash($password, PASSWORD_DEFAULT); $hash = password_hash($password, PASSWORD_DEFAULT);
try { try {
$stmt = db()->prepare("INSERT INTO users (username, email, password_hash) VALUES (?, ?, ?)"); $stmt = db()->prepare("INSERT INTO users (username, display_name, email, password_hash) VALUES (?, ?, ?, ?)");
$stmt->execute([$username, $email, $hash]); $stmt->execute([$username, $username, $email, $hash]);
$userId = db()->lastInsertId(); $userId = db()->lastInsertId();
// Add to default server // Add to default server

View File

@ -76,7 +76,7 @@ function parse_markdown($text) {
$html = preg_replace('/^### (.*$)/m', '<h3>$1</h3>', $html); $html = preg_replace('/^### (.*$)/m', '<h3>$1</h3>', $html);
// Subtext: -# text (must be at start of line) // Subtext: -# text (must be at start of line)
$html = preg_replace('/^-# (.*$)/m', '<small class="text-muted d-block" style="font-size: 0.8em;">$1</small>', $html); $html = preg_replace('/^-# (.*$)/m', '<small class="d-block" style="font-size: 0.8em; color: var(--text-muted);">$1</small>', $html);
// Blockquotes: > text or >>> text // Blockquotes: > text or >>> text
$html = preg_replace('/^&gt; (.*$)/m', '<blockquote>$1</blockquote>', $html); $html = preg_replace('/^&gt; (.*$)/m', '<blockquote>$1</blockquote>', $html);
@ -277,7 +277,7 @@ if ($is_dm_view) {
} }
$stmt = db()->prepare(" $stmt = db()->prepare("
SELECT t.*, u.username, u.avatar_url, SELECT t.*, u.display_name as username, u.username as login_name, u.avatar_url,
(SELECT COUNT(*) FROM messages m WHERE m.thread_id = t.id) as message_count, (SELECT COUNT(*) FROM messages m WHERE m.thread_id = t.id) as message_count,
(SELECT MAX(created_at) FROM messages m WHERE m.thread_id = t.id) as last_activity, (SELECT MAX(created_at) FROM messages m WHERE m.thread_id = t.id) as last_activity,
(SELECT r.color FROM roles r JOIN user_roles ur ON r.id = ur.role_id WHERE ur.user_id = u.id AND r.server_id = ? ORDER BY r.position DESC LIMIT 1) as role_color, (SELECT r.color FROM roles r JOIN user_roles ur ON r.id = ur.role_id WHERE ur.user_id = u.id AND r.server_id = ? ORDER BY r.position DESC LIMIT 1) as role_color,
@ -426,7 +426,7 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
<div class="channels-header"> <div class="channels-header">
<?php <?php
if ($is_dm_view) { if ($is_dm_view) {
echo "Direct Messages"; echo '<span class="text-truncate flex-grow-1" style="min-width: 0;">Direct Messages</span>';
} else { } else {
$active_server_name = 'Server'; $active_server_name = 'Server';
foreach($servers as $s) { foreach($servers as $s) {
@ -435,9 +435,9 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
break; break;
} }
} }
echo htmlspecialchars($active_server_name); echo '<span class="text-truncate flex-grow-1" style="min-width: 0;">' . htmlspecialchars($active_server_name) . '</span>';
?> ?>
<div class="ms-auto d-flex align-items-center"> <div class="d-flex align-items-center ps-2">
<?php if ($can_manage_channels): ?> <?php if ($can_manage_channels): ?>
<span class="add-channel-btn me-2" style="cursor: pointer; opacity: 0.7;" data-bs-toggle="modal" data-bs-target="#addChannelModal" data-type="chat" data-category-id="" title="Create Channel"> <span class="add-channel-btn me-2" style="cursor: pointer; opacity: 0.7;" data-bs-toggle="modal" data-bs-target="#addChannelModal" data-type="chat" data-category-id="" title="Create Channel">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
@ -634,7 +634,7 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
} }
?> ?>
</span> </span>
<span class="flex-grow-1"><?php echo htmlspecialchars($current_channel_name); ?></span> <span class="flex-grow-1 text-truncate me-2" style="min-width: 0;"><?php echo htmlspecialchars($current_channel_name); ?></span>
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<button id="toggle-members-btn" class="btn btn-link text-muted p-1 me-2" title="Toggle Members List"> <button id="toggle-members-btn" class="btn btn-link text-muted p-1 me-2" title="Toggle Members List">
@ -1107,7 +1107,7 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
<div class="col-md-8"> <div class="col-md-8">
<div class="mb-3"> <div class="mb-3">
<label class="form-label text-uppercase fw-bold" style="font-size: 0.7em; color: var(--text-muted);">ID connexion</label> <label class="form-label text-uppercase fw-bold" style="font-size: 0.7em; color: var(--text-muted);">ID connexion</label>
<input type="text" class="form-control" value="<?php echo htmlspecialchars($user['username']); ?>" disabled> <input type="text" class="form-control" value="<?php echo htmlspecialchars($user['username']); ?>" readonly>
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label class="form-label text-uppercase fw-bold" style="font-size: 0.7em; color: var(--text-muted);">Username display</label> <label class="form-label text-uppercase fw-bold" style="font-size: 0.7em; color: var(--text-muted);">Username display</label>
@ -1991,7 +1991,7 @@ async function handleSaveUserSettings(btn) {
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script> <script>
window.currentUserId = <?php echo $current_user_id; ?>; window.currentUserId = <?php echo $current_user_id; ?>;
window.currentUsername = "<?php echo addslashes($user['username']); ?>"; window.currentUsername = "<?php echo addslashes($user['display_name'] ?? $user['username']); ?>";
window.currentChannelName = "<?php echo addslashes($current_channel_name); ?>"; window.currentChannelName = "<?php echo addslashes($current_channel_name); ?>";
window.isServerOwner = <?php echo ($is_owner ?? false) ? 'true' : 'false'; ?>; window.isServerOwner = <?php echo ($is_owner ?? false) ? 'true' : 'false'; ?>;
window.canManageServer = <?php echo ($can_manage_server ?? false) ? 'true' : 'false'; ?>; window.canManageServer = <?php echo ($can_manage_server ?? false) ? 'true' : 'false'; ?>;

View File

@ -456,3 +456,28 @@
2026-02-17 08:20:46 - GET /index.php?server_id=1&channel_id=11 - POST: [] 2026-02-17 08:20:46 - GET /index.php?server_id=1&channel_id=11 - POST: []
2026-02-17 08:20:48 - GET /index.php?server_id=1&channel_id=21 - POST: [] 2026-02-17 08:20:48 - GET /index.php?server_id=1&channel_id=21 - POST: []
2026-02-17 08:27:06 - GET /?fl_project=38443 - POST: [] 2026-02-17 08:27:06 - GET /?fl_project=38443 - POST: []
2026-02-17 08:31:06 - GET / - POST: []
2026-02-17 08:31:24 - GET /?fl_project=38443 - POST: []
2026-02-17 08:46:59 - GET /index.php?server_id=1&channel_id=21 - POST: []
{"date":"2026-02-17 08:47:14","method":"POST","post":{"avatar_url":"","display_name":"swefpifh\u00b2","dnd_mode":"1","sound_notifications":"1","theme":"dark"},"session":{"user_id":2},"user_id":2,"db_success":true}
2026-02-17 08:47:14 - GET /index.php?server_id=1&channel_id=21 - POST: []
2026-02-17 08:47:19 - GET /index.php?server_id=1&channel_id=6 - POST: []
2026-02-17 09:19:30 - GET /index.php?server_id=1&channel_id=6 - POST: []
2026-02-17 09:19:32 - GET /index.php - POST: []
{"date":"2026-02-17 09:20:03","method":"POST","post":{"avatar_url":"","display_name":"swefheim","theme":"light","dnd_mode":"0","sound_notifications":"0"},"session":{"user_id":3},"user_id":3,"db_success":true}
2026-02-17 09:20:03 - GET /index.php - POST: []
{"date":"2026-02-17 09:20:46","method":"POST","post":{"avatar_url":"","display_name":"swefpifh \u1d47\u02b0\u1da0\u02b3","dnd_mode":"1","sound_notifications":"1","theme":"dark"},"session":{"user_id":2},"user_id":2,"db_success":true}
2026-02-17 09:20:47 - GET /index.php?server_id=1&channel_id=6 - POST: []
{"date":"2026-02-17 09:21:25","method":"POST","post":{"avatar_url":"","display_name":"\u1d47\u02b0\u1da0\u02b3 swefpifh","dnd_mode":"1","sound_notifications":"1","theme":"dark"},"session":{"user_id":2},"user_id":2,"db_success":true}
2026-02-17 09:21:25 - GET /index.php?server_id=1&channel_id=6 - POST: []
{"date":"2026-02-17 09:22:02","method":"POST","post":{"avatar_url":"","display_name":"swefpifh \u1d47\u02b0\u1da0\u02b3","dnd_mode":"1","sound_notifications":"1","theme":"dark"},"session":{"user_id":2},"user_id":2,"db_success":true}
2026-02-17 09:22:02 - GET /index.php?server_id=1&channel_id=6 - POST: []
2026-02-17 09:22:13 - GET /index.php - POST: []
2026-02-17 09:22:18 - GET /index.php?server_id=1&channel_id=1 - POST: []
2026-02-17 09:22:20 - GET /index.php?server_id=1&channel_id=6 - POST: []
2026-02-17 09:22:25 - GET /index.php?server_id=1&channel_id=15 - POST: []
2026-02-17 09:22:29 - GET /index.php?server_id=1&channel_id=6 - POST: []
2026-02-17 09:36:55 - GET /?fl_project=38443 - POST: []
2026-02-17 09:48:03 - GET /index.php?server_id=1&channel_id=6 - POST: []
2026-02-17 09:56:28 - GET /?fl_project=38443 - POST: []
2026-02-17 09:57:00 - GET /index.php?server_id=1&channel_id=6 - POST: []