feat(md-deck): Add card list navigation and tabbed editor panels
- Move card tab selector to a left sidebar (CardList) with pagination - Replace separate side toggle and layer panels with EditorTabs - Move copy code button from layer panel to DeckHeader - Simplify PropertiesEditorPanel by removing front/back toggle and using a select for shape
This commit is contained in:
@@ -6,13 +6,11 @@ import { createDeckStore } from "./hooks/deckStore";
|
||||
import { registerDeck, unregisterDeck } from "./hooks/deck-registry";
|
||||
import type { CardShape } from "./types";
|
||||
import { DeckHeader } from "./DeckHeader";
|
||||
import { CardList } from "./CardList";
|
||||
import { DeckContent } from "./DeckContent";
|
||||
import { EditorTabs } from "./EditorTabs";
|
||||
import { PrintPreview } from "./PrintPreview";
|
||||
import {
|
||||
DataEditorPanel,
|
||||
LayerEditorPanel,
|
||||
PropertiesEditorPanel,
|
||||
} from "./editor-panel";
|
||||
import { DataEditorPanel } from "./editor-panel";
|
||||
|
||||
interface DeckProps {
|
||||
size?: string;
|
||||
@@ -139,29 +137,19 @@ customElement<DeckProps>(
|
||||
</Show>
|
||||
|
||||
<div class="flex gap-4">
|
||||
{/* 内容区域:错误/加载/卡牌预览/空状态 */}
|
||||
{/* 左侧:CSV 数据编辑 */}
|
||||
{/*<Show when={store.state.isEditing && !store.state.fixed}>*/}
|
||||
{/* <DataEditorPanel*/}
|
||||
{/* activeTab={store.state.activeTab}*/}
|
||||
{/* cards={store.state.cards}*/}
|
||||
{/* updateCardData={store.actions.updateCardData}*/}
|
||||
{/* />*/}
|
||||
{/*</Show>*/}
|
||||
|
||||
<Show when={store.state.isEditing && !store.state.fixed}>
|
||||
<div class="flex-1">
|
||||
<PropertiesEditorPanel store={store} />
|
||||
</div>
|
||||
{/* 左侧:卡牌列表导航 */}
|
||||
<Show when={store.state.cards.length > 0 && !store.state.error}>
|
||||
<CardList store={store} />
|
||||
</Show>
|
||||
|
||||
<DeckContent store={store} isLoading={store.state.isLoading} />
|
||||
{/* 中间:内容区域(错误/加载/卡牌预览/空状态) */}
|
||||
<div class="flex-1 min-w-0">
|
||||
<DeckContent store={store} isLoading={store.state.isLoading} />
|
||||
</div>
|
||||
|
||||
{/* 右侧:属性/图层编辑面板 */}
|
||||
{/* 右侧:属性/图层编辑面板(标签页切换) */}
|
||||
<Show when={store.state.isEditing && !store.state.fixed}>
|
||||
<div class="flex-1">
|
||||
<LayerEditorPanel store={store} />
|
||||
</div>
|
||||
<EditorTabs store={store} />
|
||||
</Show>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user