mirror of
https://github.com/git-touch/git-touch
synced 2024-12-15 09:56:15 +01:00
feat(gt): org members screen
This commit is contained in:
parent
3f324b43fd
commit
a87a504cea
@ -278,6 +278,8 @@ class GiteaRouter {
|
||||
return GtUsersScreen.followers(login);
|
||||
case 'following':
|
||||
return GtUsersScreen.following(login);
|
||||
case 'people':
|
||||
return GtUsersScreen.member(login);
|
||||
case 'stars':
|
||||
return GtReposScreen.star(login);
|
||||
case 'repositories':
|
||||
|
@ -162,7 +162,13 @@ class GtUserScreen extends StatelessWidget {
|
||||
text: 'Repositories',
|
||||
url: '/gitea/$login?tab=orgrepo',
|
||||
),
|
||||
EntryItem(
|
||||
count: 0,
|
||||
text: 'Members',
|
||||
url: '/gitea/$login?tab=people',
|
||||
),
|
||||
]),
|
||||
CommonStyle.border,
|
||||
],
|
||||
);
|
||||
} else {
|
||||
|
@ -10,14 +10,22 @@ import 'package:timeago/timeago.dart' as timeago;
|
||||
class GtUsersScreen extends StatelessWidget {
|
||||
final String login;
|
||||
final String api;
|
||||
final String title;
|
||||
|
||||
GtUsersScreen.followers(this.login) : api = '/users/$login/followers';
|
||||
GtUsersScreen.following(this.login) : api = '/users/$login/following';
|
||||
GtUsersScreen.followers(this.login)
|
||||
: api = '/users/$login/followers',
|
||||
title = 'Followers';
|
||||
GtUsersScreen.following(this.login)
|
||||
: api = '/users/$login/following',
|
||||
title = "Following";
|
||||
GtUsersScreen.member(this.login)
|
||||
: api = '/orgs/$login/members',
|
||||
title = "Members";
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListStatefulScaffold<GiteaUser, int>(
|
||||
title: AppBarTitle('_title'),
|
||||
title: AppBarTitle(title),
|
||||
onLoadMore: (page) async {
|
||||
page = page ?? 1;
|
||||
final res = await context
|
||||
|
Loading…
Reference in New Issue
Block a user