feat(chat-channel): annotate Weixin channel badge with iLink reconnect hint tooltip
This commit is contained in:
@@ -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 ${
|
||||
|
||||
Reference in New Issue
Block a user