diff --git a/frontend/src/components/Header.tsx b/frontend/src/components/Header.tsx
index 2fbac36..9b90eb8 100644
--- a/frontend/src/components/Header.tsx
+++ b/frontend/src/components/Header.tsx
@@ -36,7 +36,7 @@ export function Header({
Cosmo
{formattedCutoffDate && (
- (截止日期 {formattedCutoffDate})
+ ({formattedCutoffDate})
)}
diff --git a/frontend/src/components/ProbeList.tsx b/frontend/src/components/ProbeList.tsx
index 3ae76cd..6205963 100644
--- a/frontend/src/components/ProbeList.tsx
+++ b/frontend/src/components/ProbeList.tsx
@@ -1,4 +1,4 @@
-import { useState } from 'react';
+import { useState, useEffect } from 'react';
import { ChevronLeft, ChevronRight, ChevronDown, ChevronUp, Search, Globe, Rocket, Moon, Asterisk, Sparkles } from 'lucide-react';
import type { CelestialBody } from '../types';
@@ -15,6 +15,13 @@ export function ProbeList({ probes, planets, onBodySelect, selectedBody, onReset
const [searchTerm, setSearchTerm] = useState('');
const [expandedGroup, setExpandedGroup] = useState(null); // 只允许一个分组展开
+ // Auto-collapse when a body is selected (focus mode)
+ useEffect(() => {
+ if (selectedBody) {
+ setIsCollapsed(true);
+ }
+ }, [selectedBody]);
+
// Calculate distance for sorting
const calculateDistance = (body: CelestialBody) => {
const pos = body.positions[0];
diff --git a/frontend/src/pages/admin/NASADownload.tsx b/frontend/src/pages/admin/NASADownload.tsx
index f126eec..68b7b80 100644
--- a/frontend/src/pages/admin/NASADownload.tsx
+++ b/frontend/src/pages/admin/NASADownload.tsx
@@ -31,6 +31,7 @@ import dayjs from 'dayjs';
import isBetween from 'dayjs/plugin/isBetween';
import { request } from '../../utils/request';
import { useToast } from '../../contexts/ToastContext';
+import { useDataCutoffDate } from '../../hooks/useDataCutoffDate';
// Extend dayjs with isBetween plugin
dayjs.extend(isBetween);
@@ -65,6 +66,9 @@ export function NASADownload() {
const [downloadProgress, setDownloadProgress] = useState({ current: 0, total: 0 });
const toast = useToast();
+ // Get data cutoff date
+ const { cutoffDate } = useDataCutoffDate();
+
// Type name mapping
const typeNames: Record = {
star: '恒星',
@@ -260,13 +264,16 @@ export function NASADownload() {
return (
-
+ {/* Data Cutoff Date Display */}
+ {cutoffDate && (
+
+ )}
{/* Left: Body Selection */}
@@ -281,7 +288,7 @@ export function NASADownload() {
}
>
({
key: type,
label: (
diff --git a/frontend/src/pages/admin/Tasks.tsx b/frontend/src/pages/admin/Tasks.tsx
index 19cb3b6..137244a 100644
--- a/frontend/src/pages/admin/Tasks.tsx
+++ b/frontend/src/pages/admin/Tasks.tsx
@@ -32,7 +32,7 @@ export function Tasks() {
const loadData = async () => {
setLoading(true);
try {
- const res = await request.get('/celestial/tasks?limit=50');
+ const res = await request.get('/tasks?limit=50');
setData(res.data);
} finally {
setLoading(false);
@@ -42,10 +42,10 @@ export function Tasks() {
// Polling for active tasks
useEffect(() => {
loadData();
-
+
timerRef.current = setInterval(() => {
// Silent refresh to avoid table flickering
- request.get('/celestial/tasks?limit=50').then(res => {
+ request.get('/tasks?limit=50').then(res => {
setData(res.data);
});
}, 3000);