Compare commits

..

3 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
384eaae6c1 Fix valueOnly to apply highlighting to value only, not hide label
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2025-12-03 23:12:35 +00:00
copilot-swe-agent[bot]
40fb55ced0 Add valueOnly option to block highlighting feature
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2025-12-03 23:02:02 +00:00
copilot-swe-agent[bot]
d0fc2bcef8 Initial plan 2025-12-03 22:55:52 +00:00
6 changed files with 22 additions and 25 deletions

View File

@@ -165,11 +165,22 @@ You can optionally apply highlighting only to the value portion of a block (not
```yaml
- Sonarr:
...
icon: sonarr.png
href: http://sonarr.host.or.ip
widget:
type: sonarr
url: http://sonarr.host.or.ip
key: ${SONARR_API_KEY}
highlight:
queued:
valueOnly: true
...
numeric:
- level: danger
when: gte
value: 20
- level: warn
when: gte
value: 5
```
## Descriptions

View File

@@ -14,7 +14,7 @@ services:
- 3000:3000
volumes:
- /path/to/config:/app/config # Make sure your local config directory exists
- /var/run/docker.sock:/var/run/docker.sock:ro # (optional) For docker integrations
- /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations
environment:
HOMEPAGE_ALLOWED_HOSTS: gethomepage.dev # required, may need port. See gethomepage.dev/installation/#homepage_allowed_hosts
```
@@ -36,7 +36,7 @@ services:
- 3000:3000
volumes:
- /path/to/config:/app/config # Make sure your local config directory exists
- /var/run/docker.sock:/var/run/docker.sock:ro # (optional) For docker integrations, see alternative methods
- /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations, see alternative methods
environment:
HOMEPAGE_ALLOWED_HOSTS: gethomepage.dev # required, may need port. See gethomepage.dev/installation/#homepage_allowed_hosts
PUID: $PUID

View File

@@ -68,19 +68,7 @@ All service widgets work essentially the same, that is, homepage makes a proxied
If, after correctly adding and mapping your custom icons via the [Icons](../configs/services.md#icons) instructions, you are still unable to see your icons please try recreating your container.
## Enabling IPv6 for the homepage container
To enable IPv6 support for the homepage container, you can set the `HOSTNAME` environment variable, for example:
```yaml
services:
homepage:
...
environment:
- HOSTNAME=::
```
## Disabling IPv6 for http requests {#disabling-ipv6}
## Disabling IPv6
If you are having issues with certain widgets that are unable to reach public APIs (e.g. weather), in certain setups you may need to disable IPv6. You can set the environment variable `HOMEPAGE_PROXY_DISABLE_IPV6` to `true` to disable IPv6 for the homepage proxy.

View File

@@ -39,18 +39,16 @@ export default function Block({ value, label, field }) {
className={classNames(
"bg-theme-200/50 dark:bg-theme-900/20 rounded-sm m-1 flex-1 flex flex-col items-center justify-center text-center p-1",
value === undefined ? "animate-pulse" : "",
highlightClass,
!applyToValueOnly && highlightClass,
"service-block",
)}
data-highlight-level={highlight?.level}
data-highlight-source={highlight?.source}
>
<div className="font-thin text-sm">{value === undefined || value === null ? "-" : value}</div>
<div
className={classNames("font-bold text-xs uppercase", applyToValueOnly && "text-theme-700 dark:text-theme-200")}
>
{t(label)}
<div className={classNames("font-thin text-sm", applyToValueOnly && highlightClass)}>
{value === undefined || value === null ? "-" : value}
</div>
<div className="font-bold text-xs uppercase">{t(label)}</div>
</div>
);
}

View File

@@ -111,7 +111,7 @@ export async function servicesFromDocker() {
};
}
let substitutedVal = substituteEnvironmentVars(containerLabels[label]);
if (value === "widget.version" || /^widgets\[\d+\]\.version$/.test(value)) {
if (value === "widget.version") {
substitutedVal = parseInt(substitutedVal, 10);
}
shvl.set(constructedService, value, substitutedVal);

View File

@@ -111,7 +111,7 @@ export async function cachedRequest(url, duration = 5, ua = "homepage") {
export async function httpProxy(url, params = {}) {
const constructedUrl = new URL(url);
const disableIpv6 = process.env.HOMEPAGE_PROXY_DISABLE_IPV6 === "true";
const agentOptions = disableIpv6 ? { family: 4, autoSelectFamily: false } : { autoSelectFamilyAttemptTimeout: 500 };
const agentOptions = disableIpv6 ? { family: 4, autoSelectFamily: false } : {};
let request = null;
if (constructedUrl.protocol === "https:") {