Changed Gitea Widget, Added Repositories

This commit is contained in:
Florian Stamer 2024-06-08 21:13:01 +02:00
parent e6f2ff970b
commit 5bd604cc0e
52 changed files with 3566 additions and 2814 deletions

View File

@ -5,9 +5,9 @@ description: Gitea Widget Configuration
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.
API token requires `repos`,`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: `["repos","notifications", "issues", "pulls"]`.
```yaml
widget:

View File

@ -62,5 +62,6 @@
},
"optionalDependencies": {
"osx-temperature-sensor": "^1.0.8"
}
},
"packageManager": "pnpm@9.2.0+sha512.98a80fd11c2e7096747762304106432b3ddc67dcf54b5a8c01c93f68a2cd5e05e6821849522a06fb76284d41a2660d5e334f2ee3bbf29183bf2e739b1dafa771"
}

File diff suppressed because it is too large Load Diff

BIN
public/locales.zip Normal file

Binary file not shown.

View File

@ -840,9 +840,10 @@
"species": "Spesies"
},
"gitea": {
"notifications": "Kennisgewings",
"issues": "Kwessies",
"pulls": "Trek Versoeke"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Tonele",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "الأنواع"
},
"gitea": {
"notifications": "الإشعارات",
"issues": "المُشكِلات",
"pulls": "طلبات السحب"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "المشاهد",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Espècies"
},
"gitea": {
"notifications": "Notificacions",
"issues": "Problemes",
"pulls": "Sol·licitud de Canvis"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Escenes",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,8 +840,9 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Problémy",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,8 +840,9 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Problemer",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Spezies"
},
"gitea": {
"notifications": "Benachrichtigungen",
"issues": "Probleme",
"pulls": "Pull-Requests"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Szenen",
@ -889,4 +890,4 @@
"outdated": "Veraltet",
"banned": "Gebannt"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -777,7 +777,7 @@
"ping": "Ping"
},
"urbackup": {
"ok" : "Ok",
"ok": "Ok",
"errored": "Errors",
"noRecent": "Out of Date",
"totalUsed": "Used Storage"
@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Especies"
},
"gitea": {
"notifications": "Notificaciones",
"issues": "Números",
"pulls": "Solicitudes de cambios"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Escenas",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Espèces"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Anomalies",
"pulls": "Demandes de tirage"
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Scènes",
@ -889,4 +890,4 @@
"outdated": "Obsolète",
"banned": "Banni"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Vrste"
},
"gitea": {
"notifications": "Obavijesti",
"issues": "Problemi",
"pulls": "Zahtjevi za povlačenje"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Scene",
@ -889,4 +890,4 @@
"outdated": "Zastarjelo",
"banned": "Zabranjen pristup"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Fajok"
},
"gitea": {
"notifications": "Üzenetek",
"issues": "Problémák",
"pulls": "Pull request-ek"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Jelenetek",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,8 +840,9 @@
"species": "Spesies"
},
"gitea": {
"notifications": "Notifikasi",
"issues": "Isu",
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Specie"
},
"gitea": {
"notifications": "Notifiche",
"issues": "Problemi",
"pulls": "Richieste di Pull"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Scene",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "種"
},
"gitea": {
"notifications": "通知",
"issues": "課題",
"pulls": "プルリクエスト"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "シーン",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -746,5 +746,11 @@
"physicalRelease": "Physical release",
"inCinemas": "In cinemas",
"digitalRelease": "Digital release"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
}
}
}

View File

@ -840,8 +840,9 @@
"species": "Soorten"
},
"gitea": {
"notifications": "Notificaties",
"issues": "Problemen",
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Arter"
},
"gitea": {
"notifications": "Varslinger",
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Forespørsel"
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Scener",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Gatunki"
},
"gitea": {
"notifications": "Powiadomienia",
"issues": "Zgłoszenia",
"pulls": "Żądania Pull"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Sceny",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -746,5 +746,11 @@
"physicalRelease": "Physical release",
"inCinemas": "In cinemas",
"digitalRelease": "Digital release"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
}
}
}

View File

@ -840,8 +840,9 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Problemas",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Espécies"
},
"gitea": {
"notifications": "Notificações",
"issues": "Problemas",
"pulls": "Solicitações de Envio"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Cenas",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Виды"
},
"gitea": {
"notifications": "Уведомления",
"issues": "Вопросы",
"pulls": "Запросы на слияние (Pull Request)"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Сцены",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Druhy"
},
"gitea": {
"notifications": "Oznámenia",
"issues": "Problémy",
"pulls": "Pull requesty"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Scény",
@ -889,4 +890,4 @@
"outdated": "Zastarané",
"banned": "Zabanovaný"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Vrste"
},
"gitea": {
"notifications": "Obvestila",
"issues": "Težave",
"pulls": "Zahteve za prenos"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Scene",
@ -889,4 +890,4 @@
"outdated": "Zastarelo",
"banned": "Prepovedan"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "Türler"
},
"gitea": {
"notifications": "Bildirimler",
"issues": "Sorunlar",
"pulls": "Değişiklik İstekleri"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Sahneler",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,8 +840,9 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Питання",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,6 +840,7 @@
"species": "Species"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "物種"
},
"gitea": {
"notifications": "信息",
"issues": "出版",
"pulls": "提取請求"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "場景",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -746,5 +746,11 @@
"physicalRelease": "Physical release",
"inCinemas": "In cinemas",
"digitalRelease": "Digital release"
},
"gitea": {
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "物种"
},
"gitea": {
"notifications": "通知",
"issues": "出版",
"pulls": "PR"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "场景",
@ -889,4 +890,4 @@
"outdated": "已过期",
"banned": "已禁止"
}
}
}

View File

@ -840,9 +840,10 @@
"species": "物種"
},
"gitea": {
"notifications": "信息",
"issues": "出版",
"pulls": "提取請求"
"repos": "Repositories",
"notifications": "Notifications",
"issues": "Issues",
"pulls": "Pull Requests"
},
"stash": {
"scenes": "場景",
@ -889,4 +890,4 @@
"outdated": "Outdated",
"banned": "Banned"
}
}
}

View File

@ -4,26 +4,29 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
export default function Component({ service }) {
const { widget } = service;
const { data: giteaNotifications, error: giteaNotificationsError } = useWidgetAPI(widget, "notifications");
const { data: giteaIssues, error: giteaIssuesError } = useWidgetAPI(widget, "issues");
if (giteaNotificationsError || giteaIssuesError) {
return <Container service={service} error={giteaNotificationsError ?? giteaIssuesError} />;
const { data: giteaRepos, error: giteaReposError } = useWidgetAPI(widget, "repos");
if (giteaNotificationsError || giteaIssuesError || giteaReposError) {
return <Container service={service} error={giteaNotificationsError ?? giteaIssuesError ?? giteaReposError} />;
}
if (!giteaNotifications || !giteaIssues) {
if (!giteaNotifications || !giteaIssues || !giteaRepos ) {
return (
<Container service={service}>
<Block label="gitea.notifications" />
<Block label="gitea.issues" />
<Block label="gitea.pulls" />
<Block label="gitea.repos" />
</Container>
);
}
return (
<Container service={service}>
<Block label="gitea.repos" value={giteaRepos.data.length} />
<Block label="gitea.notifications" value={giteaNotifications.length} />
<Block label="gitea.issues" value={giteaIssues.issues.length} />
<Block label="gitea.pulls" value={giteaIssues.pulls.length} />

View File

@ -16,6 +16,9 @@ const widget = {
issues: asJson(data).filter((issue) => !issue.pull_request),
}),
},
repos: {
endpoint: "repos/search"
}
},
};