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')
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} />
<ChatArea />
<InputArea />

View File

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

View File

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

View File

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

View File

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