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
4 changes: 3 additions & 1 deletion src/components/load-message-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ export function LoadMessageDialog({
{asUser ? 'You' : 'Bot'}
</span>
</span>
<span className="shrink-0 font-mono text-xs text-muted-foreground">{m.ts}</span>
<span className="shrink-0 text-xs text-muted-foreground">
{new Date(Number(m.ts) * 1000).toLocaleString()} <span className="font-mono">({m.ts})</span>
</span>
</span>
{m.label && <span className="truncate text-xs text-muted-foreground">{m.label}</span>}
</button>
Expand Down
46 changes: 23 additions & 23 deletions src/components/send-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,29 +158,6 @@ export function SendDialog({
</DialogHeader>

<div className="flex flex-col gap-4">
<div className="flex flex-col gap-1.5">
<Label htmlFor="channel-picker">Channel</Label>
{channels === null && !channelsError && <p className="text-xs text-muted-foreground">Loading channels…</p>}
{channelsError && <p className="text-xs text-destructive">{channelsError}</p>}
{channels && channels.length === 0 && (
<p className="text-xs text-muted-foreground">No public channels available.</p>
)}
{channels && channels.length > 0 && (
<select
id="channel-picker"
value={channelId}
onChange={(e) => setChannelId(e.target.value)}
className="flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
>
{channels.map((c) => (
<option key={c.id} value={c.id}>
#{c.name}
</option>
))}
</select>
)}
</div>

<div className="flex flex-col gap-1.5">
<Label htmlFor="send-as-picker">Post as</Label>
<select
Expand Down Expand Up @@ -210,6 +187,29 @@ export function SendDialog({
)}
</div>

<div className="flex flex-col gap-1.5">
<Label htmlFor="channel-picker">Channel</Label>
{channels === null && !channelsError && <p className="text-xs text-muted-foreground">Loading channels…</p>}
{channelsError && <p className="text-xs text-destructive">{channelsError}</p>}
{channels && channels.length === 0 && (
<p className="text-xs text-muted-foreground">No public channels available.</p>
)}
{channels && channels.length > 0 && (
<select
id="channel-picker"
value={channelId}
onChange={(e) => setChannelId(e.target.value)}
className="flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
>
{channels.map((c) => (
<option key={c.id} value={c.id}>
#{c.name}
</option>
))}
</select>
)}
</div>

{errorCount > 0 ? (
<button
type="button"
Expand Down
5 changes: 3 additions & 2 deletions src/components/toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Code2,
ExternalLink,
Home,
MailSearch,
MessageSquare,
Moon,
Pencil,
Expand Down Expand Up @@ -160,9 +161,9 @@ export function Toolbar({
<>
<div className="flex flex-wrap items-center justify-between gap-x-2 gap-y-1 border-b bg-background px-2 py-1.5 sm:px-3 sm:py-2">
<div className="flex min-w-0 flex-1 items-center gap-1 sm:gap-2">
{editingEnabled && !editBadge ? (
{editingEnabled ? (
<Button type="button" size="sm" onClick={onOpenLoad} aria-label={loadButtonLabel}>
<Pencil className="h-3.5 w-3.5" />
<MailSearch className="h-3.5 w-3.5" />
<span className="hidden md:inline">{loadButtonLabel}</span>
</Button>
) : null}
Expand Down
Loading