feat: enhance ecommerce UI — sidebar, transitions, ratio options, cancel buttons, i18n fixes

This commit is contained in:
Codex
2026-06-11 20:38:35 +08:00
parent 31c0e79e2e
commit 9b9a276014
10 changed files with 555 additions and 196 deletions
@@ -6,6 +6,7 @@ import {
HistoryOutlined,
LoadingOutlined,
PlayCircleOutlined,
SaveOutlined,
} from "@ant-design/icons";
import {
fetchVideoHistory,
@@ -16,11 +17,13 @@ import {
interface EcommerceVideoHistoryPanelProps {
visible: boolean;
onClose: () => void;
onSaveCurrent?: () => void;
}
export default function EcommerceVideoHistoryPanel({
visible,
onClose,
onSaveCurrent,
}: EcommerceVideoHistoryPanelProps) {
const [items, setItems] = useState<VideoHistoryItem[]>([]);
const [total, setTotal] = useState(0);
@@ -68,9 +71,16 @@ export default function EcommerceVideoHistoryPanel({
<div className="ecom-video-history-panel__header">
<HistoryOutlined />
<span></span>
<button className="ecom-video-history-panel__close" onClick={onClose}>
<CloseOutlined />
</button>
<div className="ecom-video-history-panel__actions">
{onSaveCurrent ? (
<button className="ecom-video-history-panel__save" onClick={onSaveCurrent} title="保存当前">
<SaveOutlined />
</button>
) : null}
<button className="ecom-video-history-panel__close" onClick={onClose} title="收起面板">
<HistoryOutlined />
</button>
</div>
</div>
<div className="ecom-video-history-panel__body">