diff --git a/docs/configuration.md b/docs/configuration.md index 393e4c4..bec7451 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -989,11 +989,13 @@ Example: ```yaml - type: releases + show-source-icon: true repositories: - - immich-app/immich - go-gitea/gitea - - dani-garcia/vaultwarden - jellyfin/jellyfin + - glanceapp/glance + - gitlab:fdroid/fdroidclient + - dockerhub:gotify/server ``` Preview: @@ -1005,13 +1007,23 @@ Preview: | Name | Type | Required | Default | | ---- | ---- | -------- | ------- | | repositories | array | yes | | +| show-source-icon | boolean | no | false | | | token | string | no | | +| gitlab-token | string | no | | | limit | integer | no | 10 | | collapse-after | integer | no | 5 | -| source | string | no | github | ##### `repositories` -A list of repositores for which to fetch the latest release for. Only the name/repo is required, not the full URL. +A list of repositores to fetch the latest release for. Only the name/repo is required, not the full URL. A prefix can be specified for repositories hosted elsewhere such as GitLab and Docker Hub. Example: + +```yaml +repositories: + - gitlab:inkscape/inkscape + - dockerhub:glanceapp/glance +``` + +##### `show-source-icon` +Shows an icon of the source (GitHub/GitLab/Docker Hub) next to the repository name when set to `true`. ##### `token` Without authentication Github allows for up to 60 requests per hour. You can easily exceed this limit and start seeing errors if you're tracking lots of repositories or your cache time is low. To circumvent this you can [create a read only token from your Github account](https://github.com/settings/personal-access-tokens/new) and provide it here. @@ -1036,6 +1048,9 @@ and then use it in your `glance.yml` like this: This way you can safely check your `glance.yml` in version control without exposing the token. +##### `gitlab-token` +Same as the above but used when fetching GitLab releases. + ##### `limit` The maximum number of releases to show. diff --git a/docs/images/releases-widget-preview.png b/docs/images/releases-widget-preview.png index 47acfd0..ec712bb 100644 Binary files a/docs/images/releases-widget-preview.png and b/docs/images/releases-widget-preview.png differ diff --git a/internal/assets/static/main.css b/internal/assets/static/main.css index cfc96fc..7f2455b 100644 --- a/internal/assets/static/main.css +++ b/internal/assets/static/main.css @@ -468,8 +468,6 @@ kbd:active { @container widget (max-width: 750px) { .cards-grid { --cards-per-row: 3; } } @container widget (max-width: 650px) { .cards-grid { --cards-per-row: 2; } } - - .widget-error-header { display: flex; align-items: center; @@ -622,6 +620,12 @@ kbd:active { color: var(--color-text-highlight); } +.release-source-icon { + width: 16px; + height: 16px; + flex-shrink: 0; +} + .market-chart { margin-left: auto; width: 6.5rem; diff --git a/internal/assets/templates/releases.html b/internal/assets/templates/releases.html index d6a8974..078309f 100644 --- a/internal/assets/templates/releases.html +++ b/internal/assets/templates/releases.html @@ -2,14 +2,27 @@ {{ define "widget-content" }}