diff --git a/i18n/en.json b/i18n/en.json index 4ce1721..154f96f 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -474,7 +474,7 @@ "The app functionalitity will be restricted, but please take a tour!":"The app functionalitity will be restricted, but please take a tour!", "Activating the basic tutorial":"Activating the basic tutorial", - "Basic Tutorial":"Basic Tutorial", + "Basic Tutorial":"Tutorial", "Activate":"Activate", "Try free for 3 days!":"Try it without risk for 3 days! In this period you can cancel any time without lasting your account.", diff --git a/i18n/hu.json b/i18n/hu.json index 409279b..eb80064 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -466,8 +466,8 @@ "The app functionalitity will be restricted, but please take a tour!":"Az applikációt korlátozottan tudod így használni, de tégy egy túrát!", "Activating the basic tutorial":"Bemutató aktiválása", - "Basic Tutorial":"Alap bemutató", - "Activate":"Aktivál", + "Basic Tutorial":"Tutorial", + "Activate":"Aktiválás", "Try free for 3 days!":"Próbáld ki kockázat nélkül 3 napig! Ebben az időszakban bármikor lemondhatod, anélkül, hogy megterhelnénk a számládat.", "View other alternatives":"Megnézek egy másik lehetőséget" diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index bb311a3..b811635 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -388,7 +388,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -531,7 +531,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -566,7 +566,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/bloc/tutorial/tutorial_bloc.dart b/lib/bloc/tutorial/tutorial_bloc.dart index 9d5ec66..8724309 100644 --- a/lib/bloc/tutorial/tutorial_bloc.dart +++ b/lib/bloc/tutorial/tutorial_bloc.dart @@ -12,7 +12,7 @@ part 'tutorial_state.dart'; class TutorialBloc extends Bloc with Logging { late String tutorialName; - final double mediaHeightBase = 390; + final double mediaHeightBase = 675; bool isActive = false; bool canActivate = false; @@ -78,8 +78,6 @@ class TutorialBloc extends Bloc with Logging { this.showCheckText = action!.showCheckText == true; this.parent = action!.parent; } - - calculateHeight(); } } @@ -110,17 +108,6 @@ class TutorialBloc extends Bloc with Logging { return true; } - void calculateHeight() { - int count = getElementCount('

'); - count += getElementCount('
'); - double lines = (actualText!.length / 32 + count); - if (lines < 5) { - lines = lines + 2; - } - calculatedHeight = lines * 15; - print("Calculated Height: $calculatedHeight length: ${actualText!.length} lines: $lines count: $count"); - } - int getElementCount(String elem) { int pos = 0; int count = 0; @@ -180,7 +167,6 @@ class TutorialBloc extends Bloc with Logging { print("Step: $step"); setNextStepData(step); - print("Menu rebuild $menuBloc"); if (menuBloc != null) { menuBloc!.add(MenuCreate()); } @@ -200,7 +186,6 @@ class TutorialBloc extends Bloc with Logging { isActive = false; canActivate = false; ActivityDone? activityDone = ActivityDone.tutorialBasic.searchByString(tutorialName); - print("activity Finished: $activityDone"); if (activityDone != null) { await Cache().setActivityDonePrefs(activityDone); } diff --git a/lib/main.dart b/lib/main.dart index 0230544..a999888 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -192,10 +192,9 @@ Future initFlurry() async { Smartlook.enableCrashlytics(true); Smartlook.setEventTrackingMode(EventTrackingMode.FULL_TRACKING); */ - FlutterUxcam.optIntoSchematicRecordings(); -// FlutterUxcam.optIntoVideoRecording(); - FlutterUxcam.startWithKey("wvdstyoml4tiwfd"); } + FlutterUxcam.startWithKey("wvdstyoml4tiwfd"); + FlutterUxcam.optIntoSchematicRecordings(); } class WorkoutTestApp extends StatelessWidget { diff --git a/lib/view/exercise_log_page.dart b/lib/view/exercise_log_page.dart index dae5e7b..1f36bf1 100644 --- a/lib/view/exercise_log_page.dart +++ b/lib/view/exercise_log_page.dart @@ -216,25 +216,27 @@ class _ExerciseLogPage extends State with Trans, Common { } void evaluation(ExerciseRepository exerciseRepository, Exercise exercise) { - if (!Cache().hasPurchased) { - showDialog( - context: context, - builder: (BuildContext context) { - return DialogPremium( - unlocked: Cache().hasPurchased, - unlockRound: 1, - unlockedText: t("Enjoy also this premium fetaure to show all old evaluation data of your successful exercises."), - function: "My Exercise Logs", - onTap: () => {Navigator.of(context).pop()}, - onCancel: () => {Navigator.of(context).pop()}, - ); - }); - } else { - LinkedHashMap args = LinkedHashMap(); - args['exerciseRepository'] = exerciseRepository; - args['exercise'] = exercise; - args['past'] = true; - Navigator.of(context).pushNamed('evaluationPage', arguments: args); + if (Cache().userLoggedIn != null) { + if (!Cache().hasPurchased) { + showDialog( + context: context, + builder: (BuildContext context) { + return DialogPremium( + unlocked: Cache().hasPurchased, + unlockRound: 1, + unlockedText: t("Enjoy also this premium fetaure to show all old evaluation data of your successful exercises."), + function: "My Exercise Logs", + onTap: () => {Navigator.of(context).pop()}, + onCancel: () => {Navigator.of(context).pop()}, + ); + }); + } else { + LinkedHashMap args = LinkedHashMap(); + args['exerciseRepository'] = exerciseRepository; + args['exercise'] = exercise; + args['past'] = true; + Navigator.of(context).pushNamed('evaluationPage', arguments: args); + } } } diff --git a/lib/view/mydevelopment_muscle_page.dart b/lib/view/mydevelopment_muscle_page.dart index 7c39b43..91b9eb0 100644 --- a/lib/view/mydevelopment_muscle_page.dart +++ b/lib/view/mydevelopment_muscle_page.dart @@ -30,7 +30,7 @@ class _MyDevelopmentMuscleState extends State with Comm @override void initState() { super.initState(); - if (!Cache().hasPurchased) { + if (!Cache().hasPurchased && Cache().userLoggedIn != null) { Timer( Duration(milliseconds: 2000), () => { diff --git a/lib/view/myexcercise_plan_page.dart b/lib/view/myexcercise_plan_page.dart index 949ad08..9a7c458 100644 --- a/lib/view/myexcercise_plan_page.dart +++ b/lib/view/myexcercise_plan_page.dart @@ -99,19 +99,22 @@ class _MyExercisePlanPage extends State with Trans, Logging image: "asset/image/exercise_plan_suggested.jpg", left: 2, onTap: () => { - Track().track(TrackingEvent.my_suggested_plan), - showDialog( - context: context, - builder: (BuildContext context) { - return DialogPremium( - unlocked: Cache().hasPurchased, - unlockRound: 2, - function: "Suggested Training Plan", - unlockedText: null, - onTap: () => {Navigator.of(context).pop()}, - onCancel: () => {Navigator.of(context).pop()}, - ); - }) + if (Cache().userLoggedIn != null) + { + Track().track(TrackingEvent.my_suggested_plan), + showDialog( + context: context, + builder: (BuildContext context) { + return DialogPremium( + unlocked: Cache().hasPurchased, + unlockRound: 2, + function: "Suggested Training Plan", + unlockedText: null, + onTap: () => {Navigator.of(context).pop()}, + onCancel: () => {Navigator.of(context).pop()}, + ); + }) + } }, isLocked: true, ), @@ -128,51 +131,25 @@ class _MyExercisePlanPage extends State with Trans, Logging image: "asset/image/exercise_plan_stars.jpg", left: 5, onTap: () => { - Track().track(TrackingEvent.my_special_plan), - showDialog( - context: context, - builder: (BuildContext context) { - return DialogPremium( - unlocked: Cache().hasPurchased, - unlockRound: 1, - function: "Training Programs", - unlockedText: null, - onTap: () => {Navigator.of(context).pop()}, - onCancel: () => {Navigator.of(context).pop()}, - ); - }) + if (Cache().userLoggedIn != null) + { + Track().track(TrackingEvent.my_special_plan), + showDialog( + context: context, + builder: (BuildContext context) { + return DialogPremium( + unlocked: Cache().hasPurchased, + unlockRound: 1, + function: "Training Programs", + unlockedText: null, + onTap: () => {Navigator.of(context).pop()}, + onCancel: () => {Navigator.of(context).pop()}, + ); + }) + } }, isLocked: true, ), - /* ImageButton( - width: imageWidth, - textAlignment: Alignment.topLeft, - text: t("Star's Exercise Plan"), - style: GoogleFonts.robotoMono( - textStyle: TextStyle( - fontSize: 14, - color: Colors.white, - fontWeight: FontWeight.bold, - backgroundColor: Colors.black54.withOpacity(0.4))), - image: "asset/image/exercise_plan_stars.jpg", - left: 5, - onTap: () => { - - showDialog( - context: context, - builder: (BuildContext context) { - return DialogPremium( - unlocked: false, - unlockRound: 2, - function: "Star's Exercise Plan", - unlockedText: "", - onTap: () => {Navigator.of(context).pop()}, - onCancel: () => {Navigator.of(context).pop()}, - ); - }) - }, - isLocked: true, - ), */ hiddenPlanWidget(exerciseRepository), hiddenTrainingWidget(), ]), diff --git a/lib/widgets/tutorial_widget.dart b/lib/widgets/tutorial_widget.dart index e2266ef..d04f31f 100644 --- a/lib/widgets/tutorial_widget.dart +++ b/lib/widgets/tutorial_widget.dart @@ -24,43 +24,42 @@ class TutorialWidget with Trans, Logging { void tip(BuildContext context) { setContext(context); + if (tooltip != null && tooltip!.isOpen) { + tooltip!.rebuild(); + } var renderBox = context.findRenderObject() as RenderBox; final overlay = Overlay.of(context)!.context.findRenderObject() as RenderBox?; var targetGlobalCenter = renderBox.localToGlobal(renderBox.size.center(Offset.zero), ancestor: overlay); final TutorialBloc bloc = BlocProvider.of(context); - - if (tooltip != null && tooltip!.isOpen) { - tooltip!.rebuild(); - } + final double mediaSize = MediaQuery.of(context).size.width; + final double mediaHeight = MediaQuery.of(context).size.height; Rect? area; if (bloc.action != null) { area = bloc.action!.showBubble == true - ? Rect.fromLTWH(targetGlobalCenter.dx - bloc.action!.bubbleX, targetGlobalCenter.dy - bloc.action!.bubbleY, - bloc.action!.bubbleWidth.toDouble(), bloc.action!.bubbleHeight.toDouble()) + ? Rect.fromLTWH(mediaSize / 2 - 220, targetGlobalCenter.dy - bloc.action!.bubbleY, bloc.action!.bubbleWidth.toDouble(), + bloc.action!.bubbleHeight.toDouble()) //? Rect.fromLTWH(targetGlobalCenter.dx - 60, targetGlobalCenter.dy + 120, 420, 320) : null; } - final double mediaSize = MediaQuery.of(context).size.width; - final double mediaHeight = MediaQuery.of(context).size.width; final double distortion = mediaHeight / bloc.mediaHeightBase; double fontSize = 14; - if (mediaSize > 400) { - fontSize = 15; - } else if (mediaSize < 375) { + if (mediaSize > 800) { + fontSize = 16; + } else if (mediaSize < 600) { fontSize = 13; } - double calculatedTop = bloc.top! / distortion; - //-((1 - distortion) * 100 * (fontSize)); + double calculatedTop = bloc.top != null ? bloc.top! : 20.0; if (calculatedTop < 0) { calculatedTop = 10; } - print("Height: $mediaHeight, distortion: $distortion top: ${bloc.top!} calculated $calculatedTop"); + print("Height: $mediaHeight, width: $mediaSize distortion: $distortion top: ${bloc.top!} calculated $calculatedTop"); + print("targetCenter X ${targetGlobalCenter.dx}"); tooltip = SuperTooltip( top: calculatedTop, diff --git a/pubspec.yaml b/pubspec.yaml index 8f311e8..c385f10 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.1.14+68 +version: 1.1.14+71 environment: sdk: ">=2.12.0 <3.0.0"