mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-05 12:38:24 +00:00
Improve UI of recommended apps
This commit is contained in:
@@ -96,7 +96,8 @@ class AppDetailScreen extends HookConsumerWidget {
|
||||
Divider(height: 24),
|
||||
if (curatedBy.isNotEmpty)
|
||||
UsersRichText(
|
||||
trailingText: ' recommended this app',
|
||||
trailingText:
|
||||
' recommend${curatedBy.length == 1 ? 's' : ''} this app',
|
||||
users: curatedBy.toList(),
|
||||
),
|
||||
if (curatedBy.isNotEmpty) Gap(20),
|
||||
|
||||
@@ -111,6 +111,7 @@ class AppCurationSetNotifier
|
||||
final appCurationSet = await future;
|
||||
final appsLocal =
|
||||
ref.apps.appAdapter.findWhereIdentifierInLocal(appCurationSet.appIds);
|
||||
// TODO: Rethink this logic, if an app is missing it loops forever
|
||||
if (appsLocal.length < appCurationSet.appIds.length) {
|
||||
state = AsyncLoading();
|
||||
state = await AsyncValue.guard(() async {
|
||||
|
||||
@@ -53,29 +53,30 @@ class InstallAlertDialog extends ConsumerWidget {
|
||||
minimal: true,
|
||||
labelText: 'Log in to view your own web of trust',
|
||||
),
|
||||
Gap(20),
|
||||
if (app.latestMetadata?.urls.isNotEmpty ?? false)
|
||||
RichText(
|
||||
text: WidgetSpan(
|
||||
child: Wrap(
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
children: [
|
||||
Text('This app will be downloaded from '),
|
||||
Text(
|
||||
Uri.parse(app.latestMetadata!.urls.first).host,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
Text(' and verified.'),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
if (app.latestMetadata?.urls.isNotEmpty ?? false)
|
||||
RichText(
|
||||
text: WidgetSpan(
|
||||
child: Wrap(
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
children: [
|
||||
Text('This app will be downloaded from '),
|
||||
Text(
|
||||
Uri.parse(app.latestMetadata!.urls.first).host,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
Text(' and verified.'),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: TextButton(
|
||||
|
||||
@@ -96,14 +96,19 @@ class UsersRichText extends StatelessWidget {
|
||||
children: [
|
||||
RoundedImage(url: user.avatarUrl, size: 20),
|
||||
Text(
|
||||
' ${user.nameOrNpub}${users.indexOf(user) == users.length - 1 ? '' : ', '}',
|
||||
' ${user.nameOrNpub}',
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
Text(users.indexOf(user) == users.length - 1
|
||||
? ''
|
||||
: (users.indexOf(user) == users.length - 2
|
||||
? ' and '
|
||||
: ', ')),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (users.indexOf(user) == users.length - 1)
|
||||
TextSpan(text: trailingText)
|
||||
TextSpan(text: trailingText, style: TextStyle(fontSize: 15))
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user