Autosave: 20260215-162152

This commit is contained in:
Flatlogic Bot 2026-02-15 16:21:52 +00:00
parent 5d6fd46690
commit 7a52251131

View File

@ -260,11 +260,20 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
} }
} }
echo htmlspecialchars($active_server_name); echo htmlspecialchars($active_server_name);
if ($is_owner || $can_manage_server): ?> ?>
<span class="ms-auto" style="cursor: pointer;" data-bs-toggle="modal" data-bs-target="#serverSettingsModal"> <div class="ms-auto d-flex align-items-center">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0 7a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0 7a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/></svg> <?php if ($can_manage_channels): ?>
</span> <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">
<?php endif; <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>
</span>
<?php endif; ?>
<?php if ($is_owner || $can_manage_server): ?>
<span style="cursor: pointer; opacity: 0.7;" data-bs-toggle="modal" data-bs-target="#serverSettingsModal" title="Server Settings">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0 7a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0 7a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/></svg>
</span>
<?php endif; ?>
</div>
<?php
} }
?> ?>
</div> </div>
@ -283,8 +292,8 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
<?php <?php
// Separate categories and channels // Separate categories and channels
$categories = array_filter($channels, function($c) { return $c['type'] === 'category'; }); $categories = array_filter($channels, function($c) { return $c['type'] === 'category'; });
$top_level_channels = array_filter($channels, function($c) { $top_level_channels = array_filter($channels, function($c) use ($channels) {
return $c['type'] !== 'category' && (empty($c['category_id']) || !in_array($c['category_id'], array_column($GLOBALS['channels'] ?? [], 'id'))); return $c['type'] !== 'category' && (empty($c['category_id']) || !in_array($c['category_id'], array_column($channels, 'id')));
}); });
// Helper to render a channel item // Helper to render a channel item
@ -995,6 +1004,7 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button> <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div> </div>
<form action="api_v1_channels.php" method="POST"> <form action="api_v1_channels.php" method="POST">
<input type="hidden" name="action" value="create">
<input type="hidden" name="server_id" value="<?php echo $active_server_id; ?>"> <input type="hidden" name="server_id" value="<?php echo $active_server_id; ?>">
<div class="modal-body"> <div class="modal-body">
<div class="mb-3"> <div class="mb-3">