mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-15 21:03:41 +00:00
refactor(ui): declutter extension card actions
Drop homepage/GitHub buttons from store extension cards (they remain on the detail page); keep them only for unlisted extensions whose cards do not open a detail view. With the labeled update button this caps card actions at update/settings/delete.
This commit is contained in:
1 parent
172f4a3650
commit
f34cb9c971
1 file changed
+4
-2
@@ -1095,13 +1095,15 @@ class _ExtensionCard extends ConsumerWidget {
|
|||||||
? const SizedBox.square(dimension: 14, child: shad.CircularProgressIndicator())
|
? const SizedBox.square(dimension: 14, child: shad.CircularProgressIndicator())
|
||||||
: const Icon(Icons.download),
|
: const Icon(Icons.download),
|
||||||
),
|
),
|
||||||
if ((item.homepage ?? '').isNotEmpty)
|
// Unlisted extensions have no detail page to open, so keep
|
||||||
|
// their links reachable directly on the card.
|
||||||
|
if (item.store == null && (item.homepage ?? '').isNotEmpty)
|
||||||
shad.GhostButton(
|
shad.GhostButton(
|
||||||
density: shad.ButtonDensity.icon,
|
density: shad.ButtonDensity.icon,
|
||||||
onPressed: () => unawaited(launchUrl(Uri.parse(item.homepage!))),
|
onPressed: () => unawaited(launchUrl(Uri.parse(item.homepage!))),
|
||||||
child: const Icon(Icons.home_outlined),
|
child: const Icon(Icons.home_outlined),
|
||||||
),
|
),
|
||||||
if ((item.repoUrl ?? '').isNotEmpty)
|
if (item.store == null && (item.repoUrl ?? '').isNotEmpty)
|
||||||
shad.GhostButton(
|
shad.GhostButton(
|
||||||
density: shad.ButtonDensity.icon,
|
density: shad.ButtonDensity.icon,
|
||||||
onPressed: () => unawaited(launchUrl(Uri.parse(item.repoUrl!))),
|
onPressed: () => unawaited(launchUrl(Uri.parse(item.repoUrl!))),
|
||||||
|
|||||||
Reference in new issue
Block a user