diff --git a/images/explain_rest_duration.svg b/images/explain_rest_duration.svg deleted file mode 100644 index 75fc242471..0000000000 --- a/images/explain_rest_duration.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/explain_rest_duration_date.svg b/images/explain_rest_duration_date.svg new file mode 100644 index 0000000000..edc31f0345 --- /dev/null +++ b/images/explain_rest_duration_date.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/explain_rest_duration_number.svg b/images/explain_rest_duration_number.svg new file mode 100644 index 0000000000..e0d6c99bed --- /dev/null +++ b/images/explain_rest_duration_number.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/features/calendar/components/pill_sheet_modified_history/components/rows/pill_sheet_modified_history_began_rest_duration.dart b/lib/features/calendar/components/pill_sheet_modified_history/components/rows/pill_sheet_modified_history_began_rest_duration.dart index 70496e56fc..db8b4c3867 100644 --- a/lib/features/calendar/components/pill_sheet_modified_history/components/rows/pill_sheet_modified_history_began_rest_duration.dart +++ b/lib/features/calendar/components/pill_sheet_modified_history/components/rows/pill_sheet_modified_history_began_rest_duration.dart @@ -24,11 +24,9 @@ class PillSheetModifiedHistoryBeganRestDuration extends StatelessWidget { } return RowLayout( day: Day(estimatedEventCausingDate: estimatedEventCausingDate), - effectiveNumbersOrHyphen: EffectivePillNumber( - effectivePillNumber: - PillSheetModifiedHistoryDateEffectivePillNumber.hyphen()), + effectiveNumbersOrHyphen: EffectivePillNumber(effectivePillNumber: PillSheetModifiedHistoryDateEffectivePillNumber.hyphen()), detail: const Text( - "休薬開始", + "服用お休み", style: TextStyle( color: TextColor.main, fontSize: 12, diff --git a/lib/features/calendar/components/pill_sheet_modified_history/components/rows/pill_sheet_modified_history_ended_rest_duration.dart b/lib/features/calendar/components/pill_sheet_modified_history/components/rows/pill_sheet_modified_history_ended_rest_duration.dart index fc18782406..9eed8ddc0e 100644 --- a/lib/features/calendar/components/pill_sheet_modified_history/components/rows/pill_sheet_modified_history_ended_rest_duration.dart +++ b/lib/features/calendar/components/pill_sheet_modified_history/components/rows/pill_sheet_modified_history_ended_rest_duration.dart @@ -24,11 +24,9 @@ class PillSheetModifiedHistoryEndedRestDuration extends StatelessWidget { } return RowLayout( day: Day(estimatedEventCausingDate: estimatedEventCausingDate), - effectiveNumbersOrHyphen: EffectivePillNumber( - effectivePillNumber: - PillSheetModifiedHistoryDateEffectivePillNumber.hyphen()), + effectiveNumbersOrHyphen: EffectivePillNumber(effectivePillNumber: PillSheetModifiedHistoryDateEffectivePillNumber.hyphen()), detail: const Text( - "休薬終了", + "服用再開", style: TextStyle( color: TextColor.main, fontSize: 12, diff --git a/lib/features/record/components/announcement_bar/components/rest_duration.dart b/lib/features/record/components/announcement_bar/components/rest_duration.dart index 8c8f4e9d6d..939a43008a 100644 --- a/lib/features/record/components/announcement_bar/components/rest_duration.dart +++ b/lib/features/record/components/announcement_bar/components/rest_duration.dart @@ -42,7 +42,7 @@ class RestDurationAnnouncementBar extends StatelessWidget { final restDuration = activedPillSheet.activeRestDuration; if (restDuration != null) { final day = daysBetween(restDuration.beginDate.date(), today()) + 1; - return "休薬$day日目"; + return "🌙 服用お休み $day日目"; } if (activedPillSheet.typeInfo.dosingPeriod < activedPillSheet.todayPillNumber) { diff --git a/lib/features/record/components/button/rest_duration_button.dart b/lib/features/record/components/button/rest_duration_button.dart index 6b6786d1b3..4b58645fd0 100644 --- a/lib/features/record/components/button/rest_duration_button.dart +++ b/lib/features/record/components/button/rest_duration_button.dart @@ -15,7 +15,7 @@ class RestDurationButton extends StatelessWidget { style: TextButton.styleFrom(backgroundColor: PilllColors.disable), onPressed: null, child: const Text( - "休薬中", + "服用お休み中", style: TextStyle( color: TextColor.lightGray, fontFamily: FontFamily.japanese, diff --git a/lib/features/record/components/pill_sheet/components/record_page_rest_duration_dialog.dart b/lib/features/record/components/pill_sheet/components/record_page_rest_duration_dialog.dart index a49b73004c..2ab0d73e8f 100644 --- a/lib/features/record/components/pill_sheet/components/record_page_rest_duration_dialog.dart +++ b/lib/features/record/components/pill_sheet/components/record_page_rest_duration_dialog.dart @@ -10,11 +10,13 @@ import 'package:pilll/utils/formatter/date_time_formatter.dart'; class RecordPageRestDurationDialog extends StatelessWidget { final RecordPageRestDurationDialogTitle title; + final PillSheetAppearanceMode appearanceMode; final VoidCallback onDone; const RecordPageRestDurationDialog({ Key? key, required this.title, + required this.appearanceMode, required this.onDone, }) : super(key: key); @@ -29,44 +31,33 @@ class RecordPageRestDurationDialog extends StatelessWidget { children: [ title, const SizedBox(height: 24), - const Text("休薬するとピル番号は進みません", + const Text("服用をお休みするとピル番号は進みません", style: TextStyle( fontFamily: FontFamily.japanese, - fontWeight: FontWeight.w300, + fontWeight: FontWeight.w500, fontSize: 14, color: TextColor.main, )), const SizedBox(height: 24), - SvgPicture.asset("images/explain_rest_duration.svg"), - const SizedBox(height: 24), - const Text( - "※休薬開始日を変えたい場合", - style: TextStyle( + Text( + appearanceMode == PillSheetAppearanceMode.date ? "例えば「1/12から3日間」服用お休みした場合" : "例えば「18番から3日間」服用お休みした場合", + style: const TextStyle( color: TextColor.main, - fontSize: 14, - fontFamily: FontFamily.japanese, fontWeight: FontWeight.w700, - ), - textAlign: TextAlign.left, - ), - const SizedBox(height: 8), - const Text( - "希望日まで未服用にする必要があります。服用済みのピルマークをタップすることで未服用にできます", - style: TextStyle( - color: TextColor.main, fontFamily: FontFamily.japanese, - fontSize: 14, - fontWeight: FontWeight.w400, + fontSize: 12, ), - textAlign: TextAlign.left, ), + const SizedBox(height: 8), + SvgPicture.asset( + appearanceMode == PillSheetAppearanceMode.date ? "images/explain_rest_duration_date.svg" : "images/explain_rest_duration_number.svg"), const SizedBox(height: 24), ], ), actions: [ AppOutlinedButton( onPressed: () async => onDone(), - text: "休薬する", + text: "服用をお休みする", ), Center( child: AlertButton( @@ -92,6 +83,7 @@ showRecordPageRestDurationDialog( context: context, builder: (context) => RecordPageRestDurationDialog( title: RecordPageRestDurationDialogTitle(appearanceMode: appearanceMode, activedPillSheet: activedPillSheet, pillSheetGroup: pillSheetGroup), + appearanceMode: appearanceMode, onDone: onDone, ), ); @@ -111,11 +103,11 @@ class RecordPageRestDurationDialogTitle extends StatelessWidget { @override Widget build(BuildContext context) { - return Text("$_numberから休薬しますか?", + return Text("$_numberから服用をお休みしますか?", style: const TextStyle( color: TextColor.main, fontSize: 16, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w700, fontFamily: FontFamily.japanese, )); } diff --git a/lib/features/record/components/supports/components/rest_duration/begin_manual_rest_duration_button.dart b/lib/features/record/components/supports/components/rest_duration/begin_manual_rest_duration_button.dart index cdb5bbedae..abc765409f 100644 --- a/lib/features/record/components/supports/components/rest_duration/begin_manual_rest_duration_button.dart +++ b/lib/features/record/components/supports/components/rest_duration/begin_manual_rest_duration_button.dart @@ -28,35 +28,32 @@ class BeginManualRestDurationButton extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final beginRestDuration = ref.watch(beginRestDurationProvider); - return SizedBox( - width: 80, - child: SmallAppOutlinedButton( - text: "休薬する", - onPressed: () async { - analytics.logEvent(name: "begin_manual_rest_duration_pressed", parameters: {"pill_sheet_id": activedPillSheet.id}); + return SmallAppOutlinedButton( + text: "服用お休み", + onPressed: () async { + analytics.logEvent(name: "begin_manual_rest_duration_pressed", parameters: {"pill_sheet_id": activedPillSheet.id}); - if (activedPillSheet.todayPillIsAlreadyTaken) { - showInvalidAlreadyTakenPillDialog(context); - } else { - showRecordPageRestDurationDialog( - context, - appearanceMode: appearanceMode, - pillSheetGroup: pillSheetGroup, - activedPillSheet: activedPillSheet, - onDone: () async { - analytics.logEvent(name: "done_rest_duration"); - // NOTE: batch.commit でリモートのDBに書き込む時間がかかるので事前にバッジを0にする - FlutterAppBadger.removeBadge(); - await beginRestDuration( - activePillSheet: activedPillSheet, - pillSheetGroup: pillSheetGroup, - ); - didBeginRestDuration(); - }, - ); - } - }, - ), + if (activedPillSheet.todayPillIsAlreadyTaken) { + showInvalidAlreadyTakenPillDialog(context); + } else { + showRecordPageRestDurationDialog( + context, + appearanceMode: appearanceMode, + pillSheetGroup: pillSheetGroup, + activedPillSheet: activedPillSheet, + onDone: () async { + analytics.logEvent(name: "done_rest_duration"); + // NOTE: batch.commit でリモートのDBに書き込む時間がかかるので事前にバッジを0にする + FlutterAppBadger.removeBadge(); + await beginRestDuration( + activePillSheet: activedPillSheet, + pillSheetGroup: pillSheetGroup, + ); + didBeginRestDuration(); + }, + ); + } + }, ); } } diff --git a/lib/features/record/components/supports/components/rest_duration/end_manual_rest_duration_button.dart b/lib/features/record/components/supports/components/rest_duration/end_manual_rest_duration_button.dart index 6da2368dd1..bc4f57e8c9 100644 --- a/lib/features/record/components/supports/components/rest_duration/end_manual_rest_duration_button.dart +++ b/lib/features/record/components/supports/components/rest_duration/end_manual_rest_duration_button.dart @@ -28,24 +28,21 @@ class EndManualRestDurationButton extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final endRestDuration = ref.watch(endRestDurationProvider); - return SizedBox( - width: 80, - child: SmallAppOutlinedButton( - text: "休薬終了", - onPressed: () async { - analytics.logEvent( - name: "end_manual_rest_duration_pressed", - ); + return SmallAppOutlinedButton( + text: "服用再開", + onPressed: () async { + analytics.logEvent( + name: "end_manual_rest_duration_pressed", + ); - await endRestDuration( - restDuration: restDuration, - activePillSheet: activedPillSheet, - pillSheetGroup: pillSheetGroup, - ); + await endRestDuration( + restDuration: restDuration, + activePillSheet: activedPillSheet, + pillSheetGroup: pillSheetGroup, + ); - didEndRestDuration(); - }, - ), + didEndRestDuration(); + }, ); } } @@ -80,7 +77,7 @@ class EndRestDurationModal extends HookConsumerWidget { borderRadius: BorderRadius.circular(50), ), child: const Text( - "休薬期間終了", + "服用お休み期間終了", textAlign: TextAlign.center, style: TextStyle( color: TextColor.white, @@ -114,6 +111,15 @@ class EndRestDurationModal extends HookConsumerWidget { fontWeight: FontWeight.w400, ), ), + const Text( + "お休みした分だけシート上の曜日もずれます", + style: TextStyle( + color: TextColor.main, + fontSize: 14, + fontFamily: FontFamily.japanese, + fontWeight: FontWeight.w400, + ), + ), ], ), const SizedBox(height: 24), diff --git a/lib/features/record/components/supports/components/rest_duration/invalid_already_taken_pill_dialog.dart b/lib/features/record/components/supports/components/rest_duration/invalid_already_taken_pill_dialog.dart index e4302ed48d..8b2c46c831 100644 --- a/lib/features/record/components/supports/components/rest_duration/invalid_already_taken_pill_dialog.dart +++ b/lib/features/record/components/supports/components/rest_duration/invalid_already_taken_pill_dialog.dart @@ -22,10 +22,10 @@ class InvalidAlreadyTakenPillDialog extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ const Text( - "今日飲むピルが服用済みの場合\n休薬できません", + "今日飲むピルが服用済みの場合\n「服用お休み」できません", style: TextStyle( fontFamily: FontFamily.japanese, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w700, fontSize: 16, color: TextColor.main, ), @@ -45,13 +45,13 @@ class InvalidAlreadyTakenPillDialog extends StatelessWidget { text: "今日飲むピルを未服用にしてから", style: TextStyle( fontFamily: FontFamily.japanese, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w700, fontSize: 14, color: TextColor.main, ), ), TextSpan( - text: "休薬してください。今日以外の日から休薬したい場合は下記を参考にしてください。", + text: "お休みしてください。今日以外の日から服用お休みしたい場合は下記を参考にしてください。", style: TextStyle( fontFamily: FontFamily.japanese, fontWeight: FontWeight.w300, @@ -70,7 +70,7 @@ class InvalidAlreadyTakenPillDialog extends StatelessWidget { analytics.logEvent(name: "invalid_already_taken_pill_faq"); launchUrl(Uri.parse("https://pilll.wraptas.site/467128e667ae4d6cbff4d61ee370cce5")); }, - text: "休薬機能の使い方を見る", + text: "服用お休み機能の使い方を見る", ), Center( child: AlertButton( diff --git a/lib/features/record/components/supports/record_page_pill_sheet_support_actions.dart b/lib/features/record/components/supports/record_page_pill_sheet_support_actions.dart index 08f2f8006a..a910bb0b0e 100644 --- a/lib/features/record/components/supports/record_page_pill_sheet_support_actions.dart +++ b/lib/features/record/components/supports/record_page_pill_sheet_support_actions.dart @@ -59,7 +59,7 @@ class RecordPagePillSheetSupportActions extends StatelessWidget { duration: Duration( seconds: 2, ), - content: Text("休薬期間が終了しました"), + content: Text("服用のお休み期間が終了しました"), ), ); } @@ -76,7 +76,7 @@ class RecordPagePillSheetSupportActions extends StatelessWidget { duration: Duration( seconds: 2, ), - content: Text("休薬期間が始まりました"), + content: Text("服用お休みを開始しました"), ), ); Navigator.of(context).pop();