AI Coach messages bookmarking. Top bar refined.

This commit is contained in:
AG
2025-12-16 16:41:50 +02:00
parent cb0bd1a55d
commit dd027e1615
26 changed files with 2496 additions and 270 deletions

View File

@@ -1,6 +1,7 @@
import React, { useState, useEffect } from 'react';
import { useSearchParams } from 'react-router-dom';
import { Plus, Trash2, PlayCircle, Dumbbell, Save, X, List, ArrowUp, Pencil, User, Flame, Timer as TimerIcon, Ruler, Footprints, Percent, CheckCircle, GripVertical, Bot, Loader2 } from 'lucide-react';
import { Plus, Trash2, PlayCircle, Dumbbell, Save, X, List, ArrowUp, Pencil, User, Flame, Timer as TimerIcon, Ruler, Footprints, Percent, CheckCircle, GripVertical, Bot, Loader2, ClipboardList } from 'lucide-react';
import { TopBar } from './ui/TopBar';
import {
DndContext,
closestCenter,
@@ -517,20 +518,24 @@ const Plans: React.FC<PlansProps> = ({ lang }) => {
if (isEditing) {
return (
<div className="h-full flex flex-col bg-surface">
<div className="px-4 py-3 bg-surface-container border-b border-outline-variant flex justify-between items-center shrink-0">
<Button
onClick={() => {
setIsEditing(false);
localStorage.removeItem('gymflow_plan_draft');
}}
variant="ghost" size="icon">
<X size={20} />
</Button>
<h2 className="text-title-medium font-medium text-on-surface">{t('plan_editor', lang)}</h2>
<Button onClick={handleSave} variant="ghost" className="text-primary font-medium hover:bg-primary-container/10">
{t('save', lang)}
</Button>
</div>
<TopBar
title={t('plan_editor', lang)}
actions={
<div className="flex items-center gap-1">
<Button
onClick={() => {
setIsEditing(false);
localStorage.removeItem('gymflow_plan_draft');
}}
variant="ghost" size="icon">
<X size={20} />
</Button>
<Button onClick={handleSave} variant="ghost" className="text-primary font-medium hover:bg-primary-container/10">
{t('save', lang)}
</Button>
</div>
}
/>
<div className="flex-1 overflow-y-auto p-4 space-y-6">
<FilledInput
@@ -669,9 +674,7 @@ const Plans: React.FC<PlansProps> = ({ lang }) => {
return (
<div className="h-full flex flex-col bg-surface relative">
<div className="p-4 bg-surface-container shadow-elevation-1 z-10 shrink-0">
<h2 className="text-2xl font-normal text-on-surface">{t('my_plans', lang)}</h2>
</div>
<TopBar title={t('my_plans', lang)} icon={ClipboardList} />
<div className="flex-1 p-4 overflow-y-auto pb-24">
{plans.length === 0 ? (