feat: 完善聊天识别与规则页面响应式布局

- 按闲鱼协议字段识别官方系统消息、交易卡片和闲小蜜,清理空会话壳并补齐历史消息校正\n- 同步 README、项目展示页和 GitHub Wiki,补充在线聊天、账号自动评价与每日擦亮说明\n- 优化自动化规则页面的中等宽度布局,补充前端类型、响应式测试和嵌入资源
This commit is contained in:
Christ committed 2026-08-08 23:48:42 +08:00
1 parent 4d1f58c5ec
commit fe3f715cdc
27 files changed
+336 -32

No files matched your search

+11
View File
@@ -449,6 +449,17 @@ const Chat: React.FC = () => {
</div>}
{messages.map(message => {
const outgoing = message.direction === 'outgoing';
const system = message.message_type === 'system';
if (system) {
return (
<div key={message.message_key} className="flex justify-center py-1">
<div className="max-w-[82%] rounded-xl border border-slate-200 bg-slate-100 px-4 py-2 text-center text-xs leading-5 text-slate-500">
{renderXianyuText(message.content)}
<div className="mt-1 text-[10px] text-slate-400">{messageTime(message.sent_at)}</div>
</div>
</div>
);
}
return (
<div key={message.message_key} className={`flex items-end gap-2.5 ${outgoing ? 'justify-end' : 'justify-start'}`}>
{!outgoing && <div className="h-9 w-9 shrink-0 overflow-hidden rounded-full bg-slate-200 ring-2 ring-white">
+5 -5
View File
@@ -801,7 +801,7 @@ const Rules: React.FC<RulesProps> = ({ initialDeliveryTarget, onDeliveryTargetHa
: '编辑默认回复';
return (
<div className="space-y-8 animate-fade-in">
<div className="min-w-0 space-y-8 animate-fade-in">
<div className="flex flex-col xl:flex-row justify-between xl:items-end gap-4">
<div>
<h2 className="text-4xl font-extrabold text-gray-900 tracking-tight">自动化规则</h2>
@@ -814,7 +814,7 @@ const Rules: React.FC<RulesProps> = ({ initialDeliveryTarget, onDeliveryTargetHa
setSelectedAccountId(event.target.value);
setAutomationPage(1);
}}
className="ios-input px-4 py-3 rounded-2xl text-sm min-w-64"
className="ios-input w-full px-4 py-3 rounded-2xl text-sm sm:w-64"
>
<option value="">全部账号</option>
{accounts.map(account => (
@@ -904,8 +904,8 @@ const Rules: React.FC<RulesProps> = ({ initialDeliveryTarget, onDeliveryTargetHa
)}
{activeTab === 'automation' && (
<div className="grid grid-cols-1 2xl:grid-cols-[360px_1fr] gap-6">
<aside className="space-y-4">
<div className="grid min-w-0 grid-cols-1 gap-6 xl:grid-cols-[minmax(270px,0.72fr)_minmax(0,1.28fr)]">
<aside className="min-w-0 space-y-4">
<div className="bg-white rounded-xl p-5 border border-gray-100 shadow-sm">
<h3 className="font-black text-gray-900 mb-1">新建规则</h3>
<p className="text-sm text-gray-500 mb-4">先选自动化类型,再配置对应动作。</p>
@@ -958,7 +958,7 @@ const Rules: React.FC<RulesProps> = ({ initialDeliveryTarget, onDeliveryTargetHa
</div>
</aside>
<section className="space-y-4">
<section className="min-w-0 space-y-4">
<div className="rounded-xl border border-gray-100 bg-[#FAFAFA] p-4 shadow-sm">
<div className="flex flex-col gap-3 xl:flex-row xl:items-center">
<div className="relative min-w-0 flex-1">