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 { useCallback, useEffect, useState } from "react"
|
||||||
import {
|
import {
|
||||||
|
AlertCircle,
|
||||||
Loader2,
|
Loader2,
|
||||||
MessageCircle,
|
MessageCircle,
|
||||||
Pencil,
|
Pencil,
|
||||||
@@ -27,6 +28,12 @@ import {
|
|||||||
AlertDialogHeader,
|
AlertDialogHeader,
|
||||||
AlertDialogTitle,
|
AlertDialogTitle,
|
||||||
} from "@/components/ui/alert-dialog"
|
} from "@/components/ui/alert-dialog"
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipProvider,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from "@/components/ui/tooltip"
|
||||||
import {
|
import {
|
||||||
listChatChannels,
|
listChatChannels,
|
||||||
deleteChatChannel,
|
deleteChatChannel,
|
||||||
@@ -250,8 +257,30 @@ export function ChannelListTab() {
|
|||||||
<div className="flex-1 min-w-0">
|
<div className="flex-1 min-w-0">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className="text-sm font-medium">{ch.name}</span>
|
<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}
|
||||||
|
{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>
|
</Badge>
|
||||||
<span
|
<span
|
||||||
className={`inline-block h-2 w-2 rounded-full ${
|
className={`inline-block h-2 w-2 rounded-full ${
|
||||||
|
|||||||
@@ -1911,6 +1911,7 @@
|
|||||||
"weixinRefreshQrcode": "تحديث",
|
"weixinRefreshQrcode": "تحديث",
|
||||||
"weixinWaitingScan": "في انتظار المسح...",
|
"weixinWaitingScan": "في انتظار المسح...",
|
||||||
"weixinPollError": "الاتصال غير مستقر، جاري إعادة المحاولة...",
|
"weixinPollError": "الاتصال غير مستقر، جاري إعادة المحاولة...",
|
||||||
|
"weixinReconnectNotice": "بسبب قيود بروتوكول iLink، بعد كل إعادة اتصال يجب عليك إرسال رسالة إلى الروبوت حتى تصبح مشغلات الأحداث فعالة.",
|
||||||
"connect": "اتصال",
|
"connect": "اتصال",
|
||||||
"disconnect": "قطع الاتصال",
|
"disconnect": "قطع الاتصال",
|
||||||
"test": "اختبار الاتصال",
|
"test": "اختبار الاتصال",
|
||||||
|
|||||||
@@ -1911,6 +1911,7 @@
|
|||||||
"weixinRefreshQrcode": "Aktualisieren",
|
"weixinRefreshQrcode": "Aktualisieren",
|
||||||
"weixinWaitingScan": "Warten auf Scan...",
|
"weixinWaitingScan": "Warten auf Scan...",
|
||||||
"weixinPollError": "Verbindung instabil, erneuter Versuch...",
|
"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",
|
"connect": "Verbinden",
|
||||||
"disconnect": "Trennen",
|
"disconnect": "Trennen",
|
||||||
"test": "Verbindung testen",
|
"test": "Verbindung testen",
|
||||||
|
|||||||
@@ -1911,6 +1911,7 @@
|
|||||||
"weixinRefreshQrcode": "Refresh",
|
"weixinRefreshQrcode": "Refresh",
|
||||||
"weixinWaitingScan": "Waiting for scan...",
|
"weixinWaitingScan": "Waiting for scan...",
|
||||||
"weixinPollError": "Connection unstable, retrying...",
|
"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",
|
"connect": "Connect",
|
||||||
"disconnect": "Disconnect",
|
"disconnect": "Disconnect",
|
||||||
"test": "Test Connection",
|
"test": "Test Connection",
|
||||||
|
|||||||
@@ -1911,6 +1911,7 @@
|
|||||||
"weixinRefreshQrcode": "Actualizar",
|
"weixinRefreshQrcode": "Actualizar",
|
||||||
"weixinWaitingScan": "Esperando escaneo...",
|
"weixinWaitingScan": "Esperando escaneo...",
|
||||||
"weixinPollError": "Conexión inestable, reintentando...",
|
"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",
|
"connect": "Conectar",
|
||||||
"disconnect": "Desconectar",
|
"disconnect": "Desconectar",
|
||||||
"test": "Probar conexión",
|
"test": "Probar conexión",
|
||||||
|
|||||||
@@ -1911,6 +1911,7 @@
|
|||||||
"weixinRefreshQrcode": "Actualiser",
|
"weixinRefreshQrcode": "Actualiser",
|
||||||
"weixinWaitingScan": "En attente du scan...",
|
"weixinWaitingScan": "En attente du scan...",
|
||||||
"weixinPollError": "Connexion instable, nouvelle tentative...",
|
"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",
|
"connect": "Connecter",
|
||||||
"disconnect": "Déconnecter",
|
"disconnect": "Déconnecter",
|
||||||
"test": "Tester la connexion",
|
"test": "Tester la connexion",
|
||||||
|
|||||||
@@ -1911,6 +1911,7 @@
|
|||||||
"weixinRefreshQrcode": "更新",
|
"weixinRefreshQrcode": "更新",
|
||||||
"weixinWaitingScan": "スキャン待ち...",
|
"weixinWaitingScan": "スキャン待ち...",
|
||||||
"weixinPollError": "接続が不安定です。再試行中...",
|
"weixinPollError": "接続が不安定です。再試行中...",
|
||||||
|
"weixinReconnectNotice": "iLink プロトコルの制限により、再接続のたびにまずボットにメッセージを送信しないとイベントトリガーが有効になりません。",
|
||||||
"connect": "接続",
|
"connect": "接続",
|
||||||
"disconnect": "切断",
|
"disconnect": "切断",
|
||||||
"test": "接続テスト",
|
"test": "接続テスト",
|
||||||
|
|||||||
@@ -1911,6 +1911,7 @@
|
|||||||
"weixinRefreshQrcode": "새로고침",
|
"weixinRefreshQrcode": "새로고침",
|
||||||
"weixinWaitingScan": "스캔 대기 중...",
|
"weixinWaitingScan": "스캔 대기 중...",
|
||||||
"weixinPollError": "연결이 불안정합니다. 재시도 중...",
|
"weixinPollError": "연결이 불안정합니다. 재시도 중...",
|
||||||
|
"weixinReconnectNotice": "iLink 프로토콜 제한으로 인해, 재연결할 때마다 먼저 봇에게 메시지를 보내야 이벤트 트리거가 활성화됩니다.",
|
||||||
"connect": "연결",
|
"connect": "연결",
|
||||||
"disconnect": "연결 해제",
|
"disconnect": "연결 해제",
|
||||||
"test": "연결 테스트",
|
"test": "연결 테스트",
|
||||||
|
|||||||
@@ -1911,6 +1911,7 @@
|
|||||||
"weixinRefreshQrcode": "Atualizar",
|
"weixinRefreshQrcode": "Atualizar",
|
||||||
"weixinWaitingScan": "Aguardando escaneamento...",
|
"weixinWaitingScan": "Aguardando escaneamento...",
|
||||||
"weixinPollError": "Conexão instável, tentando novamente...",
|
"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",
|
"connect": "Conectar",
|
||||||
"disconnect": "Desconectar",
|
"disconnect": "Desconectar",
|
||||||
"test": "Testar conexão",
|
"test": "Testar conexão",
|
||||||
|
|||||||
@@ -1911,6 +1911,7 @@
|
|||||||
"weixinRefreshQrcode": "刷新二维码",
|
"weixinRefreshQrcode": "刷新二维码",
|
||||||
"weixinWaitingScan": "等待扫码...",
|
"weixinWaitingScan": "等待扫码...",
|
||||||
"weixinPollError": "连接不稳定,正在重试...",
|
"weixinPollError": "连接不稳定,正在重试...",
|
||||||
|
"weixinReconnectNotice": "因 iLink 协议限制,每次重新连接后需先主动向机器人发送一条消息,事件触发才会生效。",
|
||||||
"connect": "连接",
|
"connect": "连接",
|
||||||
"disconnect": "断开",
|
"disconnect": "断开",
|
||||||
"test": "测试连接",
|
"test": "测试连接",
|
||||||
|
|||||||
@@ -1911,6 +1911,7 @@
|
|||||||
"weixinRefreshQrcode": "重新整理",
|
"weixinRefreshQrcode": "重新整理",
|
||||||
"weixinWaitingScan": "等待掃碼...",
|
"weixinWaitingScan": "等待掃碼...",
|
||||||
"weixinPollError": "連接不穩定,正在重試...",
|
"weixinPollError": "連接不穩定,正在重試...",
|
||||||
|
"weixinReconnectNotice": "因 iLink 協議限制,每次重新連接後需先主動向機器人發送一條訊息,事件觸發才會生效。",
|
||||||
"connect": "連線",
|
"connect": "連線",
|
||||||
"disconnect": "斷開",
|
"disconnect": "斷開",
|
||||||
"test": "測試連線",
|
"test": "測試連線",
|
||||||
|
|||||||
Reference in New Issue
Block a user