mirror of
https://github.com/R0m1k3/FlowReader.git
synced 2026-10-20 05:38:06 +02:00
feat: implement Focus Mode (Speed Read) with swipeable card deck
This commit is contained in:
1 parent
bee0d901f7
commit
a512173f05
11 files changed
+667
-5
No files matched your search
@@ -1,19 +1,28 @@
|
||||
import { useState } from 'react';
|
||||
import { Sidebar } from '../components/Sidebar';
|
||||
import { DashboardPage } from '../pages/DashboardPage';
|
||||
import { FocusPage } from '../pages/FocusPage';
|
||||
|
||||
export function RootLayout() {
|
||||
const [selectedFeedId, setSelectedFeedId] = useState<string | null>(null);
|
||||
const [isFocusMode, setIsFocusMode] = useState(false);
|
||||
|
||||
return (
|
||||
<div className="flex h-screen bg-carbon overflow-hidden">
|
||||
<Sidebar
|
||||
onSelectFeed={setSelectedFeedId}
|
||||
selectedFeedId={selectedFeedId}
|
||||
onEnterFocus={() => setIsFocusMode(true)}
|
||||
isFocusMode={isFocusMode}
|
||||
/>
|
||||
<DashboardPage
|
||||
selectedFeedId={selectedFeedId}
|
||||
/>
|
||||
{isFocusMode ? (
|
||||
<FocusPage onExit={() => setIsFocusMode(false)} />
|
||||
) : (
|
||||
<DashboardPage
|
||||
selectedFeedId={selectedFeedId}
|
||||
onEnterFocus={() => setIsFocusMode(true)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user