mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-07-02 04:05:55 +08:00
refactor: 清理 LOW 问题 — 样式去重、死代码删除、命名修正
- 抽取 buttons.ts 共享按钮样式,消除 3 个组件的重复定义 - store 删除未调用的 canUndo/canRedo 方法 - importFromContent 变量 ext→lower 修正确性 - CSV 导出修复 BOM 重复(exportToCsv 自带 BOM) - Rust error.rs 添加 allow(dead_code) 消除编译警告 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useAppStore } from '@/store/app-store';
|
||||
import { btnClass, btnStyle } from '@/components/ui/buttons';
|
||||
|
||||
export function UndoRedoButtons() {
|
||||
const { t } = useTranslation();
|
||||
@@ -8,14 +9,6 @@ export function UndoRedoButtons() {
|
||||
const undo = useAppStore((s) => s.undo);
|
||||
const redo = useAppStore((s) => s.redo);
|
||||
|
||||
const btnClass =
|
||||
'px-3 py-1 text-sm rounded border transition-colors disabled:opacity-40 disabled:cursor-not-allowed';
|
||||
const btnStyle = {
|
||||
backgroundColor: 'var(--app-bg)',
|
||||
color: 'var(--app-fg)',
|
||||
borderColor: 'var(--app-border)',
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex gap-1">
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user