diff --git a/docs/configuration.md b/docs/configuration.md index bc87d30..7c416e9 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1105,11 +1105,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: @@ -1121,12 +1123,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 | ##### `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. @@ -1151,6 +1164,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 af94e64..081c64a 100644 --- a/internal/assets/static/main.css +++ b/internal/assets/static/main.css @@ -543,8 +543,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; @@ -707,6 +705,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..13e6a0d 100644 --- a/internal/assets/templates/releases.html +++ b/internal/assets/templates/releases.html @@ -2,14 +2,28 @@ {{ define "widget-content" }}