diff --git a/config.sample.json b/config.sample.json index fdc841f961..2bdd48b43b 100644 --- a/config.sample.json +++ b/config.sample.json @@ -6,5 +6,6 @@ "render_html": true, "hide_redacted_events": false, "hide_unknown_events": false, - "issue_id": "" + "issue_id": "", + "app_grid_dashboard_available": true } diff --git a/configurations/app_dashboard.json b/configurations/app_dashboard.json index 1a642f46b1..d501f1fff5 100644 --- a/configurations/app_dashboard.json +++ b/configurations/app_dashboard.json @@ -1,17 +1,17 @@ { "apps": [ { - "appName": "TMail", + "appName": "Twake Mail", "icon": "ic_twake_mail.svg", "appLink": "http://tmail.linagora.com/" }, { - "appName": "Twake", + "appName": "Twake Chat", "icon": "ic_twake_chat.svg", "appLink": "https://beta.twake.app/" }, { - "appName": "TDrive", + "appName": "Twake Drive", "icon": "ic_twake_drive.svg", "appLink": "https://tdrive.linagora.com/" }, diff --git a/lib/config/app_config.dart b/lib/config/app_config.dart index 83fcff19fc..bb0d6816a9 100644 --- a/lib/config/app_config.dart +++ b/lib/config/app_config.dart @@ -54,7 +54,7 @@ abstract class AppConfig { static bool separateChatTypes = false; static bool autoplayImages = true; static bool experimentalVoip = false; - static bool appGridDashboardAvailable = false; + static bool appGridDashboardAvailable = true; static const bool hideTypingUsernames = false; static const bool hideAllStateEvents = false; static const String inviteLinkPrefix = 'https://matrix.to/#/'; diff --git a/lib/pages/app_grid/app_grid_dashboard_item.dart b/lib/pages/app_grid/app_grid_dashboard_item.dart index 6ba03997c4..c3685abf18 100644 --- a/lib/pages/app_grid/app_grid_dashboard_item.dart +++ b/lib/pages/app_grid/app_grid_dashboard_item.dart @@ -54,7 +54,7 @@ class AppGridDashboardItem extends StatelessWidget { textAlign: TextAlign.center, softWrap: true, overflow: TextOverflow.ellipsis, - style: Theme.of(context).textTheme.titleMedium, + style: Theme.of(context).textTheme.titleSmall, ), ), ], diff --git a/lib/pages/app_grid/app_grid_dashboard_overlay_style.dart b/lib/pages/app_grid/app_grid_dashboard_overlay_style.dart index d0ab131a82..c0088815b2 100644 --- a/lib/pages/app_grid/app_grid_dashboard_overlay_style.dart +++ b/lib/pages/app_grid/app_grid_dashboard_overlay_style.dart @@ -4,11 +4,11 @@ import 'package:flutter/cupertino.dart'; class AppGridDashboardOverlayStyle { static double widthAppGrid(LinagoraApplications linagoraApplications) { if (linagoraApplications.apps.length >= 3) { - return 342; + return 326; } else if (linagoraApplications.apps.length == 2) { - return 244; + return 228; } else if (linagoraApplications.apps.length == 1) { - return 146; + return 130; } else { return 0; } @@ -16,7 +16,7 @@ class AppGridDashboardOverlayStyle { static const double borderRadius = 24; - static const EdgeInsets padding = EdgeInsets.all(24); + static const EdgeInsets padding = EdgeInsets.all(16); static const EdgeInsets margin = EdgeInsets.only(right: 16); } diff --git a/lib/pages/app_grid/app_grid_dashboard_view_style.dart b/lib/pages/app_grid/app_grid_dashboard_view_style.dart index 8a816e443f..add02733e5 100644 --- a/lib/pages/app_grid/app_grid_dashboard_view_style.dart +++ b/lib/pages/app_grid/app_grid_dashboard_view_style.dart @@ -1,17 +1,3 @@ -import 'package:fluffychat/domain/model/app_grid/linagora_applications.dart'; - class AppGridDashboardViewStyle { static const double sizIcAppGrid = 48.0; - - static double widthAppGrid(LinagoraApplications linagoraApplications) { - if (linagoraApplications.apps.length >= 3) { - return 342; - } else if (linagoraApplications.apps.length == 2) { - return 244; - } else if (linagoraApplications.apps.length == 1) { - return 146; - } else { - return 0; - } - } } diff --git a/lib/widgets/layouts/adaptive_layout/adaptive_scaffold_appbar.dart b/lib/widgets/layouts/adaptive_layout/adaptive_scaffold_appbar.dart index 1eed1e497a..317052f76a 100644 --- a/lib/widgets/layouts/adaptive_layout/adaptive_scaffold_appbar.dart +++ b/lib/widgets/layouts/adaptive_layout/adaptive_scaffold_appbar.dart @@ -4,6 +4,7 @@ import 'package:fluffychat/resource/image_paths.dart'; import 'package:fluffychat/utils/platform_infos.dart'; import 'package:fluffychat/utils/responsive/responsive_utils.dart'; import 'package:fluffychat/widgets/layouts/adaptive_layout/adaptive_scaffold_appbar_style.dart'; +import 'package:fluffychat/widgets/layouts/adaptive_layout/adaptive_scaffold_view_style.dart'; import 'package:flutter/material.dart'; import 'package:flutter_adaptive_scaffold/flutter_adaptive_scaffold.dart'; import 'package:flutter_svg/svg.dart'; @@ -21,6 +22,7 @@ class AdaptiveScaffoldAppBar extends StatelessWidget { key: AdaptiveScaffoldAppBarStyle.adaptiveAppBarKey, builder: (_) { return Container( + height: AppScaffoldViewStyle.appBarSize, decoration: BoxDecoration( color: LinagoraSysColors.material().onPrimary, ), diff --git a/lib/widgets/layouts/adaptive_layout/app_adaptive_scaffold.dart b/lib/widgets/layouts/adaptive_layout/app_adaptive_scaffold.dart index 99da353390..b165dbb9d3 100644 --- a/lib/widgets/layouts/adaptive_layout/app_adaptive_scaffold.dart +++ b/lib/widgets/layouts/adaptive_layout/app_adaptive_scaffold.dart @@ -2,7 +2,6 @@ import 'package:fluffychat/utils/extension/build_context_extension.dart'; import 'package:fluffychat/utils/responsive/responsive_utils.dart'; import 'package:fluffychat/widgets/layouts/adaptive_layout/adaptive_scaffold_appbar.dart'; import 'package:fluffychat/widgets/layouts/adaptive_layout/adaptive_scaffold_route_style.dart'; -import 'package:fluffychat/widgets/layouts/adaptive_layout/adaptive_scaffold_view_style.dart'; import 'package:flutter/material.dart'; import 'package:flutter_adaptive_scaffold/flutter_adaptive_scaffold.dart'; import 'package:flutter_portal/flutter_portal.dart'; @@ -36,10 +35,7 @@ class AppAdaptiveScaffold extends StatelessWidget { backgroundColor: Theme.of(context).colorScheme.surface, body: Column( children: [ - const SizedBox( - height: AppScaffoldViewStyle.appBarSize, - child: AdaptiveScaffoldAppBar(), - ), + const AdaptiveScaffoldAppBar(), Expanded( child: AdaptiveLayout( internalAnimations: false,