feat: implement vertical crop, local LLM deepseek-v4-flash, multi-threading, word-level pink box highlight subtitles, and Nextcloud scan sync
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import { StrictMode, useState, useEffect } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import './index.css'
|
||||
import App from './App.jsx'
|
||||
import Landing from './Landing.jsx'
|
||||
import Legal from './Legal.jsx'
|
||||
|
||||
function Root() {
|
||||
const resolveView = () => {
|
||||
const hash = window.location.hash;
|
||||
if (hash === '#legal') return 'legal';
|
||||
if (hash === '#app' || localStorage.getItem('openshorts_skip_landing') === '1') return 'app';
|
||||
return 'landing';
|
||||
};
|
||||
|
||||
const [view, setView] = useState(resolveView);
|
||||
|
||||
useEffect(() => {
|
||||
const handleHashChange = () => setView(resolveView());
|
||||
window.addEventListener('hashchange', handleHashChange);
|
||||
return () => window.removeEventListener('hashchange', handleHashChange);
|
||||
}, []);
|
||||
|
||||
const handleLaunchApp = () => {
|
||||
localStorage.setItem('openshorts_skip_landing', '1');
|
||||
window.location.hash = '#app';
|
||||
setView('app');
|
||||
};
|
||||
|
||||
if (view === 'legal') return <Legal />;
|
||||
if (view === 'app') return <App />;
|
||||
return <Landing onLaunchApp={handleLaunchApp} />;
|
||||
}
|
||||
|
||||
createRoot(document.getElementById('root')).render(
|
||||
<StrictMode>
|
||||
<Root />
|
||||
</StrictMode>,
|
||||
)
|
||||
Reference in New Issue
Block a user