From 730255fd957354b81cf70b02503d47ea3d62f6c6 Mon Sep 17 00:00:00 2001 From: dab246 Date: Tue, 30 Jan 2024 17:03:19 +0700 Subject: [PATCH] TF-2513 Fix can not load image `svg` in mobile web app Signed-off-by: dab246 --- assets/images/ic_arrow_up_outline.svg | 9 +- assets/images/ic_empty_email.svg | 128 +- assets/images/ic_login_graphic.svg | 1165 +++++------------ assets/images/ic_page_not_found.svg | 143 +- assets/images/ic_page_not_found_mobile.svg | 21 + assets/images/ic_style_color.svg | 20 +- assets/images/ic_switch_on.svg | 9 +- .../presentation/resources/image_paths.dart | 1 + .../unknown_route_page_view.dart | 10 +- 9 files changed, 452 insertions(+), 1054 deletions(-) create mode 100644 assets/images/ic_page_not_found_mobile.svg diff --git a/assets/images/ic_arrow_up_outline.svg b/assets/images/ic_arrow_up_outline.svg index 2aca27c07..cd1dd6bb6 100644 --- a/assets/images/ic_arrow_up_outline.svg +++ b/assets/images/ic_arrow_up_outline.svg @@ -1,8 +1,5 @@ - - - - - - + diff --git a/assets/images/ic_empty_email.svg b/assets/images/ic_empty_email.svg index ccde949b2..14bb4caa7 100644 --- a/assets/images/ic_empty_email.svg +++ b/assets/images/ic_empty_email.svg @@ -1,87 +1,45 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/ic_login_graphic.svg b/assets/images/ic_login_graphic.svg index 71f4c7a47..b2a4d8254 100644 --- a/assets/images/ic_login_graphic.svg +++ b/assets/images/ic_login_graphic.svg @@ -1,823 +1,346 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/ic_page_not_found.svg b/assets/images/ic_page_not_found.svg index ed8dffea3..f7f6ba63d 100644 --- a/assets/images/ic_page_not_found.svg +++ b/assets/images/ic_page_not_found.svg @@ -1,118 +1,27 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/ic_page_not_found_mobile.svg b/assets/images/ic_page_not_found_mobile.svg new file mode 100644 index 000000000..379386677 --- /dev/null +++ b/assets/images/ic_page_not_found_mobile.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/ic_style_color.svg b/assets/images/ic_style_color.svg index 01ac8ed33..84d3ef403 100644 --- a/assets/images/ic_style_color.svg +++ b/assets/images/ic_style_color.svg @@ -1,18 +1,4 @@ - - - - - - - - - - - - - - + + + diff --git a/assets/images/ic_switch_on.svg b/assets/images/ic_switch_on.svg index 76174df7c..84edc43f3 100644 --- a/assets/images/ic_switch_on.svg +++ b/assets/images/ic_switch_on.svg @@ -1,9 +1,6 @@ - - - - - + - \ No newline at end of file diff --git a/core/lib/presentation/resources/image_paths.dart b/core/lib/presentation/resources/image_paths.dart index 3f9f7d69f..73c0b545f 100644 --- a/core/lib/presentation/resources/image_paths.dart +++ b/core/lib/presentation/resources/image_paths.dart @@ -159,6 +159,7 @@ class ImagePaths { String get icQuotasOutOfStorage => _getImagePath('ic_quotas_out_of_storage.svg'); String get icQuickCreatingRule => _getImagePath('ic_quick_creating_rule.svg'); String get icPageNotFound => _getImagePath('ic_page_not_found.svg'); + String get icPageNotFoundMobile => _getImagePath('ic_page_not_found_mobile.svg'); String get icOpenInNewTab => _getImagePath('ic_open_in_new_tab.svg'); String get icInfoCircleOutline => _getImagePath('ic_info_circle_outline.svg'); String get icSpamReportDisable => _getImagePath('ic_spam_report_disable.svg'); diff --git a/lib/features/unknown_route_page/unknown_route_page_view.dart b/lib/features/unknown_route_page/unknown_route_page_view.dart index 24930ea4f..1b5b4f527 100644 --- a/lib/features/unknown_route_page/unknown_route_page_view.dart +++ b/lib/features/unknown_route_page/unknown_route_page_view.dart @@ -23,8 +23,14 @@ class UnknownRoutePageView extends StatelessWidget { body: Center( child: SingleChildScrollView( child: Column(mainAxisSize: MainAxisSize.min, children: [ - SvgPicture.asset(_imagePath.icPageNotFound), - const SizedBox(height: 48), + if (_responsiveUtils.isPortraitMobile(context)) + Padding( + padding: const EdgeInsets.only(top: 48, bottom: 32), + child: SvgPicture.asset(_imagePath.icPageNotFoundMobile)) + else + Padding( + padding: const EdgeInsets.symmetric(vertical: 48), + child: SvgPicture.asset(_imagePath.icPageNotFound)), Container( color: Colors.white, padding: _getPaddingTitle(context),