From 48509233051f735e8f7049bf2c91d75556af7039 Mon Sep 17 00:00:00 2001 From: Armand <4831c0@proton.me> Date: Mon, 2 Mar 2026 20:56:11 +0100 Subject: [PATCH] firka: add grade/:subjectId settings modal --- firka/lib/l10n | 2 +- .../ui/components/common_bottom_sheets.dart | 107 +++++++++--------- .../phone/pages/home/home_grades_subject.dart | 11 +- 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/firka/lib/l10n b/firka/lib/l10n index 72b25743..d85741b4 160000 --- a/firka/lib/l10n +++ b/firka/lib/l10n @@ -1 +1 @@ -Subproject commit 72b257433b67e8b5a69eda118c31184eab047d7e +Subproject commit d85741b4dacc9409a5ba016750a91f2e18c5fbd8 diff --git a/firka/lib/ui/components/common_bottom_sheets.dart b/firka/lib/ui/components/common_bottom_sheets.dart index 73eebaa6..8a43e443 100644 --- a/firka/lib/ui/components/common_bottom_sheets.dart +++ b/firka/lib/ui/components/common_bottom_sheets.dart @@ -997,73 +997,74 @@ Future showSubjectBottomSheetSettings( builder: (BuildContext context) { return Stack( children: [ + Positioned.fill( + child: GestureDetector( + onTap: () => Navigator.pop(context), + behavior: HitTestBehavior.opaque, + child: Container(color: Colors.transparent), + ), + ), Align( alignment: Alignment.bottomCenter, child: Container( decoration: BoxDecoration( color: appStyle.colors.background, - borderRadius: BorderRadius.vertical(top: Radius.circular(16)), + borderRadius: BorderRadius.vertical(top: Radius.circular(24)), ), child: Padding( - padding: const EdgeInsets.all(16) + EdgeInsets.only(bottom: 32), + padding: const EdgeInsets.fromLTRB(20, 40, 20, 32), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - Padding( - padding: const EdgeInsets.only(left: 6), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Text( - subject.name, - style: appStyle.fonts.H_18px.apply( - color: appStyle.colors.textPrimary, - ), - ), - ], - ), - ], + Center( + child: Container( + width: 40, + height: 4, + decoration: BoxDecoration( + color: appStyle.colors.a15p, + borderRadius: BorderRadius.circular(2), + ), ), ), - SizedBox(height: 8), - GestureDetector( - child: FirkaCard( - left: [ - SizedBox( - height: 30, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - children: [ - FirkaIconWidget( - FirkaIconType.majesticons, - Majesticon.editPen4Solid, - size: 24.0, - color: appStyle.colors.accent, - ), - SizedBox(width: 8), - Text( - "Tantárgy átnevezése", - style: appStyle.fonts.B_16R.apply( - color: appStyle.colors.textPrimary, - ), - ), - ], - ), - ], - ), - ), - ], + SizedBox(height: 20), + Text( + data.l10n.subject, + style: appStyle.fonts.H_H2.apply( + color: appStyle.colors.textPrimary, + ), + ), + SizedBox(height: 20), + GestureDetector( + onTap: () => Navigator.pop(context), + child: Container( + height: 56, + padding: const EdgeInsets.symmetric( + horizontal: 16, + vertical: 12, + ), + decoration: BoxDecoration( + color: appStyle.colors.card, + borderRadius: BorderRadius.circular(16), + ), + child: Row( + children: [ + FirkaIconWidget( + FirkaIconType.majesticons, + Majesticon.calculatorSolid, + size: 24, + color: appStyle.colors.accent, + ), + SizedBox(width: 12), + Text( + data.l10n.grade_calculator, + style: appStyle.fonts.B_16SB.apply( + color: appStyle.colors.textPrimary, + ), + ), + ], + ), ), - onTap: () { - logger.finest("Tantárgy átnevezése"); - // Navigator.pop(context); - }, ), ], ), diff --git a/firka/lib/ui/phone/pages/home/home_grades_subject.dart b/firka/lib/ui/phone/pages/home/home_grades_subject.dart index 78feef77..7d92b19e 100644 --- a/firka/lib/ui/phone/pages/home/home_grades_subject.dart +++ b/firka/lib/ui/phone/pages/home/home_grades_subject.dart @@ -185,12 +185,11 @@ class _HomeGradesSubjectScreen extends FirkaState { ), ), onTap: () { - // Navigator.push(context, Settings) - // showSubjectBottomSheetSettings( - // context, - // widget.data, - // aGrade.subject, - // ); + showSubjectBottomSheetSettings( + context, + widget.data, + aGrade.subject, + ); }, ), ],