Initial commit

This commit is contained in:
2026-03-08 01:34:54 +08:00
commit 1f104f73c8
441 changed files with 64911 additions and 0 deletions

31
src/main.tsx Normal file
View File

@@ -0,0 +1,31 @@
import { StrictMode, useEffect } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App'
import './index.css'
import 'katex/dist/katex.min.css'
import 'prismjs/themes/prism-tomorrow.css'
import { useUIStore } from './stores/uiStore'
const ThemeSync = () => {
const theme = useUIStore((state) => state.theme)
useEffect(() => {
const root = document.documentElement
root.classList.toggle('dark', theme === 'dark')
root.style.colorScheme = theme === 'dark' ? 'dark' : 'light'
if (window.electronAPI?.updateTitlebarButtons) {
const symbolColor = theme === 'dark' ? '#ffffff' : '#000000'
window.electronAPI.updateTitlebarButtons(symbolColor)
}
}, [theme])
return null
}
createRoot(document.getElementById('root')!).render(
<StrictMode>
<ThemeSync />
<App />
</StrictMode>,
)