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 ${
|
||||
|
||||
@@ -1911,6 +1911,7 @@
|
||||
"weixinRefreshQrcode": "تحديث",
|
||||
"weixinWaitingScan": "في انتظار المسح...",
|
||||
"weixinPollError": "الاتصال غير مستقر، جاري إعادة المحاولة...",
|
||||
"weixinReconnectNotice": "بسبب قيود بروتوكول iLink، بعد كل إعادة اتصال يجب عليك إرسال رسالة إلى الروبوت حتى تصبح مشغلات الأحداث فعالة.",
|
||||
"connect": "اتصال",
|
||||
"disconnect": "قطع الاتصال",
|
||||
"test": "اختبار الاتصال",
|
||||
|
||||
@@ -1911,6 +1911,7 @@
|
||||
"weixinRefreshQrcode": "Aktualisieren",
|
||||
"weixinWaitingScan": "Warten auf Scan...",
|
||||
"weixinPollError": "Verbindung instabil, erneuter Versuch...",
|
||||
"weixinReconnectNotice": "Aufgrund von Einschränkungen des iLink-Protokolls müssen Sie nach jeder erneuten Verbindung dem Bot eine Nachricht senden, damit Ereignisauslöser wirksam werden.",
|
||||
"connect": "Verbinden",
|
||||
"disconnect": "Trennen",
|
||||
"test": "Verbindung testen",
|
||||
|
||||
@@ -1911,6 +1911,7 @@
|
||||
"weixinRefreshQrcode": "Refresh",
|
||||
"weixinWaitingScan": "Waiting for scan...",
|
||||
"weixinPollError": "Connection unstable, retrying...",
|
||||
"weixinReconnectNotice": "Due to iLink protocol limitations, after each reconnection you must send a message to the bot before event triggers take effect.",
|
||||
"connect": "Connect",
|
||||
"disconnect": "Disconnect",
|
||||
"test": "Test Connection",
|
||||
|
||||
@@ -1911,6 +1911,7 @@
|
||||
"weixinRefreshQrcode": "Actualizar",
|
||||
"weixinWaitingScan": "Esperando escaneo...",
|
||||
"weixinPollError": "Conexión inestable, reintentando...",
|
||||
"weixinReconnectNotice": "Debido a limitaciones del protocolo iLink, después de cada reconexión debes enviar un mensaje al bot para que los activadores de eventos surtan efecto.",
|
||||
"connect": "Conectar",
|
||||
"disconnect": "Desconectar",
|
||||
"test": "Probar conexión",
|
||||
|
||||
@@ -1911,6 +1911,7 @@
|
||||
"weixinRefreshQrcode": "Actualiser",
|
||||
"weixinWaitingScan": "En attente du scan...",
|
||||
"weixinPollError": "Connexion instable, nouvelle tentative...",
|
||||
"weixinReconnectNotice": "En raison des limitations du protocole iLink, après chaque reconnexion vous devez envoyer un message au bot pour que les déclencheurs d'événements prennent effet.",
|
||||
"connect": "Connecter",
|
||||
"disconnect": "Déconnecter",
|
||||
"test": "Tester la connexion",
|
||||
|
||||
@@ -1911,6 +1911,7 @@
|
||||
"weixinRefreshQrcode": "更新",
|
||||
"weixinWaitingScan": "スキャン待ち...",
|
||||
"weixinPollError": "接続が不安定です。再試行中...",
|
||||
"weixinReconnectNotice": "iLink プロトコルの制限により、再接続のたびにまずボットにメッセージを送信しないとイベントトリガーが有効になりません。",
|
||||
"connect": "接続",
|
||||
"disconnect": "切断",
|
||||
"test": "接続テスト",
|
||||
|
||||
@@ -1911,6 +1911,7 @@
|
||||
"weixinRefreshQrcode": "새로고침",
|
||||
"weixinWaitingScan": "스캔 대기 중...",
|
||||
"weixinPollError": "연결이 불안정합니다. 재시도 중...",
|
||||
"weixinReconnectNotice": "iLink 프로토콜 제한으로 인해, 재연결할 때마다 먼저 봇에게 메시지를 보내야 이벤트 트리거가 활성화됩니다.",
|
||||
"connect": "연결",
|
||||
"disconnect": "연결 해제",
|
||||
"test": "연결 테스트",
|
||||
|
||||
@@ -1911,6 +1911,7 @@
|
||||
"weixinRefreshQrcode": "Atualizar",
|
||||
"weixinWaitingScan": "Aguardando escaneamento...",
|
||||
"weixinPollError": "Conexão instável, tentando novamente...",
|
||||
"weixinReconnectNotice": "Devido a limitações do protocolo iLink, após cada reconexão você precisa enviar uma mensagem ao bot para que os disparadores de eventos tenham efeito.",
|
||||
"connect": "Conectar",
|
||||
"disconnect": "Desconectar",
|
||||
"test": "Testar conexão",
|
||||
|
||||
@@ -1911,6 +1911,7 @@
|
||||
"weixinRefreshQrcode": "刷新二维码",
|
||||
"weixinWaitingScan": "等待扫码...",
|
||||
"weixinPollError": "连接不稳定,正在重试...",
|
||||
"weixinReconnectNotice": "因 iLink 协议限制,每次重新连接后需先主动向机器人发送一条消息,事件触发才会生效。",
|
||||
"connect": "连接",
|
||||
"disconnect": "断开",
|
||||
"test": "测试连接",
|
||||
|
||||
@@ -1911,6 +1911,7 @@
|
||||
"weixinRefreshQrcode": "重新整理",
|
||||
"weixinWaitingScan": "等待掃碼...",
|
||||
"weixinPollError": "連接不穩定,正在重試...",
|
||||
"weixinReconnectNotice": "因 iLink 協議限制,每次重新連接後需先主動向機器人發送一條訊息,事件觸發才會生效。",
|
||||
"connect": "連線",
|
||||
"disconnect": "斷開",
|
||||
"test": "測試連線",
|
||||
|
||||
Reference in New Issue
Block a user