Skip to content

Commit

Permalink
[timetable] [patch] recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed Sep 1, 2024
1 parent 766fd56 commit 8a860da
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions assets/l10n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -986,3 +986,4 @@ add: Add
rename: Rename
enter: Enter
comingSoon: COMING SOON
recommendation: Recommendation
1 change: 1 addition & 0 deletions assets/l10n/zh-Hans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -983,3 +983,4 @@ add: 添加
rename: 重命名
enter: 进入
comingSoon: 敬请期待
recommendation: 推荐
1 change: 1 addition & 0 deletions assets/l10n/zh-Hant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -968,3 +968,4 @@ add: 增加
rename: 重新命名
enter: 進入
comingSoon: 即將推出
recommendation: 推薦
2 changes: 2 additions & 0 deletions lib/l10n/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ mixin class CommonI18nMixin {
String get comingSoon => "comingSoon".tr();

String get create => "create".tr();

String get recommendation => "recommendation".tr();
}

class CommonI18n with CommonI18nMixin {
Expand Down
8 changes: 4 additions & 4 deletions lib/timetable/patch/page/patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class TimetablePatchEntryRecommendationCard extends StatelessWidget {
Card.outlined(
child: [
ListTile(
title: "Recommendation".text(),
title: i18n.recommendation.text(style: const TextStyle(fontWeight: FontWeight.bold)),
trailing: onClose == null
? null
: PlatformIconButton(
Expand All @@ -364,12 +364,12 @@ class TimetablePatchEntryRecommendationCard extends StatelessWidget {
),
),
if (patch is TimetablePatch)
buildPatch(context, patch as TimetablePatch)
buildPatch(context, patch as TimetablePatch).padH(8)
else if (patch is TimetablePatchSet)
buildPatchSet(context, patch as TimetablePatchSet),
buildPatchSet(context, patch as TimetablePatchSet).padH(8),
FilledButton.tonalIcon(
icon: Icon(context.icons.add),
label: "Add this".text(),
label: i18n.add.text(),
onPressed: onAdded,
).padAll(8),
].column(caa: CrossAxisAlignment.end),
Expand Down

0 comments on commit 8a860da

Please sign in to comment.