From b2d9e808feead5153d428e49c0b417632988939f Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Wed, 7 May 2025 12:48:52 +0300 Subject: [PATCH 01/23] feat(more_options): delete recipe, diet, plans, move to draft diets and plans --- lib/core/widgets/custom_popup.dart | 58 +++++++++++++++-- .../presentation/diet_preview_screen.dart | 32 +++------- .../presentation/pages/about_diet_screen.dart | 62 ++++--------------- .../diets/repositories/diet_repository.dart | 8 +++ lib/features/diets/services/diet_service.dart | 5 ++ .../bloc/diets_cubit/diets_cubit.dart | 10 +++ .../bloc/recipes_cubit/recipes_cubit.dart | 17 +++-- .../presentation/cubit/my_plans_cubit.dart | 9 +++ .../repositories/my_diets_repository.dart | 5 +- .../my_plans/services/my_plans_service.dart | 10 +-- .../presentation/pages/about_plan_screen.dart | 62 ++++--------------- .../presentation/about_recipe_screen.dart | 46 ++++---------- .../repositories/about_recipe_repository.dart | 8 +++ .../recipe/services/about_recipe_service.dart | 5 ++ 14 files changed, 163 insertions(+), 174 deletions(-) diff --git a/lib/core/widgets/custom_popup.dart b/lib/core/widgets/custom_popup.dart index 711995f2..a4167f11 100644 --- a/lib/core/widgets/custom_popup.dart +++ b/lib/core/widgets/custom_popup.dart @@ -7,7 +7,11 @@ import 'package:eatvio_app/core/widgets/show_error_dialog.dart'; import 'package:eatvio_app/features/blog_post_create/bloc/blog_post_create_cubit/blog_post_create_cubit.dart'; import 'package:eatvio_app/features/complaining/presentation/complaining_bottom_sheet.dart'; import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart'; +import 'package:eatvio_app/features/feed/presentation/bloc/diets_cubit/diets_cubit.dart'; import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart'; +import 'package:eatvio_app/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart'; +import 'package:eatvio_app/features/my_diets/presentation/cubit/my_diets_cubit.dart'; +import 'package:eatvio_app/features/my_plans/presentation/cubit/my_plans_cubit.dart'; import 'package:eatvio_app/generated/l10n.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -96,23 +100,65 @@ class CustomPopup extends StatelessWidget { } }); if (complainedContentType == ComplainedContent.plan || complainedContentType == ComplainedContent.diet) { - addItem('assets/icons/remove_from_public.svg', 'Снять с публикации', () { - showInfoToast('В разработке'); - return; + addItem('assets/icons/remove_from_public.svg', 'Снять с публикации', () async { + if (complainedContentType == ComplainedContent.diet) { + final result = await sl().unpublishDiet(id!); + if (!context.mounted) return; + context.read().loadFeedBlogPostList(); + if (!result) { + showErrorDialog(context, title: S.current.could_not_delete_blog_post); + return; + } + showSuccessToast('Диета перенесена в архив, обновите ленту'); + } else if (complainedContentType == ComplainedContent.plan) { + final result = await sl().unpublish(slug!); + if (!context.mounted) return; + context.read().loadFeedBlogPostList(); + if (!result) { + showErrorDialog(context, title: S.current.could_not_delete_blog_post); + return; + } + showSuccessToast('План перенесен в архив, обновите ленту'); + } }); } addItem('assets/icons/red_trash.svg', 'Удалить', () async { if (complainedContentType == ComplainedContent.posts) { final result = await sl().deleteBlogPost(id!); if (!context.mounted) return; + context.read().loadFeedBlogPostList(); if (!result) { showErrorDialog(context, title: S.current.could_not_delete_blog_post); return; } + showSuccessToast('Пост удален, обновите ленту'); + } else if (complainedContentType == ComplainedContent.recipe) { + final result = await sl().deleteRecipe(slug!); + if (!context.mounted) return; context.read().loadFeedBlogPostList(); - } else { - showInfoToast('В разработке'); - return; + if (!result) { + showErrorDialog(context, title: S.current.could_not_delete_blog_post); + return; + } + showSuccessToast('Рецепт удален, обновите ленту'); + } else if (complainedContentType == ComplainedContent.diet) { + final result = await sl().deleteDiet(id!); + if (!context.mounted) return; + context.read().loadFeedBlogPostList(); + if (!result) { + showErrorDialog(context, title: S.current.could_not_delete_blog_post); + return; + } + showSuccessToast('Диета удалена, обновите ленту'); + } else if (complainedContentType == ComplainedContent.plan) { + final result = await sl().deletePlan(slug!); + if (!context.mounted) return; + context.read().loadFeedBlogPostList(); + if (!result) { + showErrorDialog(context, title: S.current.could_not_delete_blog_post); + return; + } + showSuccessToast('План удален, обновите ленту'); } }); } else { diff --git a/lib/features/create_diet/presentation/diet_preview_screen.dart b/lib/features/create_diet/presentation/diet_preview_screen.dart index 759a9ad3..884c283d 100644 --- a/lib/features/create_diet/presentation/diet_preview_screen.dart +++ b/lib/features/create_diet/presentation/diet_preview_screen.dart @@ -1,24 +1,24 @@ import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; +import 'package:eatvio_app/core/enums/complained_content.dart'; import 'package:eatvio_app/core/enums/product_type.dart'; import 'package:eatvio_app/core/utils/localization_utils.dart'; import 'package:eatvio_app/core/utils/string_extentions.dart'; import 'package:eatvio_app/core/widgets/bookmark_button.dart'; import 'package:eatvio_app/core/widgets/custom_divider.dart'; +import 'package:eatvio_app/core/widgets/custom_popup.dart'; import 'package:eatvio_app/core/widgets/info_row.dart'; import 'package:eatvio_app/features/diets/presentation/widgets/author_card.dart'; import 'package:eatvio_app/core/widgets/cpfc_container.dart'; import 'package:eatvio_app/features/diets/presentation/widgets/expandable_text.dart'; import 'package:eatvio_app/features/diets/presentation/widgets/info_bouble.dart'; import 'package:eatvio_app/core/widgets/main_background_bouble.dart'; -import 'package:eatvio_app/features/diets/presentation/widgets/more_options.dart'; import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart'; import 'package:eatvio_app/generated/l10n.dart'; import 'package:eatvio_app/core/theme/custom_text_style.dart'; import 'package:eatvio_app/core/theme/theme_helper.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_portal/flutter_portal.dart'; import 'package:flutter_svg/svg.dart'; class DietPreviewScreen extends StatefulWidget { @@ -190,30 +190,12 @@ class _DietPreviewScreenState extends State { style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black), ), actions: [ - PortalTarget( - visible: isMoreOptionsVisible, - portalFollower: MoreOptions( - disableActions: true, - path: 'diet/${widget.diet.id}', - ), - anchor: const Aligned( - shiftToWithinBound: AxisFlag(x: true, y: true), - follower: Alignment.topRight, - target: Alignment.bottomRight, - ), - child: IconButton( - onPressed: () { - setState(() { - isMoreOptionsVisible = !isMoreOptionsVisible; - }); - }, - icon: SvgPicture.asset( - 'assets/icons/more_button.svg', - width: 20, - height: 20, - ), - ), + CustomPopup( + isAuthor: widget.diet.author.authorIsMe, + path: 'diet/${widget.diet.id}', + complainedContentType: ComplainedContent.diet, ), + const SizedBox(width: 16), ], ), body: SingleChildScrollView( diff --git a/lib/features/diets/presentation/pages/about_diet_screen.dart b/lib/features/diets/presentation/pages/about_diet_screen.dart index d4a07038..8a21395a 100644 --- a/lib/features/diets/presentation/pages/about_diet_screen.dart +++ b/lib/features/diets/presentation/pages/about_diet_screen.dart @@ -19,7 +19,6 @@ import 'package:eatvio_app/features/diets/presentation/widgets/cancel_diet_botto import 'package:eatvio_app/features/diets/presentation/widgets/expandable_text.dart'; import 'package:eatvio_app/features/diets/presentation/widgets/info_bouble.dart'; import 'package:eatvio_app/core/widgets/main_background_bouble.dart'; -import 'package:eatvio_app/features/diets/presentation/widgets/more_options.dart'; import 'package:eatvio_app/features/diets/presentation/widgets/start_diet_bottom_sheet.dart'; import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart'; import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_cubit.dart'; @@ -32,7 +31,6 @@ import 'package:eatvio_app/core/theme/custom_text_style.dart'; import 'package:eatvio_app/core/theme/theme_helper.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:flutter_portal/flutter_portal.dart'; import 'package:flutter_svg/svg.dart'; class AboutDietScreen extends StatefulWidget { @@ -498,31 +496,13 @@ class _AboutDietScreenState extends State { style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black), ), actions: [ - PortalTarget( - visible: isMoreOptionsVisible, - portalFollower: MoreOptions( - path: 'diet/${widget.diet.id}', - complainedContentType: ComplainedContent.diet, - id: widget.diet.id, - ), - anchor: const Aligned( - shiftToWithinBound: AxisFlag(x: true, y: true), - follower: Alignment.topRight, - target: Alignment.bottomRight, - ), - child: IconButton( - onPressed: () { - setState(() { - isMoreOptionsVisible = !isMoreOptionsVisible; - }); - }, - icon: SvgPicture.asset( - 'assets/icons/more_button.svg', - width: 20, - height: 20, - ), - ), + CustomPopup( + isAuthor: widget.diet.author.authorIsMe, + path: 'diet/${widget.diet.id}', + complainedContentType: ComplainedContent.diet, + id: widget.diet.id, ), + const SizedBox(width: 16), ], ), body: DataErrorWidget( @@ -542,31 +522,13 @@ class _AboutDietScreenState extends State { style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black), ), actions: [ - PortalTarget( - visible: isMoreOptionsVisible, - portalFollower: MoreOptions( - path: 'diet/${widget.diet.id}', - complainedContentType: ComplainedContent.diet, - id: widget.diet.id, - ), - anchor: const Aligned( - shiftToWithinBound: AxisFlag(x: true, y: true), - follower: Alignment.topRight, - target: Alignment.bottomRight, - ), - child: IconButton( - onPressed: () { - setState(() { - isMoreOptionsVisible = !isMoreOptionsVisible; - }); - }, - icon: SvgPicture.asset( - 'assets/icons/more_button.svg', - width: 20, - height: 20, - ), - ), + CustomPopup( + isAuthor: widget.diet.author.authorIsMe, + path: 'diet/${widget.diet.id}', + complainedContentType: ComplainedContent.diet, + id: widget.diet.id, ), + const SizedBox(width: 16), ], ), body: const Loader(), diff --git a/lib/features/diets/repositories/diet_repository.dart b/lib/features/diets/repositories/diet_repository.dart index cefc0c26..a3bbbbb3 100644 --- a/lib/features/diets/repositories/diet_repository.dart +++ b/lib/features/diets/repositories/diet_repository.dart @@ -65,6 +65,14 @@ class DietRepository { } } + Future deleteDiet(int id) async { + try { + return await dietsService.deleteDiet(id: id); + } catch (e) { + rethrow; + } + } + void emitLikesStateToFeed(LikesState state) => _dietLikeStateStreamController.add(state); void emitFavoriteStateToFeed(FavoriteState state) => _dietFavoriteStateStreamController.add(state); void emitCommentsStateToFeed(CommentsState state) => _dietCommentsStateStreamController.add(state); diff --git a/lib/features/diets/services/diet_service.dart b/lib/features/diets/services/diet_service.dart index c93e3296..59c2c977 100644 --- a/lib/features/diets/services/diet_service.dart +++ b/lib/features/diets/services/diet_service.dart @@ -39,4 +39,9 @@ abstract class DietService { Future cancelDiet({ @Path() required int id, }); + + @DELETE('/api/diets/delete/{id}') + Future deleteDiet({ + @Path() required int id, + }); } diff --git a/lib/features/feed/presentation/bloc/diets_cubit/diets_cubit.dart b/lib/features/feed/presentation/bloc/diets_cubit/diets_cubit.dart index 23c7ae37..3f1ea0b0 100644 --- a/lib/features/feed/presentation/bloc/diets_cubit/diets_cubit.dart +++ b/lib/features/feed/presentation/bloc/diets_cubit/diets_cubit.dart @@ -29,6 +29,7 @@ class DietsCubit extends Cubit { late final StreamSubscription likesStateSubscription; late final StreamSubscription favoriteStateSubscription; late final StreamSubscription commentsStateSubscription; + DietsCubit({ required this.feedRepository, required this.dietsRepository, @@ -342,4 +343,13 @@ class DietsCubit extends Cubit { }, ); } + + Future deleteDiet(int dietId) async { + try { + await dietsRepository.deleteDiet(dietId); + return true; + } catch (e) { + return false; + } + } } diff --git a/lib/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart b/lib/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart index 18c7ebb8..866d4abb 100644 --- a/lib/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart +++ b/lib/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart @@ -49,7 +49,7 @@ class RecipesCubit extends Cubit { tags: _selectedTags.toList(), query: query, ); - + final recipesTags = (await recipeRepository.getRecipesTags()); emit( state.copyWith( @@ -129,7 +129,7 @@ class RecipesCubit extends Cubit { EasyDebounce.debounce( 'add_or_remove_plan_from_favorite', const Duration(milliseconds: 200), - () async { + () async { try { await aboutRecipeRepository.addToFavorite(slug); } catch (e) { @@ -169,7 +169,7 @@ class RecipesCubit extends Cubit { EasyDebounce.debounce( 'add_or_remove_plan_from_favorite', const Duration(milliseconds: 200), - () async { + () async { try { await aboutRecipeRepository.removeFromFavorite(slug); } catch (e) { @@ -225,7 +225,7 @@ class RecipesCubit extends Cubit { EasyDebounce.debounce( 'like_plan', const Duration(milliseconds: 200), - () async { + () async { try { await aboutRecipeRepository.likeRecipe(slug); } catch (e) { @@ -300,4 +300,13 @@ class RecipesCubit extends Cubit { ), ); } + + Future deleteRecipe(String slug) async { + try { + await aboutRecipeRepository.deleteRecipe(slug); + return true; + } catch (e) { + return false; + } + } } diff --git a/lib/features/my_plans/presentation/cubit/my_plans_cubit.dart b/lib/features/my_plans/presentation/cubit/my_plans_cubit.dart index 6c14003f..33462563 100644 --- a/lib/features/my_plans/presentation/cubit/my_plans_cubit.dart +++ b/lib/features/my_plans/presentation/cubit/my_plans_cubit.dart @@ -204,4 +204,13 @@ class MyPlansCubit extends Cubit { return false; } } + + Future unpublish(String slug) async { + try { + await myPlansRepository.unpublish(slug); + return true; + } catch (e) { + return false; + } + } } diff --git a/lib/features/my_plans/repositories/my_diets_repository.dart b/lib/features/my_plans/repositories/my_diets_repository.dart index a28c88cd..1ee9afb1 100644 --- a/lib/features/my_plans/repositories/my_diets_repository.dart +++ b/lib/features/my_plans/repositories/my_diets_repository.dart @@ -35,5 +35,8 @@ class MyPlansRepository { rethrow; } } - + + Future unpublish(String slug) async { + return await myPlansService.unpublish(slug: slug); + } } diff --git a/lib/features/my_plans/services/my_plans_service.dart b/lib/features/my_plans/services/my_plans_service.dart index ee81e55e..9c5cbf0c 100644 --- a/lib/features/my_plans/services/my_plans_service.dart +++ b/lib/features/my_plans/services/my_plans_service.dart @@ -6,8 +6,7 @@ part 'my_plans_service.g.dart'; @RestApi() abstract class MyPlansService { - - factory MyPlansService(Dio dio, {String baseUrl}) = _MyPlansService; + factory MyPlansService(Dio dio, {String baseUrl}) = _MyPlansService; @GET('/api/plans/index') Future getPlans({ @@ -24,5 +23,8 @@ abstract class MyPlansService { @Path() required String slug, }); - -} \ No newline at end of file + @POST('/api/plans/draft/{slug}') + Future unpublish({ + @Path() required String slug, + }); +} diff --git a/lib/features/plans/presentation/pages/about_plan_screen.dart b/lib/features/plans/presentation/pages/about_plan_screen.dart index 3d35fc51..72cb71bd 100644 --- a/lib/features/plans/presentation/pages/about_plan_screen.dart +++ b/lib/features/plans/presentation/pages/about_plan_screen.dart @@ -15,7 +15,6 @@ import 'package:eatvio_app/features/diets/presentation/widgets/author_card.dart' import 'package:eatvio_app/features/diets/presentation/widgets/expandable_text.dart'; import 'package:eatvio_app/features/diets/presentation/widgets/info_bouble.dart'; import 'package:eatvio_app/core/widgets/main_background_bouble.dart'; -import 'package:eatvio_app/features/diets/presentation/widgets/more_options.dart'; import 'package:eatvio_app/features/feed/models/plan_pagination_model.dart'; import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_cubit.dart'; import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_state.dart'; @@ -30,7 +29,6 @@ import 'package:eatvio_app/core/theme/custom_text_style.dart'; import 'package:eatvio_app/core/theme/theme_helper.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:flutter_portal/flutter_portal.dart'; import 'package:flutter_svg/svg.dart'; import 'package:go_router/go_router.dart'; @@ -143,31 +141,13 @@ class _AboutPlanScreenState extends State { style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black), ), actions: [ - PortalTarget( - visible: isMoreOptionsVisible, - portalFollower: MoreOptions( - complainedContentType: ComplainedContent.plan, - path: 'plan/${widget.plan.id}', - slug: widget.plan.slug, - ), - anchor: const Aligned( - shiftToWithinBound: AxisFlag(x: true, y: true), - follower: Alignment.topRight, - target: Alignment.bottomRight, - ), - child: IconButton( - onPressed: () { - setState(() { - isMoreOptionsVisible = !isMoreOptionsVisible; - }); - }, - icon: SvgPicture.asset( - 'assets/icons/more_button.svg', - width: 20, - height: 20, - ), - ), + CustomPopup( + isAuthor: widget.plan.author.authorIsMe, + path: 'plan/${widget.plan.id}', + complainedContentType: ComplainedContent.plan, + slug: widget.plan.slug, ), + const SizedBox(width: 16), ], ), body: DataErrorWidget(onReload: () => context.read().getPlan(widget.plan.slug)), @@ -380,31 +360,13 @@ class _AboutPlanScreenState extends State { style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black), ), actions: [ - PortalTarget( - visible: isMoreOptionsVisible, - portalFollower: MoreOptions( - complainedContentType: ComplainedContent.plan, - path: 'plan/${widget.plan.id}', - slug: widget.plan.slug, - ), - anchor: const Aligned( - shiftToWithinBound: AxisFlag(x: true, y: true), - follower: Alignment.topRight, - target: Alignment.bottomRight, - ), - child: IconButton( - onPressed: () { - setState(() { - isMoreOptionsVisible = !isMoreOptionsVisible; - }); - }, - icon: SvgPicture.asset( - 'assets/icons/more_button.svg', - width: 20, - height: 20, - ), - ), + CustomPopup( + isAuthor: widget.plan.author.authorIsMe, + path: 'plan/${widget.plan.id}', + complainedContentType: ComplainedContent.plan, + slug: widget.plan.slug, ), + const SizedBox(width: 16), ], ), body: SingleChildScrollView( diff --git a/lib/features/recipe/presentation/about_recipe_screen.dart b/lib/features/recipe/presentation/about_recipe_screen.dart index cc65a0c2..2436ba0b 100644 --- a/lib/features/recipe/presentation/about_recipe_screen.dart +++ b/lib/features/recipe/presentation/about_recipe_screen.dart @@ -16,7 +16,6 @@ import 'package:eatvio_app/features/diets/presentation/widgets/author_card.dart' import 'package:eatvio_app/features/diets/presentation/widgets/expandable_text.dart'; import 'package:eatvio_app/features/diets/presentation/widgets/info_bouble.dart'; import 'package:eatvio_app/core/widgets/main_background_bouble.dart'; -import 'package:eatvio_app/features/diets/presentation/widgets/more_options.dart'; import 'package:eatvio_app/features/feed/models/recipes_model.dart'; import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_cubit.dart'; import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_state.dart'; @@ -32,7 +31,6 @@ import 'package:eatvio_app/core/theme/custom_text_style.dart'; import 'package:eatvio_app/core/theme/theme_helper.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:flutter_portal/flutter_portal.dart'; import 'package:flutter_svg/svg.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -398,23 +396,13 @@ class _AboutRecipeScreenState extends State { style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black), ), actions: [ - PortalTarget( - visible: isMoreOptionsVisible, - portalFollower: MoreOptions( - complainedContentType: ComplainedContent.recipe, - path: 'recipe/${widget.recipe.slug}', - slug: widget.recipe.slug, - ), - anchor: const Aligned(shiftToWithinBound: AxisFlag(x: true, y: true), follower: Alignment.topRight, target: Alignment.bottomRight), - child: IconButton( - onPressed: () { - setState(() { - isMoreOptionsVisible = !isMoreOptionsVisible; - }); - }, - icon: SvgPicture.asset('assets/icons/more_button.svg', width: 20, height: 20), - ), + CustomPopup( + isAuthor: widget.recipe.author.authorIsMe, + path: 'recipe/${widget.recipe.slug}', + complainedContentType: ComplainedContent.recipe, + slug: widget.recipe.slug, ), + const SizedBox(width: 16), ], ), body: DataErrorWidget(onReload: () => context.read().getRecipe(widget.recipe.slug, index: widget.index)), @@ -432,23 +420,13 @@ class _AboutRecipeScreenState extends State { style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black), ), actions: [ - PortalTarget( - visible: isMoreOptionsVisible, - portalFollower: MoreOptions( - complainedContentType: ComplainedContent.recipe, - path: 'recipe/${widget.recipe.slug}', - slug: widget.recipe.slug, - ), - anchor: const Aligned(shiftToWithinBound: AxisFlag(x: true, y: true), follower: Alignment.topRight, target: Alignment.bottomRight), - child: IconButton( - onPressed: () { - setState(() { - isMoreOptionsVisible = !isMoreOptionsVisible; - }); - }, - icon: SvgPicture.asset('assets/icons/more_button.svg', width: 20, height: 20), - ), + CustomPopup( + isAuthor: widget.recipe.author.authorIsMe, + path: 'recipe/${widget.recipe.slug}', + complainedContentType: ComplainedContent.recipe, + slug: widget.recipe.slug, ), + const SizedBox(width: 16), ], ), body: const Loader(), diff --git a/lib/features/recipe/repositories/about_recipe_repository.dart b/lib/features/recipe/repositories/about_recipe_repository.dart index a9178a65..df433f5e 100644 --- a/lib/features/recipe/repositories/about_recipe_repository.dart +++ b/lib/features/recipe/repositories/about_recipe_repository.dart @@ -47,6 +47,14 @@ class AboutRecipeRepository { } } + Future deleteRecipe(String slug) async { + try { + await recipeService.deleteRecipe(slug: slug); + } catch (e) { + rethrow; + } + } + void emitLikesStateToFeed(LikesState state) => _recipeLikeStateStreamController.add(state); void emitFavoriteStateToFeed(FavoriteState state) => _recipeFavoriteStateStreamController.add(state); void emitCommentsStateToFeed(CommentsState state) => _recipeCommentsStateStreamController.add(state); diff --git a/lib/features/recipe/services/about_recipe_service.dart b/lib/features/recipe/services/about_recipe_service.dart index b326f970..21170ed4 100644 --- a/lib/features/recipe/services/about_recipe_service.dart +++ b/lib/features/recipe/services/about_recipe_service.dart @@ -25,4 +25,9 @@ abstract class AboutRecipeService { @GET('/api/recipes/show/{id}') Future getRecipe(@Path() String id); + + @DELETE('/api/recipes/delete/{slug}') + Future deleteRecipe({ + @Path() required String slug, + }); } From c0f66b7a93fc349febe681f6ed42fe028c7359c3 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 09:00:58 +0000 Subject: [PATCH 02/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 50 ++-------------------------- 1 file changed, 3 insertions(+), 47 deletions(-) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index 1bb78c94..70fbcd94 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -8,51 +8,7 @@ jobs: build: runs-on: [macos-arm64] steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Remove cache - run: rm -rf /Users/gitea_runner_ci/Library/Developer/Xcode/DerivedData/* - - - name: Download provisioning - uses: mso7nueh/apple-provisioning-profiles-downloader@v1.0.8 - with: - profile-type: IOS_APP_STORE - bundle-id: com.eatvioapp.app - issuer-id: ${{ vars.APPSTORE_ISSUER_ID }} - api-key-id: ${{ vars.APPSTORE_KEY_ID }} - api-private-key: ${{ vars.APPSTORE_PRIVATE_KEY }} - - - name: Unlock keychain + - name: Run Fastlane run: | - security unlock-keychain -p "EeChahboo9Ei" login.keychain - security set-key-partition-list -S apple-tool:,apple: -s -k "EeChahboo9Ei" login.keychain - - - name: Ensure private key access - run: | - security set-key-partition-list -S apple-tool:,apple: -s -k "EeChahboo9Ei" ~/Library/Keychains/login.keychain-db - - - name: List identities in keychain - run: | - security list-keychains - security find-identity -v -p codesigning login.keychain - - - name: Set keychain default - run: | - security default-keychain -s login.keychain - - - name: Build with Flutter - run: | - flutter clean - flutter pub get - flutter pub upgrade - flutter pub run build_runner build --delete-conflicting-outputs - flutter build ipa --export-options-plist=Support/ExportOptions.plist --release - - - name: Upload to TestFlight - uses: mso7nueh/upload-testflight-build@master - with: - app-path: ./build/ios/ipa/eatvio_app.ipa - issuer-id: ${{ vars.APPSTORE_ISSUER_ID }} - api-key-id: ${{ vars.APPSTORE_KEY_ID }} - api-private-key: ${{ vars.APPSTORE_PRIVATE_KEY }} + cd ios + fastlane beta \ No newline at end of file From 028230003e9ddf09032a2d0843360279b1d05d89 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 12:04:51 +0300 Subject: [PATCH 03/23] feat(fastlane): add fastlane --- ios/Gemfile | 3 +++ ios/Runner.xcodeproj/project.pbxproj | 6 +++--- ios/fastlane/Appfile | 8 ++++++++ ios/fastlane/Fastfile | 25 +++++++++++++++++++++++++ pubspec.yaml | 2 +- 5 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 ios/Gemfile create mode 100644 ios/fastlane/Appfile create mode 100644 ios/fastlane/Fastfile diff --git a/ios/Gemfile b/ios/Gemfile new file mode 100644 index 00000000..7a118b49 --- /dev/null +++ b/ios/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "fastlane" diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c2ccb23a..81cbe037 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -389,7 +389,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 7; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -539,7 +539,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 7; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -577,7 +577,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 7; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/fastlane/Appfile b/ios/fastlane/Appfile new file mode 100644 index 00000000..b36199d4 --- /dev/null +++ b/ios/fastlane/Appfile @@ -0,0 +1,8 @@ +app_identifier("com.eatvioapp.app") # The bundle identifier of your app +apple_id("eatvio2023@icloud.com") # Your Apple Developer Portal username + +itc_team_id("126794592") # App Store Connect Team ID +team_id("VL68C36HYS") # Developer Portal Team ID + +# For more information about the Appfile, see: +# https://docs.fastlane.tools/advanced/#appfile diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile new file mode 100644 index 00000000..73e1657e --- /dev/null +++ b/ios/fastlane/Fastfile @@ -0,0 +1,25 @@ +# This file contains the fastlane.tools configuration +# You can find the documentation at https://docs.fastlane.tools +# +# For a list of all available actions, check out +# +# https://docs.fastlane.tools/actions +# +# For a list of all available plugins, check out +# +# https://docs.fastlane.tools/plugins/available-plugins +# + +# Uncomment the line if you want fastlane to automatically update itself +# update_fastlane + +default_platform(:ios) + +platform :ios do + desc "Push a new beta build to TestFlight" + lane :beta do + increment_build_number(xcodeproj: "Runner.xcodeproj") + build_app(workspace: "Runner.xcworkspace", scheme: "Runner") + upload_to_testflight + end +end diff --git a/pubspec.yaml b/pubspec.yaml index 46ddf5d1..1b99db27 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: eatvio_app description: A new Flutter project. -version: 1.0.51+6 +version: 1.1.1+1 publish_to: 'none' environment: From c887ec4b59c1c1a8e201510198a283dab1e0d154 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 12:08:08 +0300 Subject: [PATCH 04/23] feat(fastlane): add checkout --- .gitea/workflows/test-flight-cd.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index 70fbcd94..5956fb7a 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -8,6 +8,9 @@ jobs: build: runs-on: [macos-arm64] steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Run Fastlane run: | cd ios From d2ac34e6d7bc562c6d1212b6e904ee41b5c253e3 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 12:31:35 +0300 Subject: [PATCH 05/23] feat(fastlane): complete --- .gitea/workflows/test-flight-cd.yaml | 9 ++++++++ ios/Runner.xcodeproj/project.pbxproj | 6 +++--- ios/Runner/Info.plist | 2 +- ios/fastlane/.env.default | 2 ++ ios/fastlane/README.md | 32 ++++++++++++++++++++++++++++ ios/fastlane/report.xml | 28 ++++++++++++++++++++++++ 6 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 ios/fastlane/.env.default create mode 100644 ios/fastlane/README.md create mode 100644 ios/fastlane/report.xml diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index 5956fb7a..abf7d0cd 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -10,6 +10,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + + - name: Flutter build + run: | + flutter clean + flutter pub get + flutter pub upgrade + flutter pub run build_runner build --delete-conflicting-outputs + cd ios + pod update - name: Run Fastlane run: | diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 81cbe037..12490b49 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -388,7 +388,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -538,7 +538,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -576,7 +576,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index b6470ce4..eada9fab 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - $(FLUTTER_BUILD_NUMBER) + 9 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/ios/fastlane/.env.default b/ios/fastlane/.env.default new file mode 100644 index 00000000..49b144e2 --- /dev/null +++ b/ios/fastlane/.env.default @@ -0,0 +1,2 @@ +FASTLANE_USER=eatvio2023@icloud.com +FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD=iqsm-pfxm-bpmg-nkry \ No newline at end of file diff --git a/ios/fastlane/README.md b/ios/fastlane/README.md new file mode 100644 index 00000000..891747df --- /dev/null +++ b/ios/fastlane/README.md @@ -0,0 +1,32 @@ +fastlane documentation +---- + +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +```sh +xcode-select --install +``` + +For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) + +# Available Actions + +## iOS + +### ios beta + +```sh +[bundle exec] fastlane ios beta +``` + +Push a new beta build to TestFlight + +---- + +This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. + +More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). + +The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/ios/fastlane/report.xml b/ios/fastlane/report.xml new file mode 100644 index 00000000..c86e2b65 --- /dev/null +++ b/ios/fastlane/report.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 457ae25dc848a6c0b2532c803919104a99e12f8c Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 09:34:32 +0000 Subject: [PATCH 06/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index abf7d0cd..a6d47527 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -19,8 +19,14 @@ jobs: flutter pub run build_runner build --delete-conflicting-outputs cd ios pod update + env: + LANG: en_US.UTF-8 + LC_ALL: en_US.UTF-8 - name: Run Fastlane run: | cd ios - fastlane beta \ No newline at end of file + fastlane beta + env: + LANG: en_US.UTF-8 + LC_ALL: en_US.UTF-8 \ No newline at end of file From 2480f205638596ab37cd6b5c6ece78515a658393 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 10:12:50 +0000 Subject: [PATCH 07/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index a6d47527..cab49429 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -22,6 +22,13 @@ jobs: env: LANG: en_US.UTF-8 LC_ALL: en_US.UTF-8 + + - name: Flutter build ipa + run: | + flutter build ipa --release + env: + LANG: en_US.UTF-8 + LC_ALL: en_US.UTF-8 - name: Run Fastlane run: | From 31712f3c40acecb42da1582275c0924b6008e593 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 10:17:06 +0000 Subject: [PATCH 08/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index cab49429..cb58e77c 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -19,20 +19,6 @@ jobs: flutter pub run build_runner build --delete-conflicting-outputs cd ios pod update - env: - LANG: en_US.UTF-8 - LC_ALL: en_US.UTF-8 - - - name: Flutter build ipa - run: | - flutter build ipa --release - env: - LANG: en_US.UTF-8 - LC_ALL: en_US.UTF-8 - - - name: Run Fastlane - run: | - cd ios fastlane beta env: LANG: en_US.UTF-8 From 305d103eb7aa6f2b0afb452c8240c5f360880540 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 10:33:07 +0000 Subject: [PATCH 09/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20ios/fastlane/Fastfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/fastlane/Fastfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 73e1657e..b860fcc0 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -18,8 +18,9 @@ default_platform(:ios) platform :ios do desc "Push a new beta build to TestFlight" lane :beta do + match(type: "appstore", readonly: true) increment_build_number(xcodeproj: "Runner.xcodeproj") - build_app(workspace: "Runner.xcworkspace", scheme: "Runner") + build_app(workspace: "Runner.xcworkspace", scheme: "Runner", export_method: "app-store") upload_to_testflight end end From 737bb3b1e52ed8475a6970784dde54dc66a6da93 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 10:35:44 +0000 Subject: [PATCH 10/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20ios/fastlane/Fastfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index b860fcc0..15bff2f4 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -18,7 +18,7 @@ default_platform(:ios) platform :ios do desc "Push a new beta build to TestFlight" lane :beta do - match(type: "appstore", readonly: true) + match(type: "appstore", readonly: true, git_branch: "master") increment_build_number(xcodeproj: "Runner.xcodeproj") build_app(workspace: "Runner.xcworkspace", scheme: "Runner", export_method: "app-store") upload_to_testflight From e52feae03a898f4d5cbbe00964a4b3b949f2d569 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 10:36:53 +0000 Subject: [PATCH 11/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index cb58e77c..eab5ae9c 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -22,4 +22,6 @@ jobs: fastlane beta env: LANG: en_US.UTF-8 - LC_ALL: en_US.UTF-8 \ No newline at end of file + LC_ALL: en_US.UTF-8 + MATCH_PASSWORD: EeChahboo9Ei + MATCH_GIT_URL: http://gitea.office.local:3000/eatvio/eatvio_app \ No newline at end of file From f5577e00e75042ca6c4b4dfb9f08484a2d37dd4f Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 10:40:48 +0000 Subject: [PATCH 12/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index eab5ae9c..b0aec7dc 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -24,4 +24,4 @@ jobs: LANG: en_US.UTF-8 LC_ALL: en_US.UTF-8 MATCH_PASSWORD: EeChahboo9Ei - MATCH_GIT_URL: http://gitea.office.local:3000/eatvio/eatvio_app \ No newline at end of file + MATCH_GIT_URL: https://mso7nueh:Aa4dRo48N@gitea.office.local:3000/eatvio/eatvio_app \ No newline at end of file From d3a1c2fe26c9fb8914ca893b2348873b604c261a Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 10:44:59 +0000 Subject: [PATCH 13/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index b0aec7dc..b737a4a2 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -11,6 +11,13 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Set up SSH access to Gitea + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan gitea.office.local >> ~/.ssh/known_hosts + - name: Flutter build run: | flutter clean @@ -24,4 +31,4 @@ jobs: LANG: en_US.UTF-8 LC_ALL: en_US.UTF-8 MATCH_PASSWORD: EeChahboo9Ei - MATCH_GIT_URL: https://mso7nueh:Aa4dRo48N@gitea.office.local:3000/eatvio/eatvio_app \ No newline at end of file + MATCH_GIT_URL: git@gitea.office.local:eatvio/eatvio_app.git \ No newline at end of file From 6e29a2f92cd98af99dc7758587ffeabdc0e3d768 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 11:01:54 +0000 Subject: [PATCH 14/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20ios/fastlane/Fastfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 15bff2f4..d8476fb0 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -18,7 +18,7 @@ default_platform(:ios) platform :ios do desc "Push a new beta build to TestFlight" lane :beta do - match(type: "appstore", readonly: true, git_branch: "master") + match(type: "appstore", readonly: true, git_branch: "master", clone_branch_directly: true) increment_build_number(xcodeproj: "Runner.xcodeproj") build_app(workspace: "Runner.xcworkspace", scheme: "Runner", export_method: "app-store") upload_to_testflight From 17e0d53c1b6c1a4ab95f847ffb914d2a77c49bfe Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 11:11:23 +0000 Subject: [PATCH 15/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index b737a4a2..4e5983c7 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -11,13 +11,6 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Set up SSH access to Gitea - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan gitea.office.local >> ~/.ssh/known_hosts - - name: Flutter build run: | flutter clean @@ -31,4 +24,4 @@ jobs: LANG: en_US.UTF-8 LC_ALL: en_US.UTF-8 MATCH_PASSWORD: EeChahboo9Ei - MATCH_GIT_URL: git@gitea.office.local:eatvio/eatvio_app.git \ No newline at end of file + MATCH_GIT_URL: mso7nueh/Fastlane \ No newline at end of file From 84c8cb0fc17db84d107fbaf512e6575b144610b5 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 11:11:41 +0000 Subject: [PATCH 16/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20ios/fastlane/Fastfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index d8476fb0..b860fcc0 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -18,7 +18,7 @@ default_platform(:ios) platform :ios do desc "Push a new beta build to TestFlight" lane :beta do - match(type: "appstore", readonly: true, git_branch: "master", clone_branch_directly: true) + match(type: "appstore", readonly: true) increment_build_number(xcodeproj: "Runner.xcodeproj") build_app(workspace: "Runner.xcworkspace", scheme: "Runner", export_method: "app-store") upload_to_testflight From 5e89c5e9c675b4ec8d5851462b51b69cc61efaf4 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 11:13:07 +0000 Subject: [PATCH 17/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index 4e5983c7..8a58bf8f 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -24,4 +24,4 @@ jobs: LANG: en_US.UTF-8 LC_ALL: en_US.UTF-8 MATCH_PASSWORD: EeChahboo9Ei - MATCH_GIT_URL: mso7nueh/Fastlane \ No newline at end of file + MATCH_GIT_URL: http://gitea.office.local:3000/mso7nueh/Fastlane.git \ No newline at end of file From 5fa1ca6bf2d9a25dcf349de5b332fde1fc54babd Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 11:14:45 +0000 Subject: [PATCH 18/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20ios/fastlane/Fastfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index b860fcc0..4c53abd3 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -18,7 +18,7 @@ default_platform(:ios) platform :ios do desc "Push a new beta build to TestFlight" lane :beta do - match(type: "appstore", readonly: true) + match(type: "appstore") increment_build_number(xcodeproj: "Runner.xcodeproj") build_app(workspace: "Runner.xcworkspace", scheme: "Runner", export_method: "app-store") upload_to_testflight From 23fe075bfdda637d3976fa11663aed5fe51fb818 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 11:18:32 +0000 Subject: [PATCH 19/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index 8a58bf8f..813ec37c 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -24,4 +24,6 @@ jobs: LANG: en_US.UTF-8 LC_ALL: en_US.UTF-8 MATCH_PASSWORD: EeChahboo9Ei - MATCH_GIT_URL: http://gitea.office.local:3000/mso7nueh/Fastlane.git \ No newline at end of file + MATCH_GIT_URL: http://gitea.office.local:3000/mso7nueh/Fastlane.git + FASTLANE_USER: eatvio2023@icloud.com + FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: iqsm-pfxm-bpmg-nkry \ No newline at end of file From 0c68482f21f1d89cbefeda015d4f54a6c4d5d2c5 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 11:21:13 +0000 Subject: [PATCH 20/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20ios/fastlane/Fastfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 4c53abd3..b860fcc0 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -18,7 +18,7 @@ default_platform(:ios) platform :ios do desc "Push a new beta build to TestFlight" lane :beta do - match(type: "appstore") + match(type: "appstore", readonly: true) increment_build_number(xcodeproj: "Runner.xcodeproj") build_app(workspace: "Runner.xcworkspace", scheme: "Runner", export_method: "app-store") upload_to_testflight From 76f73a77c3dadd69370bc9f080b1b5123568bce7 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 11:23:43 +0000 Subject: [PATCH 21/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20ios/fastlane/Fastfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index b860fcc0..4c53abd3 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -18,7 +18,7 @@ default_platform(:ios) platform :ios do desc "Push a new beta build to TestFlight" lane :beta do - match(type: "appstore", readonly: true) + match(type: "appstore") increment_build_number(xcodeproj: "Runner.xcodeproj") build_app(workspace: "Runner.xcworkspace", scheme: "Runner", export_method: "app-store") upload_to_testflight From d92f511aa510a8bbeae0e84f88df1ab2bf2a1206 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 11:25:16 +0000 Subject: [PATCH 22/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index 813ec37c..ce0136f7 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -26,4 +26,5 @@ jobs: MATCH_PASSWORD: EeChahboo9Ei MATCH_GIT_URL: http://gitea.office.local:3000/mso7nueh/Fastlane.git FASTLANE_USER: eatvio2023@icloud.com + FASTLANE_PASSWORD: EeChahboo9Ei FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: iqsm-pfxm-bpmg-nkry \ No newline at end of file From b1884e7863ed12e2dbcfa8b3b46d8a946ea64801 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 12 May 2025 11:41:09 +0000 Subject: [PATCH 23/23] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.gitea/workflows/test-flight-cd.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-flight-cd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index ce0136f7..5d7e74ae 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -24,7 +24,7 @@ jobs: LANG: en_US.UTF-8 LC_ALL: en_US.UTF-8 MATCH_PASSWORD: EeChahboo9Ei - MATCH_GIT_URL: http://gitea.office.local:3000/mso7nueh/Fastlane.git + MATCH_GIT_URL: http://gitea.office.local:3000/mso7nueh/fastlane FASTLANE_USER: eatvio2023@icloud.com FASTLANE_PASSWORD: EeChahboo9Ei FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: iqsm-pfxm-bpmg-nkry \ No newline at end of file