mirror of
https://github.com/git-touch/git-touch
synced 2024-12-18 19:22:54 +01:00
parent
146f731c95
commit
a425902756
@ -15,7 +15,7 @@ final giteaObjectRouter = RouterScreen(
|
||||
(context, params) => GiteaObjectScreen(
|
||||
params['owner'].first,
|
||||
params['name'].first,
|
||||
path: params['path']?.first?.urldecode,
|
||||
path: params['path']?.first,
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -12,7 +12,7 @@ import 'package:provider/provider.dart';
|
||||
final gitlabBlobRouter = RouterScreen(
|
||||
'/gitlab/projects/:id/blob',
|
||||
(context, params) => GitlabBlobScreen(params['id'].first.toInt,
|
||||
path: params['path']?.first?.urldecode));
|
||||
path: params['path']?.first));
|
||||
|
||||
class GitlabBlobScreen extends StatelessWidget {
|
||||
final int id;
|
||||
|
@ -11,7 +11,7 @@ import 'package:git_touch/utils/utils.dart';
|
||||
final gitlabTreeRouter = RouterScreen(
|
||||
'/gitlab/projects/:id/tree',
|
||||
(context, params) => GitlabTreeScreen(params['id'].first.toInt,
|
||||
path: params['path']?.first?.urldecode));
|
||||
path: params['path']?.first));
|
||||
|
||||
class GitlabTreeScreen extends StatelessWidget {
|
||||
final int id;
|
||||
|
@ -12,15 +12,14 @@ import 'package:git_touch/models/auth.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
|
||||
final objectRouter = RouterScreen(
|
||||
'/:owner/:name/blob/:ref',
|
||||
(context, params) => ObjectScreen(
|
||||
final objectRouter = RouterScreen('/:owner/:name/blob/:ref', (context, params) {
|
||||
return ObjectScreen(
|
||||
params['owner'].first,
|
||||
params['name'].first,
|
||||
params['ref'].first,
|
||||
paths: params['path']?.first?.urldecode?.split('/') ?? [],
|
||||
),
|
||||
);
|
||||
paths: params['path']?.first?.split('/') ?? [],
|
||||
);
|
||||
});
|
||||
|
||||
class ObjectScreen extends StatelessWidget {
|
||||
final String owner;
|
||||
|
Loading…
Reference in New Issue
Block a user