mirror of
https://github.com/git-touch/git-touch
synced 2025-01-31 08:04:51 +01:00
improvement(gitlab): commit router
This commit is contained in:
parent
09d03586ce
commit
d86fe629fc
@ -166,8 +166,10 @@ class GitlabRouter {
|
||||
params['id'].first,
|
||||
prefix: params['prefix'].first,
|
||||
));
|
||||
static final commits = RouterScreen('/projects/:id/commits',
|
||||
(context, params) => GitlabCommitsScreen(params['id'].first));
|
||||
static final commits = RouterScreen(
|
||||
'/projects/:id/commits',
|
||||
(context, params) => GitlabCommitsScreen(params['id'].first,
|
||||
prefix: params['prefix'].first));
|
||||
static final projectMembers = RouterScreen(
|
||||
'/projects/:id/members',
|
||||
(context, parameters) =>
|
||||
|
@ -8,9 +8,9 @@ import 'package:provider/provider.dart';
|
||||
|
||||
class GitlabCommitsScreen extends StatelessWidget {
|
||||
final String id;
|
||||
final String prefix;
|
||||
// final String branch; // TODO:
|
||||
|
||||
GitlabCommitsScreen(this.id);
|
||||
GitlabCommitsScreen(this.id, {this.prefix});
|
||||
|
||||
Future<ListPayload<GitlabCommit, int>> _query(BuildContext context,
|
||||
[int page = 1]) async {
|
||||
@ -36,8 +36,7 @@ class GitlabCommitsScreen extends StatelessWidget {
|
||||
avatarUrl: null,
|
||||
createdAt: c.createdAt,
|
||||
message: c.message,
|
||||
// url: '${auth.activeAccount.domain}/',
|
||||
url: null, // TODO:
|
||||
url: '$prefix/commit/${c.id}', // TODO:
|
||||
);
|
||||
},
|
||||
);
|
||||
|
@ -134,7 +134,7 @@ class GitlabProjectScreen extends StatelessWidget {
|
||||
leftIconData: Octicons.history,
|
||||
text: Text('Commits'),
|
||||
rightWidget: Text(p.statistics.commitCount.toString()),
|
||||
url: '/gitlab/projects/$id/commits',
|
||||
url: '/gitlab/projects/$id/commits?prefix=$prefix',
|
||||
),
|
||||
],
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user