Merge branch 'dev'

This commit is contained in:
shamoon
2025-11-11 09:00:14 -08:00
8 changed files with 25 additions and 11 deletions

View File

@@ -127,7 +127,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

@@ -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

@@ -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

@@ -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

@@ -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 ? (