// ========================================================= // FBIF 资讯订阅 · 设置 (Settings backend) // Hosts the 失效提醒 · 飞书机器人 config (moved out of 订阅管理, // so it's no longer always-on there), plus push/quota info and // placeholder rows for account / supplier API / quality thresholds. // ========================================================= const SettingsSection = ({ icon, title, desc, children, right }) => (
{title}
{desc &&
{desc}
}
{right}
{children &&
{children}
}
); const InfoRow = ({ label, value, mono }) => (
{label} {value}
); const PlaceholderRow = ({ icon, label, hint }) => (
{label}
{hint}
即将上线
); const SettingsPage = ({ data, alertCfg, onAlertCfg, onTestPush, onRecheck, onManage, onClose }) => { useLucide(); const [strat, setStrat] = React.useState({ retry3: true, recover: true, daily: false, tierOnly: false }); const failed = data.SOURCES.filter(s => s.subscribed && s.health === 'failed'); const degraded = data.SOURCES.filter(s => s.subscribed && s.health === 'degraded'); const bad = [...failed, ...degraded]; return (

设置

来源健康提醒、推送与配额,以及组织与接口配置。

{/* 失效提醒 · 飞书机器人 */} onAlertCfg({ ...alertCfg, enabled: v })} />}>
onAlertCfg({ ...alertCfg, webhook: e.target.value })} width="100%" height={36} />
{/* trigger conditions */}
凭证仅服务端保存,不在前端展示。
{/* 提醒策略 */}
提醒策略
{[['retry3', '连续失败 3 次才提醒'], ['recover', '恢复后提醒'], ['daily', '每日汇总一次'], ['tierOnly', '仅 T1 / T1.5 来源']].map(([k, l]) => { const on = strat[k]; return ( ); })}
{/* 最近一次推送 */}
最近一次推送:今天 09:12 · FoodBev Media 失效 · 已送达飞书群「资讯运营」
{/* current health */}
当前来源健康
{bad.length === 0 && (
全部订阅来源运行正常
)} {bad.map(s => (
{s.name}
{s.healthNote || `最近更新 ${timeAgo(s.lastUpdate)}`}
))}
{/* 推送与配额 */} {/* placeholders */}

来源的健康检查与失效提醒在「订阅管理」中也可单独操作;此处为统一的后台配置入口。

); }; Object.assign(window, { SettingsPage });