import { DeleteRegular, DesktopRegular, EditRegular, GlobeRegular, PauseRegular, PlayRegular } from "@fluentui/react-icons"; import type { UpstreamProxy } from "../../types"; import { Button, Tag } from "../ui"; import type { LoadError, UpstreamRow } from "./shared"; import { useI18n } from "../../lib/i18n"; export interface UpstreamSectionProps { rows: UpstreamRow[]; loading: boolean; error: LoadError | null; onRetry: () => void; onEdit: (proxy: UpstreamProxy) => void; onDelete: (proxy: UpstreamProxy) => void; onOpenBindings: (proxy: UpstreamProxy) => void; onToggle: (proxy: UpstreamProxy) => void; toggleBusyId?: string; } export function UpstreamSection({ rows, loading, error, onRetry, onEdit, onDelete, onOpenBindings, onToggle, toggleBusyId }: UpstreamSectionProps) { const { t } = useI18n(); return (
| {t("名称")} | {t("地址")} | {t("状态")} | {t("SIM / Profile 绑定")} | {t("国家规则")} | {t("操作")} |
|---|---|---|---|---|---|
| {row.name || row.id} | {row.addr} | {row.bindingCount} |
{row.countryNames.length ? (
{row.countryNames.map((countryName) =>
) : —}
|
:
|