From 91b79ad3609af9a7ff20d7aecd0cb473a4f1c18e Mon Sep 17 00:00:00 2001 From: Frederik Feichtmeier Date: Mon, 22 Aug 2022 15:29:20 +0200 Subject: [PATCH] PackageDialog: display website, arch and source (#90) --- lib/l10n/app_en.arb | 4 +++- lib/store_app/common/package_dialog.dart | 23 +++++++++++++++++++++-- lib/store_app/common/package_model.dart | 1 - 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index d37056dc0..18b9513e6 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -64,5 +64,7 @@ "enterRepoName": "Enter repository name", "requireRestart": "Restart to finalize updates", "issued": "Issued", - "changelog": "Changelog" + "changelog": "Changelog", + "architecture": "Architecture", + "source": "Source" } \ No newline at end of file diff --git a/lib/store_app/common/package_dialog.dart b/lib/store_app/common/package_dialog.dart index 9e84da959..8941d2470 100644 --- a/lib/store_app/common/package_dialog.dart +++ b/lib/store_app/common/package_dialog.dart @@ -4,6 +4,7 @@ import 'package:liquid_progress_indicator/liquid_progress_indicator.dart'; import 'package:packagekit/packagekit.dart'; import 'package:provider/provider.dart'; import 'package:software/l10n/l10n.dart'; +import 'package:software/store_app/common/link.dart'; import 'package:software/store_app/common/package_model.dart'; import 'package:ubuntu_service/ubuntu_service.dart'; import 'package:yaru_icons/yaru_icons.dart'; @@ -89,8 +90,14 @@ class _PackageDialogState extends State { infoLabel: context.l10n.version, infoValue: model.version, ), - YaruSingleInfoRow(infoLabel: 'Arch', infoValue: model.arch), - YaruSingleInfoRow(infoLabel: 'Data', infoValue: model.data), + YaruSingleInfoRow( + infoLabel: context.l10n.architecture, + infoValue: model.arch, + ), + YaruSingleInfoRow( + infoLabel: context.l10n.source, + infoValue: model.data, + ), YaruSingleInfoRow( infoLabel: context.l10n.license, infoValue: model.license, @@ -99,6 +106,18 @@ class _PackageDialogState extends State { infoLabel: context.l10n.size, infoValue: model.size.toString(), ), + YaruRow( + trailingWidget: Text(context.l10n.website), + actionWidget: Link( + url: model.url, + linkText: model.url, + textStyle: TextStyle( + overflow: TextOverflow.ellipsis, + color: Theme.of(context).primaryColor, + ), + ), + enabled: true, + ), if (!widget.showActions) YaruSingleInfoRow( infoLabel: context.l10n.issued, diff --git a/lib/store_app/common/package_model.dart b/lib/store_app/common/package_model.dart index cf99e4174..3016a7476 100644 --- a/lib/store_app/common/package_model.dart +++ b/lib/store_app/common/package_model.dart @@ -188,7 +188,6 @@ class PackageModel extends SafeChangeNotifier { setSize(event.size); description = event.description; group = event.group; - url = event.url; } else if (event is PackageKitFinishedEvent) { detailsCompleter.complete(); }