@agent-relay/dashboard 2.0.80 → 2.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/404.html +1 -1
- package/out/_next/static/chunks/{118-4c8241b0218335de.js → 118-ae2b650136a5a5fc.js} +1 -1
- package/out/_next/static/chunks/407-0c82986cf79c8ecb.js +1 -0
- package/out/_next/static/chunks/app/app/[[...slug]]/{page-1e81c047cff17212.js → page-f7eca1b66fb4249b.js} +1 -1
- package/out/_next/static/chunks/app/{page-6892fe2dd07fb48b.js → page-0ee604f7070d14c0.js} +1 -1
- package/out/_next/static/css/8968d98ed4c4d33f.css +1 -0
- package/out/about.html +2 -2
- package/out/about.txt +1 -1
- package/out/app/onboarding.html +1 -1
- package/out/app/onboarding.txt +1 -1
- package/out/app.html +1 -1
- package/out/app.txt +2 -2
- package/out/blog/go-to-bed-wake-up-to-a-finished-product.html +2 -2
- package/out/blog/go-to-bed-wake-up-to-a-finished-product.txt +1 -1
- package/out/blog/let-them-cook-multi-agent-orchestration.html +2 -2
- package/out/blog/let-them-cook-multi-agent-orchestration.txt +2 -2
- package/out/blog.html +2 -2
- package/out/blog.txt +1 -1
- package/out/careers.html +2 -2
- package/out/careers.txt +1 -1
- package/out/changelog.html +2 -2
- package/out/changelog.txt +1 -1
- package/out/cloud/link.html +1 -1
- package/out/cloud/link.txt +2 -2
- package/out/complete-profile.html +2 -2
- package/out/complete-profile.txt +1 -1
- package/out/connect-repos.html +1 -1
- package/out/connect-repos.txt +1 -1
- package/out/contact.html +2 -2
- package/out/contact.txt +1 -1
- package/out/docs.html +2 -2
- package/out/docs.txt +1 -1
- package/out/history.html +1 -1
- package/out/history.txt +2 -2
- package/out/index.html +1 -1
- package/out/index.txt +2 -2
- package/out/login.html +2 -2
- package/out/login.txt +1 -1
- package/out/metrics.html +1 -1
- package/out/metrics.txt +2 -2
- package/out/pricing.html +2 -2
- package/out/pricing.txt +1 -1
- package/out/privacy.html +2 -2
- package/out/privacy.txt +1 -1
- package/out/providers/setup/claude.html +1 -1
- package/out/providers/setup/claude.txt +1 -1
- package/out/providers/setup/codex.html +1 -1
- package/out/providers/setup/codex.txt +1 -1
- package/out/providers/setup/cursor.html +1 -1
- package/out/providers/setup/cursor.txt +1 -1
- package/out/providers.html +1 -1
- package/out/providers.txt +1 -1
- package/out/security.html +2 -2
- package/out/security.txt +1 -1
- package/out/signup.html +2 -2
- package/out/signup.txt +1 -1
- package/out/terms.html +2 -2
- package/out/terms.txt +1 -1
- package/package.json +7 -1
- package/src/app/about/page.tsx +7 -0
- package/src/app/app/[[...slug]]/DashboardPageClient.tsx +853 -0
- package/src/app/app/[[...slug]]/page.tsx +23 -0
- package/src/app/app/onboarding/page.tsx +394 -0
- package/src/app/apple-icon.png +0 -0
- package/src/app/blog/go-to-bed-wake-up-to-a-finished-product/page.tsx +88 -0
- package/src/app/blog/let-them-cook-multi-agent-orchestration/page.tsx +93 -0
- package/src/app/blog/page.tsx +15 -0
- package/src/app/careers/page.tsx +7 -0
- package/src/app/changelog/page.tsx +7 -0
- package/src/app/cloud/link/page.tsx +464 -0
- package/src/app/complete-profile/page.tsx +204 -0
- package/src/app/connect-repos/page.tsx +410 -0
- package/src/app/contact/page.tsx +7 -0
- package/src/app/docs/page.tsx +7 -0
- package/src/app/favicon.png +0 -0
- package/src/app/globals.css +200 -0
- package/src/app/history/page.tsx +658 -0
- package/src/app/layout.tsx +25 -0
- package/src/app/login/page.tsx +424 -0
- package/src/app/metrics/page.tsx +781 -0
- package/src/app/page.tsx +59 -0
- package/src/app/pricing/page.tsx +7 -0
- package/src/app/privacy/page.tsx +7 -0
- package/src/app/providers/page.tsx +193 -0
- package/src/app/providers/setup/[provider]/ProviderSetupClient.tsx +197 -0
- package/src/app/providers/setup/[provider]/constants.ts +35 -0
- package/src/app/providers/setup/[provider]/page.tsx +42 -0
- package/src/app/security/page.tsx +7 -0
- package/src/app/signup/page.tsx +533 -0
- package/src/app/terms/page.tsx +7 -0
- package/src/components/ActivityFeed.tsx +216 -0
- package/src/components/AddWorkspaceModal.tsx +170 -0
- package/src/components/AgentCard.test.tsx +134 -0
- package/src/components/AgentCard.tsx +585 -0
- package/src/components/AgentList.test.tsx +147 -0
- package/src/components/AgentList.tsx +419 -0
- package/src/components/AgentLogPreview.tsx +173 -0
- package/src/components/AgentProfilePanel.tsx +569 -0
- package/src/components/App.tsx +3424 -0
- package/src/components/BillingPanel.tsx +922 -0
- package/src/components/BillingResult.tsx +447 -0
- package/src/components/BroadcastComposer.tsx +690 -0
- package/src/components/ChannelAdminPanel.tsx +773 -0
- package/src/components/ChannelBrowser.tsx +385 -0
- package/src/components/ChannelChat.tsx +261 -0
- package/src/components/ChannelSidebar.tsx +399 -0
- package/src/components/CloudSessionProvider.tsx +130 -0
- package/src/components/CommandPalette.tsx +815 -0
- package/src/components/ConfirmationDialog.tsx +133 -0
- package/src/components/ConversationHistory.tsx +518 -0
- package/src/components/CoordinatorPanel.tsx +956 -0
- package/src/components/DecisionQueue.tsx +717 -0
- package/src/components/DirectMessageView.tsx +164 -0
- package/src/components/FileAutocomplete.tsx +368 -0
- package/src/components/FleetOverview.tsx +278 -0
- package/src/components/LogViewer.tsx +310 -0
- package/src/components/LogViewerPanel.tsx +482 -0
- package/src/components/Logo.tsx +284 -0
- package/src/components/MentionAutocomplete.tsx +384 -0
- package/src/components/MessageComposer.tsx +473 -0
- package/src/components/MessageList.tsx +725 -0
- package/src/components/MessageSenderName.tsx +91 -0
- package/src/components/MessageStatusIndicator.tsx +142 -0
- package/src/components/NewConversationModal.tsx +400 -0
- package/src/components/NotificationToast.tsx +488 -0
- package/src/components/OnlineUsersIndicator.tsx +164 -0
- package/src/components/Pagination.tsx +124 -0
- package/src/components/PricingPlans.tsx +386 -0
- package/src/components/ProjectList.tsx +711 -0
- package/src/components/ProviderAuthFlow.tsx +343 -0
- package/src/components/ProviderConnectionList.tsx +375 -0
- package/src/components/ProvisioningProgress.tsx +730 -0
- package/src/components/ReactionChips.tsx +70 -0
- package/src/components/ReactionPicker.tsx +121 -0
- package/src/components/RepoAccessPanel.tsx +787 -0
- package/src/components/RepositoriesPanel.tsx +901 -0
- package/src/components/ServerCard.tsx +202 -0
- package/src/components/SessionExpiredModal.tsx +128 -0
- package/src/components/SpawnModal.test.tsx +190 -0
- package/src/components/SpawnModal.tsx +1001 -0
- package/src/components/TaskAssignmentUI.tsx +375 -0
- package/src/components/TerminalProviderSetup.tsx +517 -0
- package/src/components/ThemeProvider.tsx +159 -0
- package/src/components/ThinkingIndicator.tsx +231 -0
- package/src/components/ThreadList.tsx +198 -0
- package/src/components/ThreadPanel.tsx +405 -0
- package/src/components/TrajectoryViewer.tsx +698 -0
- package/src/components/TypingIndicator.tsx +69 -0
- package/src/components/UsageBanner.tsx +231 -0
- package/src/components/UserProfilePanel.tsx +233 -0
- package/src/components/WorkspaceContext.tsx +95 -0
- package/src/components/WorkspaceSelector.tsx +234 -0
- package/src/components/WorkspaceStatusIndicator.tsx +396 -0
- package/src/components/XTermInteractive.tsx +516 -0
- package/src/components/XTermLogViewer.tsx +719 -0
- package/src/components/channels/ChannelDialogs.tsx +1411 -0
- package/src/components/channels/ChannelHeader.tsx +317 -0
- package/src/components/channels/ChannelMessageList.tsx +463 -0
- package/src/components/channels/ChannelViewV1.tsx +146 -0
- package/src/components/channels/MessageInput.tsx +302 -0
- package/src/components/channels/SearchInput.tsx +172 -0
- package/src/components/channels/SearchResults.tsx +336 -0
- package/src/components/channels/api.test.ts +1527 -0
- package/src/components/channels/api.ts +703 -0
- package/src/components/channels/index.ts +76 -0
- package/src/components/channels/mockApi.ts +344 -0
- package/src/components/channels/types.ts +566 -0
- package/src/components/hooks/index.ts +58 -0
- package/src/components/hooks/useAgentLogs.ts +504 -0
- package/src/components/hooks/useAgents.ts +127 -0
- package/src/components/hooks/useBroadcastDedup.test.ts +371 -0
- package/src/components/hooks/useBroadcastDedup.ts +86 -0
- package/src/components/hooks/useChannelAdmin.ts +329 -0
- package/src/components/hooks/useChannelBrowser.ts +239 -0
- package/src/components/hooks/useChannelCommands.ts +138 -0
- package/src/components/hooks/useChannels.ts +367 -0
- package/src/components/hooks/useDebounce.ts +29 -0
- package/src/components/hooks/useDirectMessage.test.ts +952 -0
- package/src/components/hooks/useDirectMessage.ts +141 -0
- package/src/components/hooks/useMessages.ts +310 -0
- package/src/components/hooks/useOrchestrator.test.ts +165 -0
- package/src/components/hooks/useOrchestrator.ts +424 -0
- package/src/components/hooks/usePinnedAgents.test.ts +356 -0
- package/src/components/hooks/usePinnedAgents.ts +140 -0
- package/src/components/hooks/usePresence.test.ts +245 -0
- package/src/components/hooks/usePresence.ts +377 -0
- package/src/components/hooks/useRecentRepos.ts +130 -0
- package/src/components/hooks/useSession.ts +209 -0
- package/src/components/hooks/useThread.ts +138 -0
- package/src/components/hooks/useTrajectory.ts +265 -0
- package/src/components/hooks/useWebSocket.ts +290 -0
- package/src/components/hooks/useWorkspaceMembers.ts +132 -0
- package/src/components/hooks/useWorkspaceRepos.ts +73 -0
- package/src/components/hooks/useWorkspaceStatus.ts +237 -0
- package/src/components/index.ts +81 -0
- package/src/components/layout/Header.tsx +311 -0
- package/src/components/layout/RepoContextHeader.tsx +361 -0
- package/src/components/layout/Sidebar.archive.test.tsx +126 -0
- package/src/components/layout/Sidebar.test.tsx +691 -0
- package/src/components/layout/Sidebar.tsx +900 -0
- package/src/components/layout/index.ts +7 -0
- package/src/components/settings/BillingSettingsPanel.tsx +564 -0
- package/src/components/settings/SettingsPage.tsx +683 -0
- package/src/components/settings/TeamSettingsPanel.tsx +560 -0
- package/src/components/settings/WorkspaceSettingsPanel.tsx +1368 -0
- package/src/components/settings/index.ts +11 -0
- package/src/components/settings/types.ts +79 -0
- package/src/components/utils/messageFormatting.test.tsx +331 -0
- package/src/components/utils/messageFormatting.tsx +597 -0
- package/src/index.ts +63 -0
- package/src/landing/AboutPage.tsx +77 -0
- package/src/landing/BlogContent.tsx +187 -0
- package/src/landing/BlogPage.tsx +47 -0
- package/src/landing/CareersPage.tsx +53 -0
- package/src/landing/ChangelogPage.tsx +33 -0
- package/src/landing/ContactPage.tsx +41 -0
- package/src/landing/DocsPage.tsx +43 -0
- package/src/landing/LandingPage.tsx +702 -0
- package/src/landing/PricingPage.tsx +549 -0
- package/src/landing/PrivacyPage.tsx +117 -0
- package/src/landing/SecurityPage.tsx +42 -0
- package/src/landing/StaticPage.tsx +165 -0
- package/src/landing/TermsPage.tsx +125 -0
- package/src/landing/blogData.ts +312 -0
- package/src/landing/index.ts +18 -0
- package/src/landing/styles.css +3673 -0
- package/src/lib/agent-merge.test.ts +43 -0
- package/src/lib/agent-merge.ts +35 -0
- package/src/lib/api.ts +1294 -0
- package/src/lib/cloudApi.ts +893 -0
- package/src/lib/colors.test.ts +175 -0
- package/src/lib/colors.ts +218 -0
- package/src/lib/config.ts +109 -0
- package/src/lib/hierarchy.ts +242 -0
- package/src/lib/stuckDetection.ts +142 -0
- package/src/lib/useUrlRouting.ts +190 -0
- package/src/types/index.ts +317 -0
- package/src/types/threading.ts +7 -0
- package/out/_next/static/chunks/285-dc644487a8d6500d.js +0 -1
- package/out/_next/static/css/4c58d9cf493aa626.css +0 -1
- /package/out/_next/static/{AqelRhy1vr2nBUcU0Iqcp → IxfA6RZu4trcsEMYlkQra}/_buildManifest.js +0 -0
- /package/out/_next/static/{AqelRhy1vr2nBUcU0Iqcp → IxfA6RZu4trcsEMYlkQra}/_ssgManifest.js +0 -0
- /package/out/_next/static/chunks/{528-d375bc8b46912d2c.js → 528-f5f676996d613c25.js} +0 -0
- /package/out/_next/static/chunks/app/blog/let-them-cook-multi-agent-orchestration/{page-a58308f43557b908.js → page-b194f207fbd91862.js} +0 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChannelHeader Component
|
|
3
|
+
*
|
|
4
|
+
* Displays channel information and provides quick actions.
|
|
5
|
+
* Shows channel name, description, member count, and action buttons.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
|
+
import type { Channel, ChannelMember, ChannelHeaderProps } from './types';
|
|
10
|
+
|
|
11
|
+
export function ChannelHeader({
|
|
12
|
+
channel,
|
|
13
|
+
members = [],
|
|
14
|
+
canEdit = false,
|
|
15
|
+
onEditChannel,
|
|
16
|
+
onShowMembers,
|
|
17
|
+
onShowPinned,
|
|
18
|
+
onSearch,
|
|
19
|
+
}: ChannelHeaderProps) {
|
|
20
|
+
const [showDetails, setShowDetails] = useState(false);
|
|
21
|
+
|
|
22
|
+
const isDm = channel.isDm;
|
|
23
|
+
const displayName = isDm ? channel.name : `${channel.name}`;
|
|
24
|
+
const onlineCount = members.filter(m => m.status === 'online').length;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div className="flex-shrink-0 border-b border-border-subtle bg-bg-primary">
|
|
28
|
+
{/* Main header row */}
|
|
29
|
+
<div className="flex items-center justify-between px-4 py-3">
|
|
30
|
+
{/* Left: Channel info */}
|
|
31
|
+
<div className="flex items-center gap-3 min-w-0">
|
|
32
|
+
{/* Channel icon */}
|
|
33
|
+
<div className={`
|
|
34
|
+
flex-shrink-0 w-8 h-8 rounded-lg flex items-center justify-center
|
|
35
|
+
${isDm ? 'bg-purple-500/10' : 'bg-accent-cyan/10'}
|
|
36
|
+
`}>
|
|
37
|
+
{isDm ? (
|
|
38
|
+
<AtIcon className="w-4 h-4 text-purple-400" />
|
|
39
|
+
) : (
|
|
40
|
+
<HashIcon className="w-4 h-4 text-accent-cyan" />
|
|
41
|
+
)}
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
{/* Channel name and info */}
|
|
45
|
+
<div className="min-w-0">
|
|
46
|
+
<div className="flex items-center gap-2">
|
|
47
|
+
<h1 className="text-base font-semibold text-text-primary truncate">
|
|
48
|
+
{displayName}
|
|
49
|
+
</h1>
|
|
50
|
+
{channel.status === 'archived' && (
|
|
51
|
+
<span className="px-1.5 py-0.5 text-[10px] font-medium bg-warning/20 text-warning rounded">
|
|
52
|
+
Archived
|
|
53
|
+
</span>
|
|
54
|
+
)}
|
|
55
|
+
{channel.visibility === 'private' && !isDm && (
|
|
56
|
+
<LockIcon className="w-3.5 h-3.5 text-text-muted flex-shrink-0" />
|
|
57
|
+
)}
|
|
58
|
+
</div>
|
|
59
|
+
{channel.topic && (
|
|
60
|
+
<p className="text-xs text-text-muted truncate mt-0.5">
|
|
61
|
+
{channel.topic}
|
|
62
|
+
</p>
|
|
63
|
+
)}
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
{/* Right: Actions */}
|
|
68
|
+
<div className="flex items-center gap-1">
|
|
69
|
+
{/* Members indicator */}
|
|
70
|
+
<button
|
|
71
|
+
onClick={onShowMembers}
|
|
72
|
+
className="flex items-center gap-1.5 px-2 py-1.5 rounded-md text-text-muted hover:text-text-primary hover:bg-bg-hover transition-colors"
|
|
73
|
+
title="View members"
|
|
74
|
+
>
|
|
75
|
+
<UsersIcon className="w-4 h-4" />
|
|
76
|
+
<span className="text-xs">
|
|
77
|
+
{channel.memberCount}
|
|
78
|
+
{onlineCount > 0 && (
|
|
79
|
+
<span className="text-success ml-1">({onlineCount} online)</span>
|
|
80
|
+
)}
|
|
81
|
+
</span>
|
|
82
|
+
</button>
|
|
83
|
+
|
|
84
|
+
{/* Divider */}
|
|
85
|
+
<div className="w-px h-5 bg-border-subtle mx-1" />
|
|
86
|
+
|
|
87
|
+
{/* Search */}
|
|
88
|
+
{onSearch && (
|
|
89
|
+
<button
|
|
90
|
+
onClick={onSearch}
|
|
91
|
+
className="p-2 rounded-md text-text-muted hover:text-text-primary hover:bg-bg-hover transition-colors"
|
|
92
|
+
title="Search in channel"
|
|
93
|
+
>
|
|
94
|
+
<SearchIcon className="w-4 h-4" />
|
|
95
|
+
</button>
|
|
96
|
+
)}
|
|
97
|
+
|
|
98
|
+
{/* Pinned messages */}
|
|
99
|
+
{onShowPinned && (
|
|
100
|
+
<button
|
|
101
|
+
onClick={onShowPinned}
|
|
102
|
+
className="p-2 rounded-md text-text-muted hover:text-text-primary hover:bg-bg-hover transition-colors"
|
|
103
|
+
title="Pinned messages"
|
|
104
|
+
>
|
|
105
|
+
<PinIcon className="w-4 h-4" />
|
|
106
|
+
</button>
|
|
107
|
+
)}
|
|
108
|
+
|
|
109
|
+
{/* Channel details toggle */}
|
|
110
|
+
<button
|
|
111
|
+
onClick={() => setShowDetails(!showDetails)}
|
|
112
|
+
className={`p-2 rounded-md transition-colors ${
|
|
113
|
+
showDetails
|
|
114
|
+
? 'text-accent-cyan bg-accent-cyan/10'
|
|
115
|
+
: 'text-text-muted hover:text-text-primary hover:bg-bg-hover'
|
|
116
|
+
}`}
|
|
117
|
+
title="Channel details"
|
|
118
|
+
>
|
|
119
|
+
<InfoIcon className="w-4 h-4" />
|
|
120
|
+
</button>
|
|
121
|
+
|
|
122
|
+
{/* Settings (if can edit) */}
|
|
123
|
+
{canEdit && onEditChannel && (
|
|
124
|
+
<button
|
|
125
|
+
onClick={onEditChannel}
|
|
126
|
+
className="p-2 rounded-md text-text-muted hover:text-text-primary hover:bg-bg-hover transition-colors"
|
|
127
|
+
title="Channel settings"
|
|
128
|
+
>
|
|
129
|
+
<SettingsIcon className="w-4 h-4" />
|
|
130
|
+
</button>
|
|
131
|
+
)}
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
{/* Expanded details panel */}
|
|
136
|
+
{showDetails && (
|
|
137
|
+
<div className="px-4 pb-3 border-t border-border-subtle pt-3 bg-bg-secondary/50">
|
|
138
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
139
|
+
{/* Description */}
|
|
140
|
+
{channel.description && (
|
|
141
|
+
<div>
|
|
142
|
+
<h3 className="text-xs font-semibold text-text-muted uppercase tracking-wide mb-1">
|
|
143
|
+
Description
|
|
144
|
+
</h3>
|
|
145
|
+
<p className="text-sm text-text-secondary">
|
|
146
|
+
{channel.description}
|
|
147
|
+
</p>
|
|
148
|
+
</div>
|
|
149
|
+
)}
|
|
150
|
+
|
|
151
|
+
{/* Created info */}
|
|
152
|
+
<div>
|
|
153
|
+
<h3 className="text-xs font-semibold text-text-muted uppercase tracking-wide mb-1">
|
|
154
|
+
Created
|
|
155
|
+
</h3>
|
|
156
|
+
<p className="text-sm text-text-secondary">
|
|
157
|
+
{formatDate(channel.createdAt)} by {channel.createdBy}
|
|
158
|
+
</p>
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
{/* Members preview */}
|
|
162
|
+
{members.length > 0 && (
|
|
163
|
+
<div className="sm:col-span-2">
|
|
164
|
+
<h3 className="text-xs font-semibold text-text-muted uppercase tracking-wide mb-2">
|
|
165
|
+
Members ({channel.memberCount})
|
|
166
|
+
</h3>
|
|
167
|
+
<div className="flex flex-wrap gap-2">
|
|
168
|
+
{members.slice(0, 10).map(member => (
|
|
169
|
+
<MemberChip key={member.id} member={member} />
|
|
170
|
+
))}
|
|
171
|
+
{channel.memberCount > 10 && (
|
|
172
|
+
<button
|
|
173
|
+
onClick={onShowMembers}
|
|
174
|
+
className="text-xs text-accent-cyan hover:underline"
|
|
175
|
+
>
|
|
176
|
+
+{channel.memberCount - 10} more
|
|
177
|
+
</button>
|
|
178
|
+
)}
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
)}
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
)}
|
|
185
|
+
</div>
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// =============================================================================
|
|
190
|
+
// Sub-components
|
|
191
|
+
// =============================================================================
|
|
192
|
+
|
|
193
|
+
function MemberChip({ member }: { member: ChannelMember }) {
|
|
194
|
+
return (
|
|
195
|
+
<div className="flex items-center gap-1.5 px-2 py-1 bg-bg-tertiary rounded-full text-sm">
|
|
196
|
+
{member.avatarUrl ? (
|
|
197
|
+
<img
|
|
198
|
+
src={member.avatarUrl}
|
|
199
|
+
alt={member.displayName || member.id}
|
|
200
|
+
className="w-4 h-4 rounded-full object-cover"
|
|
201
|
+
/>
|
|
202
|
+
) : (
|
|
203
|
+
<div className={`
|
|
204
|
+
w-4 h-4 rounded-full flex items-center justify-center text-[9px] font-medium
|
|
205
|
+
${member.entityType === 'user'
|
|
206
|
+
? 'bg-purple-500/30 text-purple-300'
|
|
207
|
+
: 'bg-accent-cyan/30 text-accent-cyan'}
|
|
208
|
+
`}>
|
|
209
|
+
{(member.displayName || member.id).charAt(0).toUpperCase()}
|
|
210
|
+
</div>
|
|
211
|
+
)}
|
|
212
|
+
<span className="text-text-secondary truncate max-w-[100px]">
|
|
213
|
+
{member.displayName || member.id}
|
|
214
|
+
</span>
|
|
215
|
+
<span className={`w-1.5 h-1.5 rounded-full ${
|
|
216
|
+
member.status === 'online' ? 'bg-success' :
|
|
217
|
+
member.status === 'away' ? 'bg-warning' : 'bg-text-dim'
|
|
218
|
+
}`} />
|
|
219
|
+
</div>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// =============================================================================
|
|
224
|
+
// Helper functions
|
|
225
|
+
// =============================================================================
|
|
226
|
+
|
|
227
|
+
function formatDate(isoString: string): string {
|
|
228
|
+
const date = new Date(isoString);
|
|
229
|
+
return date.toLocaleDateString(undefined, {
|
|
230
|
+
year: 'numeric',
|
|
231
|
+
month: 'short',
|
|
232
|
+
day: 'numeric',
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// =============================================================================
|
|
237
|
+
// Icons
|
|
238
|
+
// =============================================================================
|
|
239
|
+
|
|
240
|
+
function HashIcon({ className }: { className?: string }) {
|
|
241
|
+
return (
|
|
242
|
+
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
243
|
+
<line x1="4" y1="9" x2="20" y2="9" />
|
|
244
|
+
<line x1="4" y1="15" x2="20" y2="15" />
|
|
245
|
+
<line x1="10" y1="3" x2="8" y2="21" />
|
|
246
|
+
<line x1="16" y1="3" x2="14" y2="21" />
|
|
247
|
+
</svg>
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function AtIcon({ className }: { className?: string }) {
|
|
252
|
+
return (
|
|
253
|
+
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
254
|
+
<circle cx="12" cy="12" r="4" />
|
|
255
|
+
<path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94" />
|
|
256
|
+
</svg>
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function LockIcon({ className }: { className?: string }) {
|
|
261
|
+
return (
|
|
262
|
+
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
263
|
+
<rect x="3" y="11" width="18" height="11" rx="2" ry="2" />
|
|
264
|
+
<path d="M7 11V7a5 5 0 0 1 10 0v4" />
|
|
265
|
+
</svg>
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
function UsersIcon({ className }: { className?: string }) {
|
|
270
|
+
return (
|
|
271
|
+
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
272
|
+
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" />
|
|
273
|
+
<circle cx="9" cy="7" r="4" />
|
|
274
|
+
<path d="M23 21v-2a4 4 0 0 0-3-3.87" />
|
|
275
|
+
<path d="M16 3.13a4 4 0 0 1 0 7.75" />
|
|
276
|
+
</svg>
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
function SearchIcon({ className }: { className?: string }) {
|
|
281
|
+
return (
|
|
282
|
+
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
283
|
+
<circle cx="11" cy="11" r="8" />
|
|
284
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
285
|
+
</svg>
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function PinIcon({ className }: { className?: string }) {
|
|
290
|
+
return (
|
|
291
|
+
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
292
|
+
<line x1="12" y1="17" x2="12" y2="22" />
|
|
293
|
+
<path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z" />
|
|
294
|
+
</svg>
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function InfoIcon({ className }: { className?: string }) {
|
|
299
|
+
return (
|
|
300
|
+
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
301
|
+
<circle cx="12" cy="12" r="10" />
|
|
302
|
+
<line x1="12" y1="16" x2="12" y2="12" />
|
|
303
|
+
<line x1="12" y1="8" x2="12.01" y2="8" />
|
|
304
|
+
</svg>
|
|
305
|
+
);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function SettingsIcon({ className }: { className?: string }) {
|
|
309
|
+
return (
|
|
310
|
+
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
311
|
+
<circle cx="12" cy="12" r="3" />
|
|
312
|
+
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />
|
|
313
|
+
</svg>
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export default ChannelHeader;
|