diff --git a/TEKNISK_BESKRIVNING.md b/TEKNISK_BESKRIVNING.md index 09142306..2ab37fcd 100644 --- a/TEKNISK_BESKRIVNING.md +++ b/TEKNISK_BESKRIVNING.md @@ -9,7 +9,9 @@ Recipe App är en fullstack-applikation för hantering av hemmavaror, recept och matplanering. Systemet är byggt med Next.js (frontend), NestJS (backend), Prisma ORM och MariaDB. Applikationen är containeriserad med Docker och använder Caddy som reverse proxy. --- - +## +Viktigt att komma ihåg vid implementering av nya funktioner och kodning är att inte använda windows sökvägar. Att inte använda c:/dev/recpie-app.... Detta eftersom bygg- och testmiljön är på en remote ubuntu-server. Utveckling sker lokalt och test samt drift +sker på remote server. --- diff --git a/flutter/lib/features/profile/presentation/profile_screen.dart b/flutter/lib/features/profile/presentation/profile_screen.dart index 314d1862..69edc1ea 100644 --- a/flutter/lib/features/profile/presentation/profile_screen.dart +++ b/flutter/lib/features/profile/presentation/profile_screen.dart @@ -96,13 +96,7 @@ class _ProfileScreenState extends ConsumerState { return Scaffold( appBar: AppBar( title: const Text('Profil'), - actions: [ - IconButton( - onPressed: _logout, - icon: const Icon(Icons.logout), - tooltip: 'Logga ut', - ), - ], + actions: [], // Utloggningsikonen tas bort här eftersom den redan finns i AppShell ), body: _isLoading ? const Center(child: CircularProgressIndicator()) diff --git a/flutter/lib/features/recipes/presentation/recipe_detail_screen.dart b/flutter/lib/features/recipes/presentation/recipe_detail_screen.dart index b5b630da..85cfe805 100644 --- a/flutter/lib/features/recipes/presentation/recipe_detail_screen.dart +++ b/flutter/lib/features/recipes/presentation/recipe_detail_screen.dart @@ -22,6 +22,11 @@ class RecipeDetailScreen extends ConsumerWidget { return Scaffold( appBar: AppBar( title: Text(recipeAsync.maybeWhen(data: (d) => d, orElse: () => null)?.title ?? 'Recept'), + leading: IconButton( + icon: const Icon(Icons.arrow_back), + onPressed: () => context.go('/recipes'), + tooltip: 'Tillbaka till receptlistan', + ), actions: recipeAsync.maybeWhen(data: (d) => d, orElse: () => null) == null ? [] : [ @@ -40,7 +45,28 @@ class RecipeDetailScreen extends ConsumerWidget { message: mapErrorToUserMessage(error, context), onRetry: () => ref.invalidate(recipeDetailProvider(recipeId)), ), - data: (recipe) => _RecipeBody(recipe: recipe), + data: (recipe) => Stack( + children: [ + if (recipe.imageUrl != null) + SizedBox( + height: MediaQuery.of(context).size.height * 2 / 3, + child: Image.network( + recipe.imageUrl!, + fit: BoxFit.cover, + width: double.infinity, + alignment: Alignment.topCenter, + ), + ), + SingleChildScrollView( + child: Column( + children: [ + SizedBox(height: MediaQuery.of(context).size.height * 2 / 3), + _RecipeBody(recipe: recipe), + ], + ), + ), + ], + ), ), ); } diff --git a/flutter/teknisk_beskrivning_flutter.md b/flutter/teknisk_beskrivning_flutter.md index 2752d7b0..c23554a7 100644 --- a/flutter/teknisk_beskrivning_flutter.md +++ b/flutter/teknisk_beskrivning_flutter.md @@ -1,4 +1,7 @@ # Teknisk Beskrivning - Flutter Frontend +Viktigt att komma ihåg vid implementering av nya funktioner och kodning är att inte använda windows sökvägar. Att inte använda c:/dev/recpie-app.... Detta eftersom bygg- och testmiljön är på en remote ubuntu-server. Utveckling sker lokalt och test samt drift +sker på remote server. + Detta dokument beskriver vad som ar byggt, arkitekturval och teknisk kontext for Flutter-frontenden. Malgrupp: utvecklare och AI-assistent i denna chat.