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