diff --git a/crawler/__pycache__/db_merge.cpython-39.pyc b/crawler/__pycache__/db_merge.cpython-39.pyc index 2a24457..603ecce 100644 Binary files a/crawler/__pycache__/db_merge.cpython-39.pyc and b/crawler/__pycache__/db_merge.cpython-39.pyc differ diff --git a/server/data.db b/server/data.db index dd93bc5..25f8010 100644 Binary files a/server/data.db and b/server/data.db differ diff --git a/server/data.db-wal b/server/data.db-wal index be4e1a0..848c91f 100644 Binary files a/server/data.db-wal and b/server/data.db-wal differ diff --git a/src/components/CombatLossesOtherPanel.tsx b/src/components/CombatLossesOtherPanel.tsx new file mode 100644 index 0000000..7560e73 --- /dev/null +++ b/src/components/CombatLossesOtherPanel.tsx @@ -0,0 +1,59 @@ +import { + ShieldOff, + Building2, + Plane, + Ship, + Shield, + Car, + Drone, + Rocket, + Asterisk, + Amphora, +} from 'lucide-react' +import type { CombatLosses } from '@/data/mockData' + +interface CombatLossesOtherPanelProps { + usLosses: CombatLosses + iranLosses: CombatLosses + className?: string +} + +export function CombatLossesOtherPanel({ usLosses, iranLosses, className = '' }: CombatLossesOtherPanelProps) { + const otherRows = [ + { label: '基地', icon: Building2, iconColor: 'text-amber-500', us: `${usLosses.bases.destroyed}/${usLosses.bases.damaged}`, ir: `${iranLosses.bases.destroyed}/${iranLosses.bases.damaged}` }, + { label: '战机', icon: Plane, iconColor: 'text-sky-400', us: usLosses.aircraft, ir: iranLosses.aircraft }, + { label: '战舰', icon: Ship, iconColor: 'text-blue-500', us: usLosses.warships, ir: iranLosses.warships }, + { label: '装甲', icon: Shield, iconColor: 'text-emerald-500', us: usLosses.armor, ir: iranLosses.armor }, + { label: '车辆', icon: Car, iconColor: 'text-slate-400', us: usLosses.vehicles, ir: iranLosses.vehicles }, + { label: '无人机', icon: Drone, iconColor: 'text-violet-400', us: usLosses.drones ?? 0, ir: iranLosses.drones ?? 0 }, + { label: '导弹', icon: Rocket, iconColor: 'text-orange-500', us: usLosses.missiles ?? 0, ir: iranLosses.missiles ?? 0 }, + { label: '直升机', icon: Asterisk, iconColor: 'text-teal-400', us: usLosses.helicopters ?? 0, ir: iranLosses.helicopters ?? 0 }, + { label: '潜艇', icon: Amphora, iconColor: 'text-indigo-400', us: usLosses.submarines ?? 0, ir: iranLosses.submarines ?? 0 }, + ] + + return ( +
+
+ + 装备毁伤 | 美 vs 伊 +
+
+ {otherRows.map(({ label, icon: Icon, iconColor, ...rest }, i) => ( +
+ + + {label} + + + {rest.us} + : + {rest.ir} + +
+ ))} +
+
+ ) +} diff --git a/src/components/CombatLossesPanel.tsx b/src/components/CombatLossesPanel.tsx index 359e4fb..46cf92f 100644 --- a/src/components/CombatLossesPanel.tsx +++ b/src/components/CombatLossesPanel.tsx @@ -1,15 +1,6 @@ import { - Building2, Skull, Bandage, - Plane, - Ship, - Shield, - Car, - Drone, - Rocket, - Asterisk, - Amphora, TrendingDown, UserCircle, Activity, @@ -29,20 +20,8 @@ interface CombatLossesPanelProps { export function CombatLossesPanel({ usLosses, iranLosses, conflictStats, civilianTotal, className = '' }: CombatLossesPanelProps) { const civ = civilianTotal ?? { killed: 0, wounded: 0 } - const otherRows = [ - { label: '基地', icon: Building2, iconColor: 'text-amber-500', us: `${usLosses.bases.destroyed}/${usLosses.bases.damaged}`, ir: `${iranLosses.bases.destroyed}/${iranLosses.bases.damaged}` }, - { label: '战机', icon: Plane, iconColor: 'text-sky-400', us: usLosses.aircraft, ir: iranLosses.aircraft }, - { label: '战舰', icon: Ship, iconColor: 'text-blue-500', us: usLosses.warships, ir: iranLosses.warships }, - { label: '装甲', icon: Shield, iconColor: 'text-emerald-500', us: usLosses.armor, ir: iranLosses.armor }, - { label: '车辆', icon: Car, iconColor: 'text-slate-400', us: usLosses.vehicles, ir: iranLosses.vehicles }, - { label: '无人机', icon: Drone, iconColor: 'text-violet-400', us: usLosses.drones ?? 0, ir: iranLosses.drones ?? 0 }, - { label: '导弹', icon: Rocket, iconColor: 'text-orange-500', us: usLosses.missiles ?? 0, ir: iranLosses.missiles ?? 0 }, - { label: '直升机', icon: Asterisk, iconColor: 'text-teal-400', us: usLosses.helicopters ?? 0, ir: iranLosses.helicopters ?? 0 }, - { label: '潜艇', icon: Amphora, iconColor: 'text-indigo-400', us: usLosses.submarines ?? 0, ir: iranLosses.submarines ?? 0 }, - ] - return ( -
+
战损 @@ -61,7 +40,7 @@ export function CombatLossesPanel({ usLosses, iranLosses, conflictStats, civilia 阵亡 受伤 | - 美 : 伊 + 美 vs 伊
@@ -95,30 +74,6 @@ export function CombatLossesPanel({ usLosses, iranLosses, conflictStats, civilia
- - {/* 其它 - 标签+图标+数字,竖屏横屏均完整显示,自适应排版 */} -
-
美:伊
-
- {otherRows.map(({ label, icon: Icon, iconColor, ...rest }, i) => ( -
- - - {label} - - {'value' in rest ? ( - {String(rest.value)} - ) : ( - - {rest.us} - : - {rest.ir} - - )} -
- ))} -
-
) diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx index a78124b..535665c 100644 --- a/src/pages/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -4,6 +4,7 @@ import { TimelinePanel } from '@/components/TimelinePanel' import { ForcePanel } from '@/components/ForcePanel' import { WarMap } from '@/components/WarMap' import { CombatLossesPanel } from '@/components/CombatLossesPanel' +import { CombatLossesOtherPanel } from '@/components/CombatLossesOtherPanel' import { IranBaseStatusPanel } from '@/components/IranBaseStatusPanel' import { BaseStatusPanel } from '@/components/BaseStatusPanel' import { PowerChart } from '@/components/PowerChart' @@ -54,6 +55,13 @@ export function Dashboard() { className="order-3 min-w-0 shrink-0 xl:min-w-[200px]" /> + {/* 战损其它数据:单独放在中间板块最底部,移动端/网页端均完整显示 */} +
+ +