diff --git a/assets/user.css b/assets/user.css --- a/assets/user.css +++ b/assets/user.css @@ -1,5 +1,68 @@ +.asset-icon { + display: inline-block; + flex-shrink: 0; + background-color: var(--asset-color, var(--color-primary)); + -webkit-mask: var(--asset-icon) center / contain no-repeat; + mask: var(--asset-icon) center / contain no-repeat; +} + +.widget-error-icon, +.server-icon { + width: 3rem; + height: 3rem; +} + +.indexer-status-icon { + display: block; + width: 20px; + height: 20px; +} + +.server-spicy-cpu-icon { + width: 1.2em; + height: 1.2em; + margin-left: 0.3rem; +} + +.immich-stats { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 1rem; +} + +.immich-stat { + display: flex; + align-items: center; + gap: 0.7rem; + min-width: 0; +} + +.immich-stat-icon { + width: 1.8rem; + height: 1.8rem; +} + +.immich-storage-label { + display: flex; + justify-content: space-between; + margin: 1rem 0 0.4rem; + color: var(--color-text-subdue); + font-size: var(--font-size-tiny); +} + +@container widget (max-width: 420px) { + .immich-stat { + gap: 0.4rem; + } + + .immich-stat-icon { + width: 1.4rem; + height: 1.4rem; + } +} + .monitor-site { - --access-icon: url("/assets/icons/x.svg"); + --access-icon: url("/assets/icons/status/x.svg"); --access-color: var(--color-negative); --access-tooltip: "Admin-only page."; } @@ -21,7 +84,7 @@ [href^="https://ttrss."] ) ) { - --access-icon: url("/assets/icons/check.svg"); + --access-icon: url("/assets/icons/status/check.svg"); --access-color: var(--color-positive); --access-tooltip: "User access allowed."; } @@ -36,7 +99,7 @@ [href^="https://ncps."] ) ) { - --access-icon: url("/assets/icons/warning.svg"); + --access-icon: url("/assets/icons/status/warning.svg"); --access-color: hsl(34, 95%, 55%); --access-tooltip: "Ask for account creation."; } diff --git a/config/home.yml b/config/home.yml --- a/config/home.yml +++ b/config/home.yml @@ -39,7 +39,7 @@ sites: - title: Beszel url: https://beszel.${GROUND_DOMAIN} - icon: /assets/icons/beszel.svg + icon: /assets/icons/beszel/icon.svg - title: Speedtest url: https://speedtest.${GROUND_DOMAIN} icon: /assets/icons/speedtest.svg @@ -103,7 +103,7 @@ password: ${authentik_password} - title: immich url: https://immich.${GROUND_DOMAIN} - icon: /assets/icons/immich.svg + icon: /assets/icons/immich/icon.svg - type: monitor cache: 8m @@ -208,7 +208,7 @@ sites: - title: Dockhand url: https://dockhand.${GROUND_DOMAIN} - icon: /assets/icons/dockhand.png + icon: /assets/icons/dockhand/icon.png - title: Cloudbeaver url: https://cloudbeaver.${GROUND_DOMAIN} icon: /assets/icons/cloudbeaver.svg @@ -251,7 +251,7 @@ immich-machine-learning-1: name: Immich machine learning description: Smart search, facial recognition, and metadata jobs. - icon: /assets/icons/immich.svg + icon: /assets/icons/immich/icon.svg hide: false immich-postgres-1: name: Postgres for Immich diff --git a/config/statistics.yml b/config/statistics.yml --- a/config/statistics.yml +++ b/config/statistics.yml @@ -294,10 +294,8 @@ Authorization: Bearer ${DOCKHAND_API_TOKEN} template: | @@ -322,23 +320,13 @@
Some options are not set or malformed.
{{ else }} @@ -478,17 +446,13 @@ {{ if .Bool "enable" }}Failed to fetch data (Status: {{ $indexData.Response.StatusCode }})
{{ end }} - {{ end }} - - - type: custom-api - title: Immich Stats - hide-header: true - cache: 10m - url: https://immich.${GROUND_DOMAIN}/api/server/statistics - headers: - x-api-key: ${IMMICH_API_KEY} - subrequests: - storage: - url: https://immich.${GROUND_DOMAIN}/api/server/storage - headers: - x-api-key: ${IMMICH_API_KEY} - options: - show-cards: true - show-storage-bar: true - template: | - {{ $photos := .JSON.Int "photos" }} - {{ $videos := .JSON.Int "videos" }} - {{ $usageBytes := .JSON.Int "usage" }} - {{ $usageGiB := div (toFloat $usageBytes) 1073741824.0 }} - {{ $storage := .Subrequest "storage" }} - {{ $storage_ok := and (ge $storage.Response.StatusCode 200) (le $storage.Response.StatusCode 299) }} - {{ $totalGiB := 0.0 }} - {{ $percentage := 0.0 }} - {{ $storageError := "" }} - {{ if $storage_ok }} - {{ $totalGiB = div (toFloat ($storage.JSON.Int "diskSizeRaw")) 1073741824.0 }} - {{ $percentage = $storage.JSON.Float "diskUsagePercentage" }} - {{ else }} - {{ $storageError = printf "%d %s" $storage.Response.StatusCode $storage.Response.Status }} - {{ end }} - {{ $showCards := .Options.BoolOr "show-cards" true }} - {{ $showStorageBar := .Options.BoolOr "show-storage-bar" true }} - - {{ if $showCards }} -{{ . }}
{{ end }} @@ -729,9 +600,7 @@