diff --git a/docs/widgets/services/gitea.md b/docs/widgets/services/gitea.md
index 140c4ee7d..eb47849de 100644
--- a/docs/widgets/services/gitea.md
+++ b/docs/widgets/services/gitea.md
@@ -7,7 +7,7 @@ Learn more about [Gitea](https://gitea.com).
API token requires `notifications`, `repository` and `issue` permissions. See the [gitea documentation](https://docs.gitea.com/development/api-usage#generating-and-listing-api-tokens) for details on generating tokens.
-Allowed fields: `["notifications", "issues", "pulls"]`.
+Allowed fields: `["repositories", "notifications", "issues", "pulls"]`.
```yaml
widget:
diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index 0535cd6ee..4a9c33d54 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -883,9 +883,10 @@
"species": "Species"
},
"gitea": {
- "notifications": "Notifications",
- "issues": "Issues",
- "pulls": "Pull Requests"
+ "notifications": "Notifications",
+ "issues": "Issues",
+ "pulls": "Pull Requests",
+ "repositories": "Repositories"
},
"stash": {
"scenes": "Scenes",
diff --git a/src/widgets/gitea/component.jsx b/src/widgets/gitea/component.jsx
index 74e6dc82e..c45ded065 100644
--- a/src/widgets/gitea/component.jsx
+++ b/src/widgets/gitea/component.jsx
@@ -8,17 +8,21 @@ export default function Component({ service }) {
const { data: giteaNotifications, error: giteaNotificationsError } = useWidgetAPI(widget, "notifications");
const { data: giteaIssues, error: giteaIssuesError } = useWidgetAPI(widget, "issues");
+ const { data: giteaRepositories, error: giteaRepositoriesError } = useWidgetAPI(widget, "repositories");
- if (giteaNotificationsError || giteaIssuesError) {
- return ;
+ if (giteaNotificationsError || giteaIssuesError || giteaRepositoriesError) {
+ return (
+
+ );
}
- if (!giteaNotifications || !giteaIssues) {
+ if (!giteaNotifications || !giteaIssues || !giteaRepositories) {
return (
+
);
}
@@ -28,6 +32,7 @@ export default function Component({ service }) {
+
);
}
diff --git a/src/widgets/gitea/widget.js b/src/widgets/gitea/widget.js
index 32871b006..b0420ccc6 100644
--- a/src/widgets/gitea/widget.js
+++ b/src/widgets/gitea/widget.js
@@ -16,6 +16,9 @@ const widget = {
issues: asJson(data).filter((issue) => !issue.pull_request),
}),
},
+ repositories: {
+ endpoint: "repos/search",
+ },
},
};