feat: unified navigation hub + categories tab + mobile scroll fix
Some checks failed
CI / ci (push) Has been cancelled
Some checks failed
CI / ci (push) Has been cancelled
- Navigation: 4 items (Home, Tracker, Finance, Settings) - Tracker page: tabs for Habits, Tasks, Stats - Finance: added Categories tab (CRUD) - AddTransactionModal: fixed mobile scroll with sticky button - Home: added finance balance widget - Legacy routes (/habits, /tasks, /stats) redirect to /tracker
This commit is contained in:
@@ -10,7 +10,7 @@ import EditHabitModal from '../components/EditHabitModal'
|
||||
import Navigation from '../components/Navigation'
|
||||
import clsx from 'clsx'
|
||||
|
||||
export default function Habits() {
|
||||
export default function Habits({ embedded = false }) {
|
||||
const [showCreateModal, setShowCreateModal] = useState(false)
|
||||
const [editingHabit, setEditingHabit] = useState(null)
|
||||
const [showArchived, setShowArchived] = useState(false)
|
||||
@@ -67,8 +67,8 @@ export default function Habits() {
|
||||
const archivedList = habits.filter(h => h.is_archived)
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-surface-50 dark:bg-gray-950 gradient-mesh pb-24 transition-colors duration-300">
|
||||
<header className="bg-white/70 dark:bg-gray-900/70 backdrop-blur-xl border-b border-gray-100/50 dark:border-gray-800 sticky top-0 z-10">
|
||||
<div className={embedded ? "" : "min-h-screen bg-surface-50 dark:bg-gray-950 gradient-mesh pb-24 transition-colors duration-300"}>
|
||||
{!embedded && <header className="bg-white/70 dark:bg-gray-900/70 backdrop-blur-xl border-b border-gray-100/50 dark:border-gray-800 sticky top-0 z-10">
|
||||
<div className="max-w-lg mx-auto px-4 py-4 flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="text-xl font-display font-bold text-gray-900 dark:text-white">Мои привычки</h1>
|
||||
@@ -79,7 +79,7 @@ export default function Habits() {
|
||||
Новая
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
</header>}
|
||||
|
||||
<main className="max-w-lg mx-auto px-4 py-6 space-y-6">
|
||||
{isLoading ? (
|
||||
@@ -168,7 +168,7 @@ export default function Habits() {
|
||||
)}
|
||||
</main>
|
||||
|
||||
<Navigation />
|
||||
{!embedded && <Navigation />}
|
||||
<CreateHabitModal open={showCreateModal} onClose={() => setShowCreateModal(false)} />
|
||||
<EditHabitModal open={!!editingHabit} onClose={() => setEditingHabit(null)} habit={editingHabit} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user