优化页面,国际化细节内容
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { motion } from "framer-motion";
|
||||
import {
|
||||
GitBranch,
|
||||
@@ -57,6 +58,7 @@ export const TimelineNavigator: React.FC<TimelineNavigatorProps> = ({
|
||||
onCheckpointCreated,
|
||||
className
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const [timeline, setTimeline] = useState<SessionTimeline | null>(null);
|
||||
const [selectedCheckpoint, setSelectedCheckpoint] = useState<Checkpoint | null>(null);
|
||||
const [expandedNodes, setExpandedNodes] = useState<Set<string>>(new Set());
|
||||
@@ -413,9 +415,9 @@ export const TimelineNavigator: React.FC<TimelineNavigatorProps> = ({
|
||||
<div className="flex items-start gap-2">
|
||||
<AlertCircle className="h-4 w-4 text-yellow-600 mt-0.5" />
|
||||
<div className="text-xs">
|
||||
<p className="font-medium text-yellow-600">Experimental Feature</p>
|
||||
<p className="font-medium text-yellow-600">{t('app.experimentalFeature')}</p>
|
||||
<p className="text-yellow-600/80">
|
||||
Checkpointing may affect directory structure or cause data loss. Use with caution.
|
||||
{t('app.checkpointingWarning')}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -425,10 +427,10 @@ export const TimelineNavigator: React.FC<TimelineNavigatorProps> = ({
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-2">
|
||||
<GitBranch className="h-5 w-5 text-muted-foreground" />
|
||||
<h3 className="text-sm font-medium">Timeline</h3>
|
||||
<h3 className="text-sm font-medium">{t('app.timeline')}</h3>
|
||||
{timeline && (
|
||||
<Badge variant="outline" className="text-xs">
|
||||
{timeline.totalCheckpoints} checkpoints
|
||||
{timeline.totalCheckpoints} {t('app.checkpoints')}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
@@ -459,7 +461,7 @@ export const TimelineNavigator: React.FC<TimelineNavigatorProps> = ({
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-center py-8 text-sm text-muted-foreground">
|
||||
{isLoading ? "Loading timeline..." : "No checkpoints yet"}
|
||||
{isLoading ? t('app.loadingTimeline') : t('app.noCheckpointsYet')}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
Reference in New Issue
Block a user