Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/api/dashboard/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ async def get_guild_roles(guild_id: int, user: dict = Depends(get_current_user))

roles = [
{"id": str(r.id), "name": r.name, "color": str(r.color)}
for r in guild.roles if not r.is_default() and not r.managed
for r in guild.roles
if not r.is_default() and not r.managed
]
return {"roles": roles}

Expand Down Expand Up @@ -397,7 +398,11 @@ async def get_mega_data(guild_id: int, user: dict = Depends(get_current_user)):

# 3. Fetch Metadata
channels = [{"id": str(c.id), "name": c.name} for c in guild.text_channels]
roles = [{"id": str(r.id), "name": r.name, "color": str(r.color)} for r in guild.roles if not r.is_default() and not r.managed]
roles = [
{"id": str(r.id), "name": r.name, "color": str(r.color)}
for r in guild.roles
if not r.is_default() and not r.managed
]
categories = [{"id": str(c.id), "name": c.name} for c in guild.categories]
voice_channels = [{"id": str(c.id), "name": c.name} for c in guild.voice_channels]

Expand Down
4 changes: 2 additions & 2 deletions src/web/components/ui/SearchableSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function SearchableSelect({
{type === "role" && (
<div
className="w-3 h-3 rounded-full shrink-0"
style={{ backgroundColor: selectedOption.color || "#99aab5" }}
style={{ backgroundColor: (selectedOption.color && selectedOption.color !== "#000000") ? selectedOption.color : "#99aab5" }}
/>
)}
<span className="truncate">{selectedOption.name}</span>
Expand Down Expand Up @@ -107,7 +107,7 @@ export function SearchableSelect({
{type === "role" && (
<div
className="w-3 h-3 rounded-full shrink-0"
style={{ backgroundColor: option.color || "#99aab5" }}
style={{ backgroundColor: (option.color && option.color !== "#000000") ? option.color : "#99aab5" }}
/>
)}
<span className="truncate flex-1 text-white/90">{option.name}</span>
Expand Down
Loading