fix: restructure Elec to match electron-vite expected layout

- Move index.html to src/renderer/ (electron-vite hard requirement)
- Flatten React source to src/ (main.tsx, App.tsx, components/)
- Remove debug red background
- Use @tailwindcss/postcss plugin

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
fyah
2026-05-09 11:31:38 +08:00
parent 18928b3d16
commit 8bd977987a
9 changed files with 5 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ export default function App() {
const [activeModel, setActiveModel] = useState<Model>('Deepseek') const [activeModel, setActiveModel] = useState<Model>('Deepseek')
return ( return (
<div className="flex flex-col h-full" style={{ background: '#ff0000' }}> <div className="flex flex-col h-full bg-black">
<ModelSelector active={activeModel} onSelect={setActiveModel} /> <ModelSelector active={activeModel} onSelect={setActiveModel} />
<ChatArea /> <ChatArea />
<InputArea /> <InputArea />

View File

@@ -8,8 +8,8 @@
html, body, #root { html, body, #root {
height: 100%; height: 100%;
background: #ff0000; background: #000;
color: #fff; color: #e5e5e5;
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
overflow: hidden; overflow: hidden;

View File

@@ -7,6 +7,6 @@
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="module" src="./src/main.tsx"></script> <script type="module" src="../main.tsx"></script>
</body> </body>
</html> </html>

View File

@@ -2,7 +2,7 @@
export default { export default {
content: [ content: [
"./src/renderer/index.html", "./src/renderer/index.html",
"./src/renderer/src/**/*.{js,ts,jsx,tsx}", "./src/**/*.{js,ts,jsx,tsx}",
], ],
theme: { theme: {
extend: {}, extend: {},

View File

@@ -13,7 +13,6 @@ export default defineConfig({
preload: { preload: {
input: 'src/preload/index.ts', input: 'src/preload/index.ts',
}, },
},
]), ]),
], ],
}) })