Add recently banned section and modlog tile

This commit is contained in:
krawieck 2020-09-08 19:44:04 +02:00
parent 8c5def182d
commit 7a140fca6f
1 changed files with 28 additions and 0 deletions

View File

@ -255,6 +255,7 @@ class _AboutTab extends HookWidget {
),
...site.admins.map((e) => ListTile(
title: Text(e.preferredUsername ?? '@${e.name}'),
subtitle: e.bio != null ? Text('${e.bio}') : null,
onTap: () => print('GO TO USER ${e.name}'),
leading: e.avatar != null
? CachedNetworkImage(
@ -270,6 +271,33 @@ class _AboutTab extends HookWidget {
))
: SizedBox(width: 50),
)),
_Divider(),
ListTile(
title: Center(
child: Text(
'Recently banned:',
style: theme.textTheme.headline6.copyWith(fontSize: 18),
),
),
),
...site.banned.getRange(0, 5).map((e) => ListTile(
// subtitle: Text(),
title: Text(
(e.preferredUsername == null || e.preferredUsername == '')
? '@${e.name}'
: e.preferredUsername),
onTap: () => print('GO TO USER ${e.name}'),
leading: SizedBox(width: 50),
)),
ListTile(
title: Center(child: Text('See all')),
onTap: () => print('GO TO BANNED USERS PAGE'),
),
_Divider(),
ListTile(
title: Center(child: Text('Modlog')),
onTap: () => print('GO TO MODLOG'),
),
SizedBox(height: 20),
],
),