mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-03 02:11:07 +05:30
feat(renderer): wire App.tsx shell with theme provider and top-bar
This commit is contained in:
+17
-38
@@ -1,47 +1,26 @@
|
|||||||
import React from 'react';
|
import { ThemeToggle } from './components/theme-toggle';
|
||||||
import { AppHeader } from './components/layout/AppHeader';
|
import { Button } from './components/ui/button';
|
||||||
import { TabBar } from './components/layout/TabBar';
|
|
||||||
import { Toolbar } from './components/layout/Toolbar';
|
|
||||||
import { Breadcrumb } from './components/layout/Breadcrumb';
|
|
||||||
import { Sidebar } from './components/sidebar/Sidebar';
|
|
||||||
import { EditorPane } from './components/editor/EditorPane';
|
|
||||||
import { PreviewPane } from './components/preview/PreviewPane';
|
|
||||||
import { StatusBar } from './components/layout/StatusBar';
|
|
||||||
import { CommandPalette } from './components/modals/CommandPalette';
|
|
||||||
import { ExportDialog } from './components/modals/ExportDialog';
|
|
||||||
import { SettingsDialog } from './components/modals/SettingsDialog';
|
|
||||||
import { useAppStore } from './stores/appStore';
|
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const { sidebarVisible, previewVisible, activeTabId } = useAppStore();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-screen bg-background text-foreground overflow-hidden">
|
<div className="flex h-screen flex-col bg-background text-foreground">
|
||||||
<AppHeader />
|
<header className="flex h-14 items-center justify-between border-b border-border px-4">
|
||||||
<TabBar />
|
<div className="flex items-center gap-3">
|
||||||
<Toolbar />
|
<div className="h-7 w-7 rounded-md bg-brand" aria-label="MarkdownConverter logo" />
|
||||||
<Breadcrumb />
|
<h1 className="text-sm font-semibold">MarkdownConverter</h1>
|
||||||
|
|
||||||
<main className="flex flex-1 overflow-hidden">
|
|
||||||
{sidebarVisible && <Sidebar />}
|
|
||||||
|
|
||||||
<div className="flex flex-1 overflow-hidden">
|
|
||||||
<EditorPane className={previewVisible ? 'flex-1' : 'flex-1'} />
|
|
||||||
{previewVisible && (
|
|
||||||
<>
|
|
||||||
<div className="w-px bg-border cursor-col-resize hover:bg-brand transition-colors" />
|
|
||||||
<PreviewPane className="flex-1" />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<Button variant="ghost" size="sm">File</Button>
|
||||||
|
<Button variant="ghost" size="sm">Edit</Button>
|
||||||
|
<Button variant="ghost" size="sm">View</Button>
|
||||||
|
<ThemeToggle />
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<main className="flex flex-1 items-center justify-center text-muted-foreground">
|
||||||
|
<p>Shell skeleton — implementation phases in progress.</p>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<StatusBar />
|
|
||||||
<CommandPalette />
|
|
||||||
<ExportDialog />
|
|
||||||
<SettingsDialog />
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
@@ -1,10 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom/client';
|
import ReactDOM from 'react-dom/client';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
import { ThemeProvider } from './components/theme-provider';
|
||||||
import './styles/globals.css';
|
import './styles/globals.css';
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<App />
|
<ThemeProvider defaultTheme="dark" attribute="class" enableSystem>
|
||||||
|
<App />
|
||||||
|
</ThemeProvider>
|
||||||
</React.StrictMode>
|
</React.StrictMode>
|
||||||
);
|
);
|
||||||
Reference in New Issue
Block a user