Fixed some bugs and added more locales
All checks were successful
ci/woodpecker/pr/flutterBuild Pipeline was successful
All checks were successful
ci/woodpecker/pr/flutterBuild Pipeline was successful
This commit is contained in:
parent
48f97d73a4
commit
aed1d96a21
5 changed files with 22 additions and 9 deletions
|
@ -69,6 +69,11 @@
|
||||||
"description": "No issues found for the current repo",
|
"description": "No issues found for the current repo",
|
||||||
"context": "Repo issue page"
|
"context": "Repo issue page"
|
||||||
},
|
},
|
||||||
|
"nopr": "No pull requests found",
|
||||||
|
"@nopr": {
|
||||||
|
"description": "No Pull requests found for the current repo",
|
||||||
|
"context": "Repo issue page"
|
||||||
|
},
|
||||||
"login": "Login",
|
"login": "Login",
|
||||||
"@login": {
|
"@login": {
|
||||||
"description": "Login page title",
|
"description": "Login page title",
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
"noreadme": "Nem található README file!",
|
"noreadme": "Nem található README file!",
|
||||||
"nofiles": "Nem található fájl ebben a könyvtárban",
|
"nofiles": "Nem található fájl ebben a könyvtárban",
|
||||||
"noissues": "Nincsenek hibajegyek",
|
"noissues": "Nincsenek hibajegyek",
|
||||||
|
"nopr": "Nincsenek egyesítési kérések",
|
||||||
"login": "Bejelentkezés",
|
"login": "Bejelentkezés",
|
||||||
"otherInstance": "Egy másik példány",
|
"otherInstance": "Egy másik példány",
|
||||||
"instanceUrl": "Példány címe",
|
"instanceUrl": "Példány címe",
|
||||||
|
|
|
@ -13,7 +13,7 @@ class PullRequest {
|
||||||
List<Labels>? labels;
|
List<Labels>? labels;
|
||||||
Milestone? milestone;
|
Milestone? milestone;
|
||||||
User? assignee;
|
User? assignee;
|
||||||
User? assignees;
|
List<User>? assignees;
|
||||||
String state;
|
String state;
|
||||||
bool isLocked;
|
bool isLocked;
|
||||||
int comments;
|
int comments;
|
||||||
|
@ -90,8 +90,13 @@ class PullRequest {
|
||||||
milestone = json['milestone'] != null
|
milestone = json['milestone'] != null
|
||||||
? Milestone.fromJson(json['milestone'])
|
? Milestone.fromJson(json['milestone'])
|
||||||
: null;
|
: null;
|
||||||
assignee = json['assignee'];
|
assignee = (json['assignee'] != null) ? User.fromJson(json['assignee']) : null;
|
||||||
assignees = json['assignees'];
|
if (json['assignees'] != null) {
|
||||||
|
assignees = <User>[];
|
||||||
|
json['assignees'].forEach((v) {
|
||||||
|
assignees!.add( User.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
mergeable = json['mergeable'];
|
mergeable = json['mergeable'];
|
||||||
mergedAt = json['merged_at'];
|
mergedAt = json['merged_at'];
|
||||||
mergeCommitSha = json['merge_commit_sha'];
|
mergeCommitSha = json['merge_commit_sha'];
|
||||||
|
|
|
@ -64,6 +64,7 @@ class GiteaService {
|
||||||
Uri.https(apiAccess.instance, "api/v1/repos/$owner/$repo/issues", {
|
Uri.https(apiAccess.instance, "api/v1/repos/$owner/$repo/issues", {
|
||||||
"token": apiAccess.token,
|
"token": apiAccess.token,
|
||||||
"state": state,
|
"state": state,
|
||||||
|
"type": "issues",
|
||||||
"page" : page.toString(),
|
"page" : page.toString(),
|
||||||
"limit" : limit.toString(),
|
"limit" : limit.toString(),
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -504,6 +504,7 @@ class _RepoPullRequests extends State<RepoPullRequests> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final media = MediaQuery.of(context).size;
|
final media = MediaQuery.of(context).size;
|
||||||
|
final l10n = L10n.of(context)!;
|
||||||
return DefaultTabController(
|
return DefaultTabController(
|
||||||
length: 2,
|
length: 2,
|
||||||
child: DefaultTabController(
|
child: DefaultTabController(
|
||||||
|
@ -517,8 +518,8 @@ class _RepoPullRequests extends State<RepoPullRequests> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(child: Container()),
|
Expanded(child: Container()),
|
||||||
const TabBar(
|
TabBar(
|
||||||
tabs: [Text("Open"), Text("Closed")],
|
tabs: [Text(l10n.open), Text(l10n.closed)],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -546,8 +547,8 @@ class _RepoPullRequests extends State<RepoPullRequests> {
|
||||||
return Center(child: Text('failed to fetch $error_message'));
|
return Center(child: Text('failed to fetch $error_message'));
|
||||||
case PullRequestStatus.success:
|
case PullRequestStatus.success:
|
||||||
if (state.pulls.isEmpty) {
|
if (state.pulls.isEmpty) {
|
||||||
return const Center(
|
return Center(
|
||||||
child: Text('No issues found'));
|
child: Text(l10n.nopr));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
|
@ -589,8 +590,8 @@ class _RepoPullRequests extends State<RepoPullRequests> {
|
||||||
return Center(child: Text('failed to fetch $error_message'));
|
return Center(child: Text('failed to fetch $error_message'));
|
||||||
case PullRequestStatus.success:
|
case PullRequestStatus.success:
|
||||||
if (state.pulls.isEmpty) {
|
if (state.pulls.isEmpty) {
|
||||||
return const Center(
|
return Center(
|
||||||
child: Text('No issues found'));
|
child: Text(l10n.nopr));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
|
|
Loading…
Reference in a new issue