feat(chat-channel): annotate Weixin channel badge with iLink reconnect hint tooltip

This commit is contained in:
xintaofei
2026-04-17 21:52:43 +08:00
parent 9abb85b8ee
commit 5bb4c1cb1e
11 changed files with 40 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
import { useCallback, useEffect, useState } from "react"
import {
AlertCircle,
Loader2,
MessageCircle,
Pencil,
@@ -27,6 +28,12 @@ import {
AlertDialogHeader,
AlertDialogTitle,
} from "@/components/ui/alert-dialog"
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip"
import {
listChatChannels,
deleteChatChannel,
@@ -250,8 +257,30 @@ export function ChannelListTab() {
<div className="flex-1 min-w-0">
<div className="flex items-center gap-2">
<span className="text-sm font-medium">{ch.name}</span>
<Badge variant="outline" className="text-xs">
<Badge
variant="outline"
className="text-xs inline-flex items-center gap-1"
>
{ch.channel_type}
{ch.channel_type === "weixin" && (
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<span
role="button"
tabIndex={0}
className="inline-flex cursor-help rounded-sm text-yellow-600 outline-none focus-visible:ring-1 focus-visible:ring-ring dark:text-yellow-500"
aria-label={t("weixinReconnectNotice")}
>
<AlertCircle className="h-3 w-3" />
</span>
</TooltipTrigger>
<TooltipContent side="top">
{t("weixinReconnectNotice")}
</TooltipContent>
</Tooltip>
</TooltipProvider>
)}
</Badge>
<span
className={`inline-block h-2 w-2 rounded-full ${