Skip to content

Commit

Permalink
PackageDialog: display website, arch and source (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier authored Aug 22, 2022
1 parent fedd3d6 commit 91b79ad
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,7 @@
"enterRepoName": "Enter repository name",
"requireRestart": "Restart to finalize updates",
"issued": "Issued",
"changelog": "Changelog"
"changelog": "Changelog",
"architecture": "Architecture",
"source": "Source"
}
23 changes: 21 additions & 2 deletions lib/store_app/common/package_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -89,8 +90,14 @@ class _PackageDialogState extends State<PackageDialog> {
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,
Expand All @@ -99,6 +106,18 @@ class _PackageDialogState extends State<PackageDialog> {
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,
Expand Down
1 change: 0 additions & 1 deletion lib/store_app/common/package_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 91b79ad

Please sign in to comment.