Skip to content

Commit

Permalink
fix: style consistency for the close button, update style, and add tr…
Browse files Browse the repository at this point in the history
…anslation
  • Loading branch information
ibrahimozkn committed Aug 11, 2024
1 parent 87762b8 commit ed6abf3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import 'package:studyu_designer_v2/features/study/study_page_view.dart';
import 'package:studyu_designer_v2/localization/app_translation.dart';
import 'package:studyu_designer_v2/localization/string_hardcoded.dart';

import '../../../common_views/form_buttons.dart';

class PublishSuccessDialog extends StudyPageWidget {
const PublishSuccessDialog(super.studyId, {super.key});

Expand All @@ -31,52 +33,39 @@ class PublishSuccessDialog extends StudyPageWidget {
),
),
title: tr.study_launch_success_title,
description: tr.study_launch_success_description,
description: state.study.value!.participation == Participation.open
? tr.study_public_launch_success_description
: tr.study_launch_success_description,
),
const SizedBox(height: 8.0),
],
),
actionButtons: state.study.value!.participation == Participation.open
? [
Expanded(
child: Opacity(
opacity: 0.75,
child: TextButton(
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 4.0,
horizontal: 8.0,
),
child: Text(tr.dialog_close),
child: Column(
children: [
DismissButton(
onPressed: () => Navigator.maybePop(context),
),
onPressed: () => Navigator.maybePop(context),
),
],
),
),
]
: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
PrimaryButton(
text: tr.action_button_post_launch_followup,
onPressed: () => Navigator.maybePop(context)
.whenComplete(() => controller.onAddParticipants()),
),
const SizedBox(height: 8.0),
Opacity(
opacity: 0.75,
child: TextButton(
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 4.0,
horizontal: 8.0,
),
child:
Text(tr.action_button_post_launch_followup_skip),
),
onPressed: () => Navigator.maybePop(context),
),
DismissButton(
text: tr.action_button_post_launch_followup_skip,
onPressed: () => Navigator.maybePop(context),
),
],
),
Expand Down
1 change: 1 addition & 0 deletions designer_v2/lib/localization/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@
"study_launch_post_launch_summary": "- Der Entwurfsmodus wird gesperrt und du kannst keine Änderungen mehr an der Studie selbst vornehmen\n- Alle nicht die Studie selbst betreffenden Daten werden zurückgesetzt (einschließlich Testnutzern und Testergebnissen)",
"study_launch_success_title": "Deine Studie ist live!",
"study_launch_success_description": "Lade als nächstes Teilnehmer zur Anmeldung in der StudyU App ein.",
"study_public_launch_success_description": "Deine Studie ist jetzt für alle in der StudyU-App verfügbar.",
"action_button_post_launch_followup": "Teilnehmer einladen",
"action_button_post_launch_followup_skip": "Später vielleicht",
"action_button_study_participation_change": "Teilnahme\nändern",
Expand Down
1 change: 1 addition & 0 deletions designer_v2/lib/localization/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@
"study_launch_post_launch_summary": "- The study design will be locked and you won’t be able to make any changes\n- All data from test runs will be reset (incl. test users, their tasks and results)",
"study_launch_success_title": "Your study is live!",
"study_launch_success_description": "Next, you can start inviting and enrolling your participants in the StudyU App.",
"study_public_launch_success_description": "Your study is now available for everyone in the StudyU App.",
"action_button_post_launch_followup": "Add participants",
"action_button_post_launch_followup_skip": "Skip for now",
"action_button_study_participation_change": "Change\nparticipation",
Expand Down

0 comments on commit ed6abf3

Please sign in to comment.