Compare commits

...

13 Commits

Author SHA1 Message Date
qmph22
17c9b2631e Enhancement: add net worth field for ghostfolio (#5958)
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2025-11-13 00:31:55 +00:00
Diego Barreiro Perez
1a21189643 Enhancement: Allow Disabling Indexing (#5954)
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2025-11-13 00:13:16 +00:00
shamoon
b6b428363c 1.7.0 2025-11-11 09:03:26 -08:00
shamoon
e707fa46cf Revert "Development: specify pnpm version (#5364)"
This reverts commit 0c6c40dae7.
2025-11-11 09:03:15 -08:00
shamoon
3d040362cb Merge branch 'dev' 2025-11-11 09:00:14 -08:00
github-actions[bot]
57b193b037 New Crowdin translations by GitHub Action (#5953) 2025-11-11 08:59:39 -08:00
shamoon
8a75c9b6e3 Fixhancement: improve UID support (#5963) 2025-11-11 08:56:44 -08:00
Alessandro Travi
0dafc792f7 Documentation: note support for omada controller version 6 (#5961) 2025-11-10 23:07:28 -08:00
shamoon
afc0fe29ee Fix: enforce max field blocks for esp home widget (#5951) 2025-11-08 12:32:41 -08:00
shamoon
817a9bbce5 Clarify showSummary precedence in Komodo widget docs 2025-11-05 08:44:31 -08:00
dependabot[bot]
3ef7031eb0 Chore(deps): Bump docker/setup-qemu-action from 3.6.0 to 3.7.0 (#5939) 2025-11-05 16:41:24 +00:00
shamoon
6faf32eae9 Chore: better guard against empty data in komodo widget 2025-11-05 08:32:33 -08:00
shamoon
455e86571a Chore: improve event hash generation in iCal integration (#5938) 2025-11-05 08:11:24 -08:00
17 changed files with 86 additions and 29 deletions

View File

@@ -35,6 +35,7 @@ jobs:
- name: Install pnpm - name: Install pnpm
uses: pnpm/action-setup@v4 uses: pnpm/action-setup@v4
with: with:
version: 10
run_install: false run_install: false
- name: Setup Node.js - name: Setup Node.js
@@ -93,6 +94,7 @@ jobs:
- name: Install pnpm - name: Install pnpm
uses: pnpm/action-setup@v4 uses: pnpm/action-setup@v4
with: with:
version: 10
run_install: false run_install: false
- name: Setup Node.js - name: Setup Node.js
@@ -127,7 +129,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup QEMU - name: Setup QEMU
uses: docker/setup-qemu-action@v3.6.0 uses: docker/setup-qemu-action@v3.7.0
- name: Setup Docker buildx - name: Setup Docker buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3

View File

@@ -51,6 +51,8 @@ COPY --link --from=builder --chown=1000:1000 /app/.next/static/ ./.next/static
RUN apk add --no-cache su-exec iputils-ping shadow RUN apk add --no-cache su-exec iputils-ping shadow
USER root
ENV NODE_ENV=production ENV NODE_ENV=production
ENV HOSTNAME=0.0.0.0 ENV HOSTNAME=0.0.0.0
ENV PORT=3000 ENV PORT=3000

View File

@@ -57,8 +57,8 @@ if [ -d /app/.next ]; then
fi fi
# Drop privileges (when asked to) if root, otherwise run as current user # Drop privileges (when asked to) if root, otherwise run as current user
if [ "$(id -u)" == "0" ] && [ "${PUID}" != "0" ]; then if [ "$(id -u)" = "0" ] && [ "${PUID}" != "0" ]; then
su-exec ${PUID}:${PGID} "$@" exec su-exec ${PUID}:${PGID} "$@"
else else
exec "$@" exec "$@"
fi fi

View File

@@ -571,3 +571,18 @@ or per service widget (`services.yaml`) with:
``` ```
If either value is set to true, the error message will be hidden. If either value is set to true, the error message will be hidden.
## Disable Search Engine Indexing
You can request that search engines not to index your Homepage instance by enabling the `disableIndexing` setting.
```yaml
disableIndexing: true
```
When enabled, this will:
- Disallow all crawlers in `robots.txt`
- Add `<meta name="robots" content="noindex, nofollow">` tags to prevent indexing
By default this feature is disabled.

View File

@@ -15,7 +15,7 @@ See the [official docs](https://github.com/ghostfolio/ghostfolio#authorization-b
_Note that the Bearer token is valid for 6 months, after which a new one must be generated._ _Note that the Bearer token is valid for 6 months, after which a new one must be generated._
Allowed fields: `["gross_percent_today", "gross_percent_1y", "gross_percent_max"]` Allowed fields: `["gross_percent_today", "gross_percent_1y", "gross_percent_max", "net_worth"]`
```yaml ```yaml
widget: widget:

View File

@@ -17,6 +17,6 @@ widget:
url: http://komodo.hostname.or.ip:port url: http://komodo.hostname.or.ip:port
key: K-xxxxxx... key: K-xxxxxx...
secret: S-xxxxxx... secret: S-xxxxxx...
showSummary: true # optional, default: false showSummary: true # optional, default: false. Takes precedence over showStacks
showStacks: true # optional, default: false showStacks: true # optional, default: false
``` ```

View File

@@ -3,7 +3,7 @@ title: Omada
description: Omada Widget Configuration description: Omada Widget Configuration
--- ---
The widget supports controller versions 3, 4 and 5. The widget supports controller versions 3, 4, 5 and 6.
Allowed fields: `["connectedAp", "activeUser", "alerts", "connectedGateways", "connectedSwitches"]`. Allowed fields: `["connectedAp", "activeUser", "alerts", "connectedGateways", "connectedSwitches"]`.

View File

@@ -1,6 +1,6 @@
{ {
"name": "homepage", "name": "homepage",
"version": "1.6.1", "version": "1.7.0",
"private": true, "private": true,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
@@ -63,13 +63,6 @@
"optionalDependencies": { "optionalDependencies": {
"osx-temperature-sensor": "^1.0.8" "osx-temperature-sensor": "^1.0.8"
}, },
"packageManager": "pnpm@10.8.1",
"devEngines": {
"packageManager": {
"name": "pnpm",
"version": "10.8.1"
}
},
"pnpm": { "pnpm": {
"onlyBuiltDependencies": [ "onlyBuiltDependencies": [
"osx-temperature-sensor", "osx-temperature-sensor",

View File

@@ -759,7 +759,8 @@
"ghostfolio": { "ghostfolio": {
"gross_percent_today": "Today", "gross_percent_today": "Today",
"gross_percent_1y": "One year", "gross_percent_1y": "One year",
"gross_percent_max": "All time" "gross_percent_max": "All time",
"net_worth": "Net Worth"
}, },
"audiobookshelf": { "audiobookshelf": {
"podcasts": "Podcasts", "podcasts": "Podcasts",

View File

@@ -200,10 +200,10 @@
"rutorrent": { "rutorrent": {
"active": "活动中", "active": "活动中",
"upload": "Upload", "upload": "Upload",
"download": "Download" "download": "下载"
}, },
"transmission": { "transmission": {
"download": "Download", "download": "下载",
"upload": "", "upload": "",
"leech": "Leech", "leech": "Leech",
"seed": "Seed" "seed": "Seed"
@@ -223,8 +223,8 @@
"invalid": "Invalid" "invalid": "Invalid"
}, },
"deluge": { "deluge": {
"download": "Download", "download": "下载",
"upload": "Upload", "upload": "上传",
"leech": "Leech", "leech": "Leech",
"seed": "Seed" "seed": "Seed"
}, },

View File

@@ -400,6 +400,7 @@ function Home({ initialSettings }) {
"A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations." "A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations."
} }
/> />
{settings.disableIndexing && <meta name="robots" content="noindex, nofollow" />}
{settings.base && <base href={settings.base} />} {settings.base && <base href={settings.base} />}
{settings.favicon ? ( {settings.favicon ? (
<> <>

19
src/pages/robots.txt.js Normal file
View File

@@ -0,0 +1,19 @@
import { getSettings } from "utils/config/config";
export async function getServerSideProps({ res }) {
const settings = getSettings();
const content = ["User-agent: *", !!settings.disableIndexing ? "Disallow: /" : "Allow: /"].join("\n");
res.setHeader("Content-Type", "text/plain");
res.write(content);
res.end();
return {
props: {},
};
}
export default function RobotsTxt() {
// placeholder component
return null;
}

View File

@@ -106,13 +106,19 @@ export default function Integration({ config, params, setEvents, hideErrors, tim
}; };
const eventsToAdd = []; const eventsToAdd = [];
events.forEach((event, index) => { events.forEach((event) => {
const occurrences = getOcurrencesFromRange(event); const occurrences = getOcurrencesFromRange(event);
occurrences.forEach((icalDate) => { occurrences.forEach((icalDate) => {
const date = icalDate.toJSDate(); const date = icalDate.toJSDate();
const hash = simpleHash(`${event.id}-${event.title}-${index}-${date.toString()}`); const occurrenceTimestamp = date.getTime();
const eventIdentifier =
event.id ??
simpleHash(
`${event.title ?? ""}-${event.type ?? ""}-${event.status ?? ""}-${event.url ?? ""}-${event.location ?? ""}`,
);
const hash = simpleHash(`${eventIdentifier}-${occurrenceTimestamp}`);
let title = event.title; let title = event.title;
if (showName) { if (showName) {

View File

@@ -14,6 +14,12 @@ export default function Component({ service }) {
return <Container service={service} error={resultError} />; return <Container service={service} error={resultError} />;
} }
if (!widget.fields || widget.fields.length === 0) {
widget.fields = ["online", "offline", "offline_alt", "total"];
} else if (widget.fields.length > 4) {
widget.fields = widget.fields.slice(0, 4);
}
if (!resultData) { if (!resultData) {
return ( return (
<Container service={service}> <Container service={service}>

View File

@@ -20,13 +20,15 @@ function getPerformancePercent(t, performanceRange) {
export default function Component({ service }) { export default function Component({ service }) {
const { t } = useTranslation(); const { t } = useTranslation();
const { widget } = service; const { widget } = service;
const includeNetWorth = widget.fields?.includes("net_worth");
const { data: performanceToday, error: ghostfolioErrorToday } = useWidgetAPI(widget, "today"); const { data: performanceToday, error: ghostfolioErrorToday } = useWidgetAPI(widget, "today");
const { data: performanceYear, error: ghostfolioErrorYear } = useWidgetAPI(widget, "year"); const { data: performanceYear, error: ghostfolioErrorYear } = useWidgetAPI(widget, "year");
const { data: performanceMax, error: ghostfolioErrorMax } = useWidgetAPI(widget, "max"); const { data: performanceMax, error: ghostfolioErrorMax } = useWidgetAPI(widget, "max");
const { data: userInfo, error: ghostfolioErrorUserInfo } = useWidgetAPI(widget, includeNetWorth ? "userInfo" : "");
if (ghostfolioErrorToday || ghostfolioErrorYear || ghostfolioErrorMax) { if (ghostfolioErrorToday || ghostfolioErrorYear || ghostfolioErrorMax || ghostfolioErrorUserInfo) {
const finalError = ghostfolioErrorToday ?? ghostfolioErrorYear ?? ghostfolioErrorMax; const finalError = ghostfolioErrorToday ?? ghostfolioErrorYear ?? ghostfolioErrorMax ?? ghostfolioErrorUserInfo;
return <Container service={service} error={finalError} />; return <Container service={service} error={finalError} />;
} }
@@ -34,12 +36,13 @@ export default function Component({ service }) {
return <Container service={service} error={performanceToday} />; return <Container service={service} error={performanceToday} />;
} }
if (!performanceToday || !performanceYear || !performanceMax) { if (!performanceToday || !performanceYear || !performanceMax || (includeNetWorth && !userInfo)) {
return ( return (
<Container service={service}> <Container service={service}>
<Block label="ghostfolio.gross_percent_today" /> <Block label="ghostfolio.gross_percent_today" />
<Block label="ghostfolio.gross_percent_1y" /> <Block label="ghostfolio.gross_percent_1y" />
<Block label="ghostfolio.gross_percent_max" /> <Block label="ghostfolio.gross_percent_max" />
{includeNetWorth && <Block label="ghostfolio.net_worth" />}
</Container> </Container>
); );
} }
@@ -49,6 +52,12 @@ export default function Component({ service }) {
<Block label="ghostfolio.gross_percent_today" value={getPerformancePercent(t, performanceToday)} /> <Block label="ghostfolio.gross_percent_today" value={getPerformancePercent(t, performanceToday)} />
<Block label="ghostfolio.gross_percent_1y" value={getPerformancePercent(t, performanceYear)} /> <Block label="ghostfolio.gross_percent_1y" value={getPerformancePercent(t, performanceYear)} />
<Block label="ghostfolio.gross_percent_max" value={getPerformancePercent(t, performanceMax)} /> <Block label="ghostfolio.gross_percent_max" value={getPerformancePercent(t, performanceMax)} />
{includeNetWorth && (
<Block
label="ghostfolio.net_worth"
value={`${performanceToday.performance.currentNetWorth.toFixed(2)} ${userInfo?.settings?.currency ?? ""}`}
/>
)}
</Container> </Container>
); );
} }

View File

@@ -1,18 +1,21 @@
import credentialedProxyHandler from "utils/proxy/handlers/credentialed"; import credentialedProxyHandler from "utils/proxy/handlers/credentialed";
const widget = { const widget = {
api: "{url}/api/v2/portfolio/performance?range={endpoint}", api: "{url}/api/{endpoint}",
proxyHandler: credentialedProxyHandler, proxyHandler: credentialedProxyHandler,
mappings: { mappings: {
today: { today: {
endpoint: "1d", endpoint: "v2/portfolio/performance?range=1d",
}, },
year: { year: {
endpoint: "1y", endpoint: "v2/portfolio/performance?range=1y",
}, },
max: { max: {
endpoint: "max", endpoint: "v2/portfolio/performance?range=max",
},
userInfo: {
endpoint: "v1/user",
}, },
}, },
}; };

View File

@@ -32,7 +32,7 @@ export default function Component({ service }) {
if ( if (
(!widget.showStacks && !containersData) || (!widget.showStacks && !containersData) ||
(widget.showSummary && (!stacksData || !serversData)) || (widget.showSummary && (!containersData || !stacksData || !serversData)) ||
(widget.showStacks && !stacksData) (widget.showStacks && !stacksData)
) { ) {
return widget.showSummary ? ( return widget.showSummary ? (