refactored Record component into DreamRecord, updated routes and navigation for consistency, and integrated DreamRecord into Home.

Signed-off-by: Matthias Puchstein <matthias@puchstein.bayern>
This commit is contained in:
2025-07-12 11:21:51 +02:00
parent 0cb192ef81
commit ff30258377
4 changed files with 12 additions and 9 deletions

View File

@@ -10,7 +10,6 @@ import DreamPage from "./pages/DreamPage.tsx";
import ProfilePage from "./pages/ProfilePage.tsx";
import Home from "./pages/Home.tsx";
import Overview from "./pages/Overview.tsx";
import {Record} from "./pages/Record.tsx";
function Archive() {
return (
@@ -118,7 +117,7 @@ function AppContent() {
<Route path="/" element={<Overview/>}/>
<Route path="/home" element={<Home/>}/>
<Route path="/feed" element={<Feed/>}/>
<Route path="/record" element={<Record/>}/>
<Route path="/chip" element={<></>}/>
<Route path="/archive" element={<Archive/>}/>
<Route path="/profile" element={<ProfilePage/>}/>
<Route path="/dream/:id" element={<DreamPage/>}/>

View File

@@ -1,7 +1,7 @@
import {getAccentStyle, getBackgroundStyle, getCardStyle, getTextStyle} from "../styles/StyleUtils.ts";
import {useState} from "react";
import {getAccentStyle, getBackgroundStyle, getCardStyle, getTextStyle} from "../styles/StyleUtils.ts";
export function Record() {
export function DreamRecord() {
const [inputMode, setInputMode] = useState<'text' | 'drawing'>('text');
return (

View File

@@ -1,5 +1,6 @@
import {NavLink} from 'react-router-dom';
import {FaArchive, FaHome, FaList, FaMicrophone, FaUser} from "react-icons/fa";
import {FaList, FaMicrochip, FaUser} from "react-icons/fa6";
import {FaArchive, FaHome} from "react-icons/fa";
export default function Navbar() {
return (<>
@@ -9,8 +10,8 @@ export default function Navbar() {
<NavLink to="/home" className="transition-transform hover:scale-110">
<FaHome className="w-6 h-6 md:w-8 md:h-8" style={{color: 'var(--accent-soft)'}}/>
</NavLink>
<NavLink to="/feed" className="transition-transform hover:scale-110">
<FaList className="w-6 h-6 md:w-8 md:h-8" style={{color: 'var(--accent-soft)'}}/>
<NavLink to="/" className="transition-transform hover:scale-110">
<FaMicrochip className="w-6 h-6 md:w-8 md:h-8" style={{color: 'var(--accent-soft)'}}/>
</NavLink>
<div className="w-16 md:w-20"></div>
<NavLink to="/archive" className="transition-transform hover:scale-110">
@@ -22,11 +23,11 @@ export default function Navbar() {
</nav>
<NavLink
to="/record"
to="/feed"
className="microphone-button fixed bottom-6 left-1/2 transform -translate-x-1/2 p-4 md:p-5 rounded-full z-20 transition-transform hover:scale-110"
style={{boxShadow: '0 4px 15px var(--shadow)'}}
>
<FaMicrophone className="w-8 h-8 md:w-10 md:h-10 text-white"/>
<FaList className="w-8 h-8 md:w-10 md:h-10 text-white"/>
</NavLink>
</>
);

View File

@@ -5,6 +5,7 @@ import {primaryMoodCategories, topDreamTopics} from '../data/MockDailyHighlights
import {getBackgroundStyle, getCardStyle, getTextStyle} from '../styles/StyleUtils';
import {formatDateFull, formatDateSimple} from '../utils/DateUtils';
import {NavLink} from 'react-router-dom';
import {DreamRecord} from "../components/DreamRecord.tsx";
export default function Home() {
const currentUser = MockUserMap.get(4); // Neo Quantum
@@ -51,6 +52,8 @@ export default function Home() {
</div>
</div>
<DreamRecord/>
{/* Personal Feed */}
<NavLink to='/feed'
className="block mb-3 transition-all duration-300 hover:transform hover:scale-[1.01] bg-gradient-to-br from-[rgba(166,77,255,0.35)] to-[rgba(213,0,249,0.35)] backdrop-blur-md rounded-xl shadow-lg dreamy-card">