From 6753eeb822e25f7971c810ea859e04973e83521f Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sat, 11 Nov 2023 15:34:30 +0100 Subject: [PATCH 01/33] =?UTF-8?q?=F0=9F=90=9B=20Add=20rm=20commands=20befo?= =?UTF-8?q?re=20move=20command=20(#1586)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/run.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/run.sh b/scripts/run.sh index 3f1651783..61deab801 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -2,8 +2,11 @@ echo "Exporting hostname..." export NEXTAUTH_URL_INTERNAL="http://$HOSTNAME:7575" +rm -rf _node_modules mv node_modules _node_modules +rm -rf node_modules mv node_modules_migrate node_modules + echo "Migrating database..." yarn ts-node src/migrate.ts & PID=$! # Wait for migration to finish @@ -14,8 +17,11 @@ echo "Reverting to production node_modules..." cp /app/node_modules/better-sqlite3/build/Release/better_sqlite3.node /app/_node_modules/better-sqlite3/build/Release/better_sqlite3.node # Remove node_modules and copy cached node_modules +rm -rf node_modules_migrate mv node_modules node_modules_migrate -mv _node_modules node_modules +rm -rf node_modules +mv _node_modules node_modules + cp ./temp_package.json package.json cp ./temp_yarn.lock yarn.lock From 351aa47e47af7133bfc51b4713f597087a6b878d Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sat, 11 Nov 2023 15:34:50 +0100 Subject: [PATCH 02/33] =?UTF-8?q?=F0=9F=90=9B=20Logo=20has=20no=20height?= =?UTF-8?q?=20and=20object-fit=20is=20not=20contain=20#1581=20(#1584)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/Common/Logo.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/layout/Common/Logo.tsx b/src/components/layout/Common/Logo.tsx index 891ea36d7..d572a30ac 100644 --- a/src/components/layout/Common/Logo.tsx +++ b/src/components/layout/Common/Logo.tsx @@ -18,6 +18,12 @@ export function Logo({ size = 'md', withoutText = false }: LogoProps) { Homarr Logo Date: Sat, 11 Nov 2023 16:47:21 +0100 Subject: [PATCH 03/33] =?UTF-8?q?=F0=9F=90=9B=20Allow=20anonymous=20condit?= =?UTF-8?q?ion=20for=20default=20board=20(#1588)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/board/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/board/index.tsx b/src/pages/board/index.tsx index df32ce8e8..94c8d2e4e 100644 --- a/src/pages/board/index.tsx +++ b/src/pages/board/index.tsx @@ -41,7 +41,11 @@ export const getServerSideProps: GetServerSideProps = a ); const config = await getFrontendConfig(boardName); - const result = checkForSessionOrAskForLogin(ctx, session, () => true); + const result = checkForSessionOrAskForLogin( + ctx, + session, + () => config.settings.access.allowGuests || session?.user != undefined + ); if (result) { return result; } From e9aef7481556f2cface592a93d7de58515097034 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sat, 11 Nov 2023 16:49:35 +0100 Subject: [PATCH 04/33] =?UTF-8?q?=F0=9F=90=9B=20Placeholder=20width=20stre?= =?UTF-8?q?tches=20out=20of=20screen=20(#1587)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/global.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/global.scss b/src/styles/global.scss index 2702181b5..a4332a8bb 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -42,7 +42,7 @@ } .grid-stack>.grid-stack-item { - min-width: calc(percentage(1) * #{var(--gridstack-widget-width)}); + min-width: #{var(--gridstack-widget-width)}; } // Styling for sidebar grid-stack elements From 2a1f73345c42f3b6e101c7ed2aacf0bcf93803ea Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sun, 12 Nov 2023 01:02:26 +0100 Subject: [PATCH 05/33] =?UTF-8?q?=F0=9F=9A=A7=20Improve=20dockerfile=20and?= =?UTF-8?q?=20start=20script=20and=20fix=20permission=20issue=20by=20addin?= =?UTF-8?q?g=20new=20user=20with=20permission=20to=20read=20/=20write=20to?= =?UTF-8?q?=20/data=20folder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 30 +++++++++++++++++++++++++---- {src => drizzle/migrate}/migrate.ts | 5 ++++- drizzle/migrate/package.json | 13 +++++++++++++ package.json | 4 ++-- scripts/run.sh | 19 +----------------- yarn.lock | 4 ++-- 6 files changed, 48 insertions(+), 27 deletions(-) rename {src => drizzle/migrate}/migrate.ts (79%) create mode 100644 drizzle/migrate/package.json diff --git a/Dockerfile b/Dockerfile index 621472736..e886469c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,11 @@ FROM node:20.5-slim WORKDIR /app +ARG UID=1001 +ARG GID=1001 +RUN groupadd -g $GID homarr-group +RUN useradd -r -u $UID -g $GID homarr + # Define node.js environment variables ARG PORT=7575 @@ -18,17 +23,30 @@ COPY .next/standalone ./ COPY .next/static ./.next/static COPY ./scripts/run.sh ./scripts/run.sh COPY ./drizzle ./drizzle + +COPY ./drizzle/migrate ./migrate +COPY ./tsconfig.json ./migrate/tsconfig.json + RUN mkdir /data -COPY ./src/migrate.ts ./src/migrate.ts +RUN chown -R homarr:homarr-group /data # Install dependencies RUN apt-get update -y && apt-get install -y openssl wget -# Required for migration +# Move node_modules to temp location to avoid overwriting RUN mv node_modules _node_modules RUN rm package.json -RUN yarn add typescript ts-node dotenv drizzle-orm@0.28.6 better-sqlite3@8.6.0 @types/better-sqlite3 -RUN mv node_modules node_modules_migrate + +# Install dependencies for migration +RUN cp ./migrate/package.json ./package.json +RUN yarn + +# Copy better_sqlite3 build for current platform +RUN cp /app/node_modules/better-sqlite3/build/Release/better_sqlite3.node /app/_node_modules/better-sqlite3/build/Release/better_sqlite3.node + +# Copy node_modules for migration to migrate folder for migration script +RUN mv node_modules ./migrate/node_modules +# Copy temp node_modules of app to app folder RUN mv _node_modules node_modules # Expose the default application port @@ -43,4 +61,8 @@ ENV NEXTAUTH_SECRET NOT_IN_USE_BECAUSE_JWTS_ARE_UNUSED HEALTHCHECK --interval=10s --timeout=5s --start-period=5s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT} || exit 1 +USER homarr + CMD ["sh", "./scripts/run.sh"] + +# TEMPORARY: "db:migrate": "ts-node ./migrate.ts ../drizzle" \ No newline at end of file diff --git a/src/migrate.ts b/drizzle/migrate/migrate.ts similarity index 79% rename from src/migrate.ts rename to drizzle/migrate/migrate.ts index 5c4abeb88..19ef33fac 100644 --- a/src/migrate.ts +++ b/drizzle/migrate/migrate.ts @@ -5,6 +5,9 @@ import dotenv from 'dotenv'; import { drizzle } from 'drizzle-orm/better-sqlite3'; import { migrate } from 'drizzle-orm/better-sqlite3/migrator'; +// TODO: Remove +// const migrationsFolder = process.argv[2] ?? './drizzle'; + dotenv.config({ path: __dirname + '/../.env' }); const sqlite = new Database(process.env.DATABASE_URL!.replace('file:', '')); @@ -12,7 +15,7 @@ const sqlite = new Database(process.env.DATABASE_URL!.replace('file:', '')); const db = drizzle(sqlite); const migrateDatabase = async () => { - await migrate(db, { migrationsFolder: './drizzle' }); + await migrate(db, { migrationsFolder: '../drizzle' }); }; migrateDatabase(); diff --git a/drizzle/migrate/package.json b/drizzle/migrate/package.json new file mode 100644 index 000000000..81e54f623 --- /dev/null +++ b/drizzle/migrate/package.json @@ -0,0 +1,13 @@ +{ + "scripts": { + "db:migrate": "ts-node ./migrate.ts" + }, + "dependencies": { + "@types/better-sqlite3": "^7.6.7", + "better-sqlite3": "8.6.0", + "drizzle-orm": "^0.28.6", + "dotenv": "^16.3.1", + "ts-node": "^10.9.1", + "typescript": "^5.2.2" + } +} \ No newline at end of file diff --git a/package.json b/package.json index 9a480b3da..40e1b635a 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "test:coverage": "SKIP_ENV_VALIDATION=1 vitest run --coverage", "docker:build": "turbo build && docker build . -t homarr:local-dev", "docker:start": "docker run -p 7575:7575 --name homarr-development homarr:local-dev", - "db:migrate": "ts-node src/migrate.ts" + "db:migrate": "ts-node drizzle/migrate/migrate.ts" }, "dependencies": { "@auth/drizzle-adapter": "^0.3.2", @@ -232,4 +232,4 @@ ] } } -} +} \ No newline at end of file diff --git a/scripts/run.sh b/scripts/run.sh index 61deab801..01e80d0e8 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -2,28 +2,11 @@ echo "Exporting hostname..." export NEXTAUTH_URL_INTERNAL="http://$HOSTNAME:7575" -rm -rf _node_modules -mv node_modules _node_modules -rm -rf node_modules -mv node_modules_migrate node_modules echo "Migrating database..." -yarn ts-node src/migrate.ts & PID=$! +cd ./migrate; yarn db:migrate & PID=$! # Wait for migration to finish wait $PID -echo "Reverting to production node_modules..." -# Copy specific sqlite3 binary to node_modules -cp /app/node_modules/better-sqlite3/build/Release/better_sqlite3.node /app/_node_modules/better-sqlite3/build/Release/better_sqlite3.node - -# Remove node_modules and copy cached node_modules -rm -rf node_modules_migrate -mv node_modules node_modules_migrate -rm -rf node_modules -mv _node_modules node_modules - -cp ./temp_package.json package.json -cp ./temp_yarn.lock yarn.lock - echo "Starting production server..." node /app/server.js \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0979a03e7..610855e04 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7152,7 +7152,7 @@ __metadata: rss-parser: ^3.12.0 sabnzbd-api: ^1.5.0 sass: ^1.56.1 - ts-node: latest + ts-node: ^10.9.1 turbo: ^1.10.12 typescript: 5.1.6 uuid: ^9.0.0 @@ -11590,7 +11590,7 @@ __metadata: languageName: node linkType: hard -"ts-node@npm:latest": +"ts-node@npm:^10.9.1": version: 10.9.1 resolution: "ts-node@npm:10.9.1" dependencies: From e1b4d76133aa8a7800d74758b653b339ac13ba87 Mon Sep 17 00:00:00 2001 From: Lumilias <10852161+Lumilias@users.noreply.github.com> Date: Sat, 11 Nov 2023 18:55:58 -0600 Subject: [PATCH 06/33] corrected a typo --- public/locales/en/tools/docker.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/locales/en/tools/docker.json b/public/locales/en/tools/docker.json index 95c67f0d8..c9ea3b635 100644 --- a/public/locales/en/tools/docker.json +++ b/public/locales/en/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Your Homarr instance does not have Docker configured or it has falied to fetch containers. Please check the documentation on how to set up the integration." + "text": "Your Homarr instance does not have Docker configured or it has failed to fetch containers. Please check the documentation on how to set up the integration." } }, "modals": { From d7cdd6a30b47ba69ca37404685087562942b9c04 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sun, 12 Nov 2023 11:20:22 +0100 Subject: [PATCH 07/33] =?UTF-8?q?=F0=9F=90=9B=20Cleanup=20changes,=20Local?= =?UTF-8?q?=20db:migrate=20script=20not=20working,=20CI=20failed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 +--- drizzle/migrate/migrate.ts | 5 ++--- drizzle/migrate/package.json | 1 + package.json | 5 +++-- yarn.lock | 30 ++++++++++++++++++++++++++---- 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index e886469c4..22dd3ccd3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,6 +63,4 @@ HEALTHCHECK --interval=10s --timeout=5s --start-period=5s --retries=3 \ USER homarr -CMD ["sh", "./scripts/run.sh"] - -# TEMPORARY: "db:migrate": "ts-node ./migrate.ts ../drizzle" \ No newline at end of file +CMD ["sh", "./scripts/run.sh"] \ No newline at end of file diff --git a/drizzle/migrate/migrate.ts b/drizzle/migrate/migrate.ts index 19ef33fac..cacf32fe8 100644 --- a/drizzle/migrate/migrate.ts +++ b/drizzle/migrate/migrate.ts @@ -5,8 +5,7 @@ import dotenv from 'dotenv'; import { drizzle } from 'drizzle-orm/better-sqlite3'; import { migrate } from 'drizzle-orm/better-sqlite3/migrator'; -// TODO: Remove -// const migrationsFolder = process.argv[2] ?? './drizzle'; +const migrationsFolder = process.argv[2] ?? '../drizzle'; dotenv.config({ path: __dirname + '/../.env' }); @@ -15,7 +14,7 @@ const sqlite = new Database(process.env.DATABASE_URL!.replace('file:', '')); const db = drizzle(sqlite); const migrateDatabase = async () => { - await migrate(db, { migrationsFolder: '../drizzle' }); + await migrate(db, { migrationsFolder }); }; migrateDatabase(); diff --git a/drizzle/migrate/package.json b/drizzle/migrate/package.json index 81e54f623..35772f216 100644 --- a/drizzle/migrate/package.json +++ b/drizzle/migrate/package.json @@ -1,4 +1,5 @@ { + "description": "This package.json is used for the migration script the dependencies are only installed within the Dockerfile.", "scripts": { "db:migrate": "ts-node ./migrate.ts" }, diff --git a/package.json b/package.json index 40e1b635a..6881f6041 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "test:coverage": "SKIP_ENV_VALIDATION=1 vitest run --coverage", "docker:build": "turbo build && docker build . -t homarr:local-dev", "docker:start": "docker run -p 7575:7575 --name homarr-development homarr:local-dev", - "db:migrate": "ts-node drizzle/migrate/migrate.ts" + "db:migrate": "dotenv ts-node drizzle/migrate/migrate.ts ./drizzle" }, "dependencies": { "@auth/drizzle-adapter": "^0.3.2", @@ -127,6 +127,7 @@ "@vitest/coverage-c8": "^0.33.0", "@vitest/coverage-v8": "^0.34.5", "@vitest/ui": "^0.34.4", + "dotenv-cli": "^7.3.0", "eslint": "^8.0.1", "eslint-config-next": "^13.4.5", "eslint-plugin-promise": "^6.0.0", @@ -232,4 +233,4 @@ ] } } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 610855e04..e000ebb4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4754,7 +4754,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -5346,7 +5346,28 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:^16.3.1": +"dotenv-cli@npm:^7.3.0": + version: 7.3.0 + resolution: "dotenv-cli@npm:7.3.0" + dependencies: + cross-spawn: ^7.0.3 + dotenv: ^16.3.0 + dotenv-expand: ^10.0.0 + minimist: ^1.2.6 + bin: + dotenv: cli.js + checksum: bc48e9872ed451aa7633cfde0079f5e4b40837d49dca4eab947682c80f524bd1e63ec31ff69b7cf955ff969185a05a343dd5d754dd5569e4ae31f8e9a790ab1b + languageName: node + linkType: hard + +"dotenv-expand@npm:^10.0.0": + version: 10.0.0 + resolution: "dotenv-expand@npm:10.0.0" + checksum: 2a38b470efe0abcb1ac8490421a55e1d764dc9440fd220942bce40965074f3fb00b585f4346020cb0f0f219966ee6b4ee5023458b3e2953fe5b3214de1b314ee + languageName: node + linkType: hard + +"dotenv@npm:^16.3.0, dotenv@npm:^16.3.1": version: 16.3.1 resolution: "dotenv@npm:16.3.1" checksum: 15d75e7279018f4bafd0ee9706593dd14455ddb71b3bcba9c52574460b7ccaf67d5cf8b2c08a5af1a9da6db36c956a04a1192b101ee102a3e0cf8817bbcf3dfd @@ -7120,6 +7141,7 @@ __metadata: dayjs: ^1.11.7 dockerode: ^3.3.2 dotenv: ^16.3.1 + dotenv-cli: ^7.3.0 drizzle-kit: ^0.19.13 drizzle-orm: ^0.28.6 eslint: ^8.0.1 @@ -7152,7 +7174,7 @@ __metadata: rss-parser: ^3.12.0 sabnzbd-api: ^1.5.0 sass: ^1.56.1 - ts-node: ^10.9.1 + ts-node: latest turbo: ^1.10.12 typescript: 5.1.6 uuid: ^9.0.0 @@ -11590,7 +11612,7 @@ __metadata: languageName: node linkType: hard -"ts-node@npm:^10.9.1": +"ts-node@npm:latest": version: 10.9.1 resolution: "ts-node@npm:10.9.1" dependencies: From 173727c155b04a2abf5e3a709648ded76100dff3 Mon Sep 17 00:00:00 2001 From: ajnart Date: Sun, 12 Nov 2023 10:04:13 +0100 Subject: [PATCH 08/33] =?UTF-8?q?=F0=9F=90=B3=20Fix=20docker=20TCP=20not?= =?UTF-8?q?=20working?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes Lost docker connection via TCP with 0.14.0 update #1577 --- src/server/api/routers/docker/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/api/routers/docker/router.ts b/src/server/api/routers/docker/router.ts index 942d31b05..44b2a35da 100644 --- a/src/server/api/routers/docker/router.ts +++ b/src/server/api/routers/docker/router.ts @@ -10,7 +10,7 @@ const dockerActionSchema = z.enum(['remove', 'start', 'stop', 'restart']); export const dockerRouter = createTRPCRouter({ containers: adminProcedure.query(async () => { try { - const docker = DockerSingleton.getInstance(); + const docker = new Dockerode({}); const containers = await docker.listContainers({ all: true }); return containers; } catch (err) { From 27037c6f50b845f0603a1660a51e09730b018f9c Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Sun, 12 Nov 2023 13:37:32 +0100 Subject: [PATCH 09/33] =?UTF-8?q?=E2=9C=A8=20Image=20properties=20customiz?= =?UTF-8?q?ation=20(#1590)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customization/page-appearance.json | 23 +++++++++++++++ .../Appearance/AppearanceCustomization.tsx | 29 ++++++++++++++++++- .../layout/Templates/BoardLayout.tsx | 11 ++++--- src/pages/board/[slug]/customize.tsx | 7 +++-- src/server/api/routers/config.ts | 5 +++- src/types/settings.ts | 9 ++++++ src/validations/boards.ts | 4 +++ 7 files changed, 78 insertions(+), 10 deletions(-) diff --git a/public/locales/en/settings/customization/page-appearance.json b/public/locales/en/settings/customization/page-appearance.json index 36d24c33c..b3f380bf2 100644 --- a/public/locales/en/settings/customization/page-appearance.json +++ b/public/locales/en/settings/customization/page-appearance.json @@ -18,6 +18,29 @@ "background": { "label": "Background" }, + "backgroundImageAttachment": { + "label": "Background image attachment", + "options": { + "fixed": "Fixed - Background stays in the same position (recommended)", + "scroll": "Scroll - Background scrolls with your mouse" + } + }, + "backgroundImageSize": { + "label": "Background image size", + "options": { + "cover": "Cover - Scales the image as small as possible to cover the entire window by cropping excessive space. (recommended)", + "contain": "Contain - Scales the image as large as possible within its container without cropping or stretching the image." + } + }, + "backgroundImageRepeat": { + "label": "Background image attachment", + "options": { + "repeat": "Repeat - The image is repeated as much as needed to cover the whole background image painting area.", + "no-repeat": "No repeat - The image is not repeated any may not fill the entire space (recommended)", + "repeat-x": "Repeat X - Same as 'Repeat' but only on horizontal axis.", + "repeat-y": "Repeat Y - Same as 'Repeat' but only on vertical axis." + } + }, "customCSS": { "label": "Custom CSS", "description": "Further, customize your dashboard using CSS, only recommended for experienced users", diff --git a/src/components/Board/Customize/Appearance/AppearanceCustomization.tsx b/src/components/Board/Customize/Appearance/AppearanceCustomization.tsx index 248f4e855..4f1411124 100644 --- a/src/components/Board/Customize/Appearance/AppearanceCustomization.tsx +++ b/src/components/Board/Customize/Appearance/AppearanceCustomization.tsx @@ -4,9 +4,9 @@ import { Group, Input, MantineTheme, + Select, Slider, Stack, - Text, TextInput, createStyles, rem, @@ -16,6 +16,7 @@ import { useTranslation } from 'next-i18next'; import { highlight, languages } from 'prismjs'; import Editor from 'react-simple-code-editor'; import { useColorTheme } from '~/tools/color'; +import { BackgroundImageAttachment, BackgroundImageRepeat, BackgroundImageSize } from '~/types/settings'; import { useBoardCustomizationFormContext } from '../form'; @@ -30,6 +31,32 @@ export const AppearanceCustomization = () => { placeholder="/imgs/backgrounds/background.png" {...form.getInputProps('appearance.backgroundSrc')} /> + ({ + value: size, + label: t(`backgroundImageSize.options.${size}`) as string, + }))} + {...form.getInputProps('appearance.backgroundImageSize')} + /> + +

Read the documentation

  • Add your first app

  • Resize and drag your app to a different position

  • Add the clock widget to your dashboard

  • Create a new user

  • " + }, + "area": { + "type": "wrapper", + "properties": { + "id": "default" + } + }, + "shape": { + "sm": { + "location": { + "x": 0, + "y": 0 + }, + "size": { + "width": 3, + "height": 2 + } + }, + "md": { + "location": { + "x": 0, + "y": 0 + }, + "size": { + "width": 3, + "height": 4 + } + }, + "lg": { + "location": { + "x": 0, + "y": 1 + }, + "size": { + "width": 6, + "height": 3 + } + } + } + } + ], + "settings": { + "common": { + "searchEngine": { + "type": "google", + "properties": {} + } + }, + "customization": { + "layout": { + "enabledLeftSidebar": false, + "enabledRightSidebar": false, + "enabledDocker": false, + "enabledPing": false, + "enabledSearchbar": true + }, + "pageTitle": "Homarr ⭐️", + "logoImageUrl": "/imgs/logo/logo.png", + "faviconUrl": "/imgs/favicon/favicon-squared.png", + "backgroundImageUrl": "", + "customCss": "", + "colors": { + "primary": "red", + "secondary": "yellow", + "shade": 7 + }, + "appOpacity": 100, + "gridstack": { + "columnCountSmall": 3, + "columnCountMedium": 6, + "columnCountLarge": 10 + } + }, + "access": { + "allowGuests": false + } + } +} \ No newline at end of file diff --git a/scripts/run.sh b/scripts/run.sh index 01e80d0e8..67c5cb508 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -9,4 +9,6 @@ cd ./migrate; yarn db:migrate & PID=$! wait $PID echo "Starting production server..." -node /app/server.js \ No newline at end of file +node /app/server.js & PID=$! + +wait $PID \ No newline at end of file diff --git a/src/components/Onboarding/database-not-writeable.tsx b/src/components/Onboarding/database-not-writeable.tsx new file mode 100644 index 000000000..ac1e92527 --- /dev/null +++ b/src/components/Onboarding/database-not-writeable.tsx @@ -0,0 +1,42 @@ +import { Center, Code, List, Stack, Text, Title } from '@mantine/core'; +import Head from 'next/head'; + +export const DatabaseNotWriteable = ({ error, errorMessage }: { error: any | unknown, errorMessage: string | undefined }) => { + return ( + <> + + Onboard - Error • Homarr + + +
    + + + Critical error while starting Homarr + + + We detected that Homarr is unable to write to the database. Please troubleshoot using + the following steps: + + + + Ensure that you mounted the path /data to a writeable location with + enough disk space. For this, you must add the following mounting point to your docker + compose: {' - /data:/data'} + + + Ensure that you followed the installation instructions at{' '} + + https://homarr.dev/docs/introduction/installation + + + + {error && JSON.stringify(error)} + + {errorMessage && ( + {errorMessage} + )} + +
    + + ); +}; diff --git a/src/middleware.ts b/src/middleware.ts index 63e2b45d0..ee139deca 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -47,11 +47,5 @@ const shouldRedirectToOnboard = async (): Promise => { return cachedUserCount === 0; }; - if (!process.env.DATABASE_URL?.startsWith('file:')) { - return await cacheAndGetUserCount(); - } - - const fileUri = process.env.DATABASE_URL.substring(4); return await cacheAndGetUserCount(); - // TODO: Show an error page if the database file is read-only }; diff --git a/src/pages/onboard.tsx b/src/pages/onboard.tsx index 01c248131..ab7b4b55d 100644 --- a/src/pages/onboard.tsx +++ b/src/pages/onboard.tsx @@ -1,19 +1,28 @@ -import { Box, Button, Center, Image, Stack, Text, Title, useMantineTheme } from '@mantine/core'; +import { Button, Center, Image, Stack, Text, Title, useMantineTheme } from '@mantine/core'; import { useDisclosure } from '@mantine/hooks'; import { IconArrowRight } from '@tabler/icons-react'; +import Consola from 'consola'; import fs from 'fs'; +import fsPromises from 'fs/promises'; import { GetServerSideProps, InferGetServerSidePropsType } from 'next'; import Head from 'next/head'; +import { DatabaseNotWriteable } from '~/components/Onboarding/database-not-writeable'; import { OnboardingSteps } from '~/components/Onboarding/onboarding-steps'; import { ThemeSchemeToggle } from '~/components/ThemeSchemeToggle/ThemeSchemeToggle'; import { FloatingBackground } from '~/components/layout/Background/FloatingBackground'; -import { db } from '~/server/db'; +import { env } from '~/env'; import { getTotalUserCountAsync } from '~/server/db/queries/user'; import { getConfig } from '~/tools/config/getConfig'; import { getServerSideTranslations } from '~/tools/server/getServerSideTranslations'; +const util = require('util'); +const exec = util.promisify(require('child_process').exec); + export default function OnboardPage({ configSchemaVersions, + databaseNotWriteable, + error, + errorMessage }: InferGetServerSidePropsType) { const { fn, colors, colorScheme } = useMantineTheme(); const background = colorScheme === 'dark' ? 'dark.6' : 'gray.1'; @@ -39,29 +48,35 @@ export default function OnboardPage({ - {onboardingSteps ? ( - + {databaseNotWriteable == true ? ( + ) : ( -
    - - - Welcome to Homarr! - - - Your favorite dashboard has received a big upgrade. -
    - We'll help you update within the next few steps -
    + <> + {onboardingSteps ? ( + + ) : ( +
    + + + Welcome to Homarr! + + + Your favorite dashboard has received a big upgrade. +
    + We'll help you update within the next few steps +
    - -
    -
    + +
    +
    + )} + )} @@ -87,10 +102,65 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { ctx.res ); + if (env.DATABASE_URL.startsWith('file:')) { + const rawDatabaseUrl = env.DATABASE_URL.substring('file:'.length); + Consola.info( + `Instance is using a database on the file system. Checking if file '${rawDatabaseUrl}' is writable...` + ); + try { + await fsPromises.access(rawDatabaseUrl, fs.constants.W_OK); + } catch (error) { + // this usually occurs when the database path is not mounted in Docker + Consola.error(`Database '${rawDatabaseUrl}' is not writable.`, error); + return { + props: { + ...translations, + configSchemaVersions: configSchemaVersions, + databaseNotWriteable: true, + error: error, + }, + }; + } + Consola.info('Database is writeable'); + + if (process.platform !== 'win32') { + try { + const { stdout, stderr } = await exec("mount | grep '/data'"); + + if (stderr.split('\n').length > 1 || stdout.split('\n').length <= 1) { + Consola.error(`Database at '${rawDatabaseUrl}' has not been mounted: ${stdout.replace('\n', '\\n')} ${stderr.replace('\n', '\\n')}`); + return { + props: { + ...translations, + configSchemaVersions: configSchemaVersions, + databaseNotWriteable: true, + error: `Database at '${rawDatabaseUrl}' is not mounted:\n${stdout}`, + }, + }; + } + } catch (error) { + const errorMessage = `Database at '${rawDatabaseUrl}' has not been mounted: ${error}`; + Consola.error(errorMessage); + return { + props: { + ...translations, + configSchemaVersions: configSchemaVersions, + databaseNotWriteable: true, + error: error, + errorMessage: errorMessage + }, + }; + } + } + + Consola.info(`Database at '${rawDatabaseUrl}' is writeable and mounted`); + } + return { props: { ...translations, configSchemaVersions: configSchemaVersions, + databaseNotWriteable: false }, }; }; diff --git a/src/tools/config/getFallbackConfig.ts b/src/tools/config/getFallbackConfig.ts index cbb760743..dbc74888e 100644 --- a/src/tools/config/getFallbackConfig.ts +++ b/src/tools/config/getFallbackConfig.ts @@ -1,6 +1,6 @@ import { ConfigType } from '~/types/config'; -import defaultConfig from '../../../data/configs/default.json'; +import defaultConfig from '../../../data/default.json'; export const getFallbackConfig = (name?: string) => ({ ...defaultConfig, From a1e8ffc367671aef3226574a130d19f5ed15fb16 Mon Sep 17 00:00:00 2001 From: Tagaishi Date: Mon, 13 Nov 2023 20:07:00 +0100 Subject: [PATCH 17/33] =?UTF-8?q?=F0=9F=90=9B=20Logo=20header=20size=20fix?= =?UTF-8?q?=20(#1625)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/Common/Logo.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/layout/Common/Logo.tsx b/src/components/layout/Common/Logo.tsx index d572a30ac..25a8c5bbf 100644 --- a/src/components/layout/Common/Logo.tsx +++ b/src/components/layout/Common/Logo.tsx @@ -17,8 +17,8 @@ export function Logo({ size = 'md', withoutText = false }: LogoProps) { return ( Date: Mon, 13 Nov 2023 20:20:35 +0100 Subject: [PATCH 18/33] Update crowdin data --- data/crowdin-report.json | 644 ++++++++++++++++++++++----------------- 1 file changed, 370 insertions(+), 274 deletions(-) diff --git a/data/crowdin-report.json b/data/crowdin-report.json index d1a889f03..dc43a0c17 100644 --- a/data/crowdin-report.json +++ b/data/crowdin-report.json @@ -1,6 +1,6 @@ { "name": "homarr Top Members Report", - "url": "https://crowdin.com/project/homarr", + "url": "https://translate.homarr.dev/project/homarr", "unit": "words", "dateRange": { "from": "2022-08-25", @@ -8,28 +8,6 @@ }, "language": "All", "data": [ - { - "user": { - "id": "15492732", - "username": "hillaliy", - "fullName": "Yossi Hillali (hillaliy)", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15492732/medium/0bae17b421604892d888e3fc70cf0587.jpeg", - "joined": "2022-10-15 15:18:50" - }, - "languages": [ - { - "id": "he", - "name": "Hebrew" - } - ], - "translated": 5404, - "target": 4717, - "approved": 5437, - "voted": 0, - "positiveVotes": 12, - "negativeVotes": 0, - "winning": 5395 - }, { "user": { "id": "15491798", @@ -44,13 +22,57 @@ "name": "Danish" } ], - "translated": 5353, - "target": 5159, - "approved": 5371, + "translated": 5893, + "target": 5686, + "approved": 5911, "voted": 0, "positiveVotes": 0, "negativeVotes": 0, - "winning": 5353 + "winning": 5893 + }, + { + "user": { + "id": "15492732", + "username": "hillaliy", + "fullName": "Yossi Hillali (hillaliy)", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15492732/medium/0bae17b421604892d888e3fc70cf0587.jpeg", + "joined": "2022-10-15 15:18:50" + }, + "languages": [ + { + "id": "he", + "name": "Hebrew" + } + ], + "translated": 5815, + "target": 5068, + "approved": 5848, + "voted": 0, + "positiveVotes": 12, + "negativeVotes": 0, + "winning": 5806 + }, + { + "user": { + "id": "15554645", + "username": "crendasien", + "fullName": "Nicole (crendasien)", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15554645/medium/598ab1d4aaf6b8dccd5ba16be92da7b9.jpeg", + "joined": "2022-11-28 14:18:44" + }, + "languages": [ + { + "id": "it", + "name": "Italian" + } + ], + "translated": 5288, + "target": 5378, + "approved": 5613, + "voted": 0, + "positiveVotes": 11, + "negativeVotes": 0, + "winning": 5285 }, { "user": { @@ -90,28 +112,6 @@ "negativeVotes": 1, "winning": 5074 }, - { - "user": { - "id": "15554645", - "username": "crendasien", - "fullName": "Nicole (crendasien)", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15554645/medium/598ab1d4aaf6b8dccd5ba16be92da7b9.jpeg", - "joined": "2022-11-28 14:18:44" - }, - "languages": [ - { - "id": "it", - "name": "Italian" - } - ], - "translated": 4910, - "target": 5000, - "approved": 5235, - "voted": 0, - "positiveVotes": 11, - "negativeVotes": 0, - "winning": 4907 - }, { "user": { "id": "12701640", @@ -130,35 +130,13 @@ "name": "Spanish" } ], - "translated": 4446, - "target": 4685, + "translated": 4822, + "target": 5078, "approved": 0, "voted": 166, - "positiveVotes": 24, + "positiveVotes": 30, "negativeVotes": 0, - "winning": 963 - }, - { - "user": { - "id": "15674593", - "username": "Marty88", - "fullName": "Marty (Marty88)", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15674593/medium/492b1509d52bd2809dea768121217125.jpeg", - "joined": "2023-02-08 16:28:53" - }, - "languages": [ - { - "id": "sk", - "name": "Slovak" - } - ], - "translated": 4302, - "target": 3955, - "approved": 3732, - "voted": 0, - "positiveVotes": 0, - "negativeVotes": 0, - "winning": 3726 + "winning": 1017 }, { "user": { @@ -174,13 +152,13 @@ "name": "German" } ], - "translated": 4245, - "target": 4326, - "approved": 3964, + "translated": 4652, + "target": 4751, + "approved": 4371, "voted": 0, "positiveVotes": 25, "negativeVotes": 0, - "winning": 3685 + "winning": 4092 }, { "user": { @@ -196,8 +174,8 @@ "name": "Swedish" } ], - "translated": 4142, - "target": 3889, + "translated": 4557, + "target": 4273, "approved": 0, "voted": 0, "positiveVotes": 0, @@ -218,8 +196,74 @@ "name": "Turkish" } ], - "translated": 3845, - "target": 3244, + "translated": 4384, + "target": 3701, + "approved": 0, + "voted": 0, + "positiveVotes": 0, + "negativeVotes": 0, + "winning": 0 + }, + { + "user": { + "id": "15674593", + "username": "Marty88", + "fullName": "Marty (Marty88)", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15674593/medium/492b1509d52bd2809dea768121217125.jpeg", + "joined": "2023-02-08 16:28:53" + }, + "languages": [ + { + "id": "sk", + "name": "Slovak" + } + ], + "translated": 4347, + "target": 3995, + "approved": 3777, + "voted": 0, + "positiveVotes": 0, + "negativeVotes": 0, + "winning": 3771 + }, + { + "user": { + "id": "15709853", + "username": "RJSkudra", + "fullName": "RJS (RJSkudra)", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15709853/medium/c3abf2774913dc4e81fb261d36d7668c.png", + "joined": "2023-04-08 13:07:46" + }, + "languages": [ + { + "id": "lv", + "name": "Latvian" + } + ], + "translated": 4280, + "target": 3758, + "approved": 4195, + "voted": 0, + "positiveVotes": 0, + "negativeVotes": 0, + "winning": 4184 + }, + { + "user": { + "id": "16077170", + "username": "Topbcy", + "fullName": "Turbo (Topbcy)", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16077170/medium/d3aed33ea56330338756cfcd89477cfe.jpeg", + "joined": "2023-10-29 07:14:20" + }, + "languages": [ + { + "id": "zh-TW", + "name": "Chinese Traditional" + } + ], + "translated": 4171, + "target": 6555, "approved": 0, "voted": 0, "positiveVotes": 0, @@ -240,14 +284,36 @@ "name": "Hungarian" } ], - "translated": 3734, - "target": 3409, + "translated": 4135, + "target": 3788, "approved": 0, "voted": 0, "positiveVotes": 0, "negativeVotes": 0, "winning": 0 }, + { + "user": { + "id": "15617065", + "username": "somerlev", + "fullName": "somerlev", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15617065/medium/f4b13513e311ec902d90b2f718412c55.jpg", + "joined": "2023-01-01 15:03:01" + }, + "languages": [ + { + "id": "ru", + "name": "Russian" + } + ], + "translated": 3866, + "target": 3432, + "approved": 4640, + "voted": 160, + "positiveVotes": 0, + "negativeVotes": 0, + "winning": 3655 + }, { "user": { "id": "15644717", @@ -262,35 +328,35 @@ "name": "Chinese Simplified" } ], - "translated": 3296, - "target": 5128, - "approved": 3666, + "translated": 3836, + "target": 5983, + "approved": 4206, "voted": 1, "positiveVotes": 1, "negativeVotes": 2, - "winning": 2873 + "winning": 3413 }, { "user": { - "id": "15709853", - "username": "RJSkudra", - "fullName": "RJS (RJSkudra)", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15709853/medium/c3abf2774913dc4e81fb261d36d7668c.png", - "joined": "2023-04-08 13:07:46" + "id": "15677023", + "username": "Spillebulle", + "fullName": "Spillebulle", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15677023/medium/096cf68fccf4b666954a0a57a974af64_default.png", + "joined": "2023-02-08 02:51:18" }, "languages": [ { - "id": "lv", - "name": "Latvian" + "id": "no", + "name": "Norwegian" } ], - "translated": 3074, - "target": 2734, - "approved": 2987, + "translated": 3234, + "target": 3063, + "approved": 4451, "voted": 0, "positiveVotes": 0, "negativeVotes": 0, - "winning": 2980 + "winning": 3225 }, { "user": { @@ -306,14 +372,40 @@ "name": "Vietnamese" } ], - "translated": 2929, - "target": 4087, - "approved": 4, + "translated": 3001, + "target": 4174, + "approved": 23, "voted": 0, "positiveVotes": 0, "negativeVotes": 0, "winning": 4 }, + { + "user": { + "id": "15875457", + "username": "raelyan", + "fullName": "Raelyan (raelyan)", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15875457/medium/2f4fda1d1aaa5dcc79b328baf3f03151.jpeg", + "joined": "2023-06-14 12:51:04" + }, + "languages": [ + { + "id": "gl", + "name": "Galician" + }, + { + "id": "es-ES", + "name": "Spanish" + } + ], + "translated": 2924, + "target": 3268, + "approved": 3791, + "voted": 5, + "positiveVotes": 0, + "negativeVotes": 0, + "winning": 2901 + }, { "user": { "id": "15428592", @@ -336,54 +428,6 @@ "negativeVotes": 0, "winning": 2681 }, - { - "user": { - "id": "15875457", - "username": "raelyan", - "fullName": "Raelyan (raelyan)", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15875457/medium/2f4fda1d1aaa5dcc79b328baf3f03151.jpeg", - "joined": "2023-06-14 12:51:04" - }, - "languages": [ - { - "id": "gl", - "name": "Galician" - }, - { - "id": "es-ES", - "name": "Spanish" - } - ], - "translated": 2740, - "target": 3061, - "approved": 3553, - "voted": 5, - "positiveVotes": 0, - "negativeVotes": 0, - "winning": 2717 - }, - { - "user": { - "id": "15617065", - "username": "somerlev", - "fullName": "somerlev", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15617065/medium/f4b13513e311ec902d90b2f718412c55.jpg", - "joined": "2023-01-01 15:03:01" - }, - "languages": [ - { - "id": "ru", - "name": "Russian" - } - ], - "translated": 2688, - "target": 2379, - "approved": 2987, - "voted": 160, - "positiveVotes": 0, - "negativeVotes": 0, - "winning": 2557 - }, { "user": { "id": "15419914", @@ -402,8 +446,8 @@ "name": "German" } ], - "translated": 2474, - "target": 2463, + "translated": 2607, + "target": 2595, "approved": 0, "voted": 27, "positiveVotes": 0, @@ -412,25 +456,25 @@ }, { "user": { - "id": "15677023", - "username": "Spillebulle", - "fullName": "Spillebulle", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15677023/medium/096cf68fccf4b666954a0a57a974af64_default.png", - "joined": "2023-02-08 02:51:18" + "id": "15865139", + "username": "Beardy", + "fullName": "Beardy", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15865139/medium/fca6b9d2b3f52e286d1568f52b83b6a0_default.png", + "joined": "2023-06-07 06:24:20" }, "languages": [ { - "id": "no", - "name": "Norwegian" + "id": "el", + "name": "Greek" } ], - "translated": 2342, - "target": 2195, - "approved": 2342, - "voted": 0, + "translated": 2386, + "target": 2567, + "approved": 0, + "voted": 3, "positiveVotes": 0, "negativeVotes": 0, - "winning": 2338 + "winning": 0 }, { "user": { @@ -498,28 +542,6 @@ "negativeVotes": 0, "winning": 0 }, - { - "user": { - "id": "15865139", - "username": "Beardy", - "fullName": "Beardy", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15865139/medium/fca6b9d2b3f52e286d1568f52b83b6a0_default.png", - "joined": "2023-06-07 06:24:20" - }, - "languages": [ - { - "id": "el", - "name": "Greek" - } - ], - "translated": 1975, - "target": 2118, - "approved": 0, - "voted": 3, - "positiveVotes": 0, - "negativeVotes": 0, - "winning": 0 - }, { "user": { "id": "15149958", @@ -534,11 +556,11 @@ "name": "French" } ], - "translated": 1720, - "target": 1943, + "translated": 1753, + "target": 1978, "approved": 1103, "voted": 20, - "positiveVotes": 8, + "positiveVotes": 16, "negativeVotes": 0, "winning": 774 }, @@ -659,6 +681,10 @@ "id": "ru", "name": "Russian" }, + { + "id": "sk", + "name": "Slovak" + }, { "id": "sl", "name": "Slovenian" @@ -671,6 +697,10 @@ "id": "sv-SE", "name": "Swedish" }, + { + "id": "tr", + "name": "Turkish" + }, { "id": "uk", "name": "Ukrainian" @@ -680,12 +710,12 @@ "name": "Vietnamese" } ], - "translated": 1461, - "target": 1547, + "translated": 1576, + "target": 1691, "approved": 1463, "voted": 0, "positiveVotes": 189, - "negativeVotes": 20, + "negativeVotes": 21, "winning": 1215 }, { @@ -708,7 +738,7 @@ "voted": 0, "positiveVotes": 0, "negativeVotes": 0, - "winning": 0 + "winning": 351 }, { "user": { @@ -832,6 +862,32 @@ "negativeVotes": 1, "winning": 0 }, + { + "user": { + "id": "15977271", + "username": "tagaishi", + "fullName": "tagaishi", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15977271/medium/eade504c83a5a1ff831c80a538fbdb44_default.png", + "joined": "2023-08-22 07:09:16" + }, + "languages": [ + { + "id": "zh-CN", + "name": "Chinese Simplified" + }, + { + "id": "fr", + "name": "French" + } + ], + "translated": 588, + "target": 693, + "approved": 0, + "voted": 2, + "positiveVotes": 2, + "negativeVotes": 0, + "winning": 95 + }, { "user": { "id": "15925879", @@ -850,7 +906,7 @@ "target": 711, "approved": 0, "voted": 1, - "positiveVotes": 12, + "positiveVotes": 16, "negativeVotes": 0, "winning": 153 }, @@ -940,7 +996,7 @@ "voted": 0, "positiveVotes": 0, "negativeVotes": 0, - "winning": 198 + "winning": 250 }, { "user": { @@ -986,6 +1042,28 @@ "negativeVotes": 0, "winning": 0 }, + { + "user": { + "id": "15454038", + "username": "sebekmartin", + "fullName": "Martin Sebek (sebekmartin)", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15454038/medium/bcfb44598cdfd1d7cd4eb35812538962.jpeg", + "joined": "2023-10-08 09:26:03" + }, + "languages": [ + { + "id": "cs", + "name": "Czech" + } + ], + "translated": 393, + "target": 355, + "approved": 0, + "voted": 0, + "positiveVotes": 0, + "negativeVotes": 0, + "winning": 0 + }, { "user": { "id": "13330448", @@ -1030,32 +1108,6 @@ "negativeVotes": 3, "winning": 119 }, - { - "user": { - "id": "15977271", - "username": "tagaishi", - "fullName": "tagaishi", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15977271/medium/eade504c83a5a1ff831c80a538fbdb44_default.png", - "joined": "2023-08-22 07:09:16" - }, - "languages": [ - { - "id": "zh-CN", - "name": "Chinese Simplified" - }, - { - "id": "fr", - "name": "French" - } - ], - "translated": 328, - "target": 395, - "approved": 0, - "voted": 2, - "positiveVotes": 2, - "negativeVotes": 0, - "winning": 95 - }, { "user": { "id": "15685239", @@ -1124,22 +1176,22 @@ }, { "user": { - "id": "14949159", - "username": "f1refa11", - "fullName": "FireFall (f1refa11)", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/14949159/medium/fd2ae63b8eb4462200ba96abf943c1b9.png", - "joined": "2023-09-06 14:55:13" + "id": "7795", + "username": "zielmann", + "fullName": "Luke (zielmann)", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/7795/medium/ad22b8b8d5eb33e4154d53a454c862fd_default.png", + "joined": "2023-10-12 09:50:59" }, "languages": [ { - "id": "ru", - "name": "Russian" + "id": "pl", + "name": "Polish" } ], - "translated": 228, - "target": 203, + "translated": 266, + "target": 258, "approved": 0, - "voted": 0, + "voted": 7, "positiveVotes": 0, "negativeVotes": 0, "winning": 0 @@ -1158,14 +1210,58 @@ "name": "Chinese Simplified" } ], - "translated": 210, - "target": 339, + "translated": 264, + "target": 429, "approved": 0, "voted": 0, "positiveVotes": 4, "negativeVotes": 0, "winning": 126 }, + { + "user": { + "id": "16084674", + "username": "ai5d02sb", + "fullName": "ai5d02sb", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16084674/medium/7c8119fe2a5ca71bb15f636916a42b95_default.png", + "joined": "2023-11-02 15:47:09" + }, + "languages": [ + { + "id": "fr", + "name": "French" + } + ], + "translated": 264, + "target": 275, + "approved": 0, + "voted": 12, + "positiveVotes": 0, + "negativeVotes": 0, + "winning": 0 + }, + { + "user": { + "id": "14949159", + "username": "f1refa11", + "fullName": "FireFall (f1refa11)", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/14949159/medium/fd2ae63b8eb4462200ba96abf943c1b9.png", + "joined": "2023-09-06 14:55:13" + }, + "languages": [ + { + "id": "ru", + "name": "Russian" + } + ], + "translated": 228, + "target": 203, + "approved": 0, + "voted": 0, + "positiveVotes": 0, + "negativeVotes": 0, + "winning": 134 + }, { "user": { "id": "13641407", @@ -1208,7 +1304,7 @@ "voted": 0, "positiveVotes": 54, "negativeVotes": 3, - "winning": 20 + "winning": 17 }, { "user": { @@ -1232,6 +1328,28 @@ "negativeVotes": 3, "winning": 75 }, + { + "user": { + "id": "14934947", + "username": "djismgaming", + "fullName": "Ismael (djismgaming)", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/14934947/medium/f5a8570713c34ab0f7d5405d105e2a9a.jpeg", + "joined": "2023-11-12 08:36:15" + }, + "languages": [ + { + "id": "es-ES", + "name": "Spanish" + } + ], + "translated": 164, + "target": 181, + "approved": 0, + "voted": 6, + "positiveVotes": 0, + "negativeVotes": 0, + "winning": 0 + }, { "user": { "id": "12580457", @@ -1922,28 +2040,6 @@ "negativeVotes": 0, "winning": 0 }, - { - "user": { - "id": "7795", - "username": "zielmann", - "fullName": "Luke (zielmann)", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/7795/medium/ad22b8b8d5eb33e4154d53a454c862fd_default.png", - "joined": "2023-10-12 09:50:59" - }, - "languages": [ - { - "id": "pl", - "name": "Polish" - } - ], - "translated": 4, - "target": 4, - "approved": 0, - "voted": 6, - "positiveVotes": 0, - "negativeVotes": 0, - "winning": 0 - }, { "user": { "id": "15643771", @@ -2672,23 +2768,6 @@ "negativeVotes": 0, "winning": 0 }, - { - "user": { - "id": "15454038", - "username": "sebekmartin", - "fullName": "Martin Sebek (sebekmartin)", - "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15454038/medium/bcfb44598cdfd1d7cd4eb35812538962.jpeg", - "joined": "2023-10-08 09:26:03" - }, - "languages": [], - "translated": 0, - "target": 0, - "approved": 0, - "voted": 0, - "positiveVotes": 0, - "negativeVotes": 0, - "winning": 0 - }, { "user": { "id": "16051620", @@ -2727,6 +2806,23 @@ "positiveVotes": 0, "negativeVotes": 0, "winning": 0 + }, + { + "user": { + "id": "16097722", + "username": "explosiveparrot", + "fullName": "explosiveparrot", + "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16097722/medium/7762f80fc1da63f5b2eb87de9d640324_default.png", + "joined": "2023-11-10 21:23:11" + }, + "languages": [], + "translated": 0, + "target": 0, + "approved": 0, + "voted": 0, + "positiveVotes": 0, + "negativeVotes": 0, + "winning": 0 } ] } \ No newline at end of file From 5a563b387530c08eb1af66f165296cdc22138d91 Mon Sep 17 00:00:00 2001 From: ajnart Date: Mon, 13 Nov 2023 20:28:31 +0100 Subject: [PATCH 19/33] =?UTF-8?q?=E2=9C=A8=20Improve=20boards=20page,=20sh?= =?UTF-8?q?ow=20if=20Public/Restricted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/locales/en/common.json | 10 +- src/pages/board/index.tsx | 1 - src/pages/manage/boards/index.tsx | 298 +++++++++++++++--------------- src/server/api/routers/board.ts | 1 + src/tools/server/loginBuilder.ts | 6 +- 5 files changed, 159 insertions(+), 157 deletions(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 31f4af7b1..18cc8e650 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -44,12 +44,14 @@ }, "seeMore": "See more...", "position": { - "left": "Left", - "center": "Center", - "right": "Right" + "left": "Left", + "center": "Center", + "right": "Right" }, "attributes": { "width": "Width", "height": "Height" - } + }, + "public": "Public", + "restricted": "Restricted" } \ No newline at end of file diff --git a/src/pages/board/index.tsx b/src/pages/board/index.tsx index 94c8d2e4e..9822d125b 100644 --- a/src/pages/board/index.tsx +++ b/src/pages/board/index.tsx @@ -25,7 +25,6 @@ export default function BoardPage({ type BoardGetServerSideProps = { config: ConfigType; - dockerEnabled: boolean; _nextI18Next?: SSRConfig['_nextI18Next']; }; diff --git a/src/pages/manage/boards/index.tsx b/src/pages/manage/boards/index.tsx index 75b17d045..822bfeef1 100644 --- a/src/pages/manage/boards/index.tsx +++ b/src/pages/manage/boards/index.tsx @@ -18,34 +18,35 @@ import { IconDeviceFloppy, IconDotsVertical, IconFolderFilled, + IconLock, + IconLockOff, IconPlus, IconStack, IconStarFilled, IconTrash, } from '@tabler/icons-react'; -import { createServerSideHelpers } from '@trpc/react-query/server'; -import { GetServerSideProps } from 'next'; -import { useSession } from 'next-auth/react'; +import { GetServerSidePropsContext, InferGetServerSidePropsType } from 'next'; import { useTranslation } from 'next-i18next'; import Head from 'next/head'; import Link from 'next/link'; -import superjson from 'superjson'; import { openCreateBoardModal } from '~/components/Manage/Board/create-board.modal'; import { openDeleteBoardModal } from '~/components/Manage/Board/delete-board.modal'; import { ManageLayout } from '~/components/layout/Templates/ManageLayout'; import { boardRouter } from '~/server/api/routers/board'; import { getServerAuthSession } from '~/server/auth'; -import { prisma } from '~/server/db'; import { sleep } from '~/tools/client/time'; import { getServerSideTranslations } from '~/tools/server/getServerSideTranslations'; import { checkForSessionOrAskForLogin } from '~/tools/server/loginBuilder'; import { manageNamespaces } from '~/tools/server/translation-namespaces'; import { api } from '~/utils/api'; -const BoardsPage = () => { - const { data: sessionData } = useSession(); +// Infer return type from the `getServerSideProps` function +export default function BoardsPage({ + boards, + session, +}: InferGetServerSidePropsType) { const { data, refetch } = api.boards.all.useQuery(undefined, { - staleTime: 0, + initialData: boards, cacheTime: 1000 * 60 * 5, // Cache for 5 minutes }); const { mutateAsync } = api.user.makeDefaultDashboard.useMutation({ @@ -68,7 +69,7 @@ const BoardsPage = () => { {t('pageTitle')} - {sessionData?.user.isAdmin && ( + {session?.user.isAdmin && ( + + + + + + + + } + onClick={async () => { + void mutateAsync({ + board: board.name, + }); + }} + > + {t('cards.menu.setAsDefault')} + + {session?.user.isAdmin && ( + <> + + { + openDeleteBoardModal({ + boardName: board.name, + onConfirm: async () => { + append(board.name); + // give user feedback, that it's being deleted + await sleep(500); + filter((item, _) => item !== board.name); + }, + }); + }} + disabled={board.name === 'default'} + icon={} + color="red" + > + {t('cards.menu.delete.label')} + {board.name === 'default' && ( + {t('cards.menu.delete.disabled')} + )} + + )} - - - - - - - - {t('cards.statistics.apps')} - - {board.countApps} - - - - - - {t('cards.statistics.widgets')} - - {board.countWidgets} - - - - - - {t('cards.statistics.categories')} - - {board.countCategories} - - - - - - - - - - - - - } - onClick={async () => { - void mutateAsync({ - board: board.name, - }); - }} - > - {t('cards.menu.setAsDefault')} - - {sessionData?.user.isAdmin && ( - <> - - { - openDeleteBoardModal({ - boardName: board.name, - onConfirm: async () => { - append(board.name); - // give user feedback, that it's being deleted - await sleep(500); - filter((item, _) => item !== board.name); - }, - }); - }} - disabled={board.name === 'default'} - icon={} - color="red" - > - {t('cards.menu.delete.label')} - {board.name === 'default' && ( - {t('cards.menu.delete.disabled')} - )} - - - )} - - - - - ))} - - )} + + + + + ))} + ); -}; +} -export const getServerSideProps: GetServerSideProps = async (ctx) => { - const session = await getServerAuthSession(ctx); - - const result = checkForSessionOrAskForLogin(ctx, session, () => true); - if (result) { +export const getServerSideProps = async (context: GetServerSidePropsContext) => { + const session = await getServerAuthSession({ req: context.req, res: context.res }); + const result = checkForSessionOrAskForLogin( + context, + session, + () => session?.user.isAdmin == true + ); + if (result !== undefined) { return result; } - const helpers = createServerSideHelpers({ - router: boardRouter, - ctx: { - session, - cookies: ctx.req.cookies, - prisma: prisma, - }, - transformer: superjson, + const caller = boardRouter.createCaller({ + session: session, + cookies: context.req.cookies, }); - await helpers.all.prefetch(); + const boards = await caller.all(); const translations = await getServerSideTranslations( manageNamespaces, - ctx.locale, - ctx.req, - ctx.res + context.locale, + context.req, + context.res ); + return { props: { + boards, + session, ...translations, - trpcState: helpers.dehydrate(), }, }; }; - -export default BoardsPage; diff --git a/src/server/api/routers/board.ts b/src/server/api/routers/board.ts index ce244302d..05c74c2e4 100644 --- a/src/server/api/routers/board.ts +++ b/src/server/api/routers/board.ts @@ -25,6 +25,7 @@ export const boardRouter = createTRPCRouter({ return { name: name, + allowGuests: config.settings.access.allowGuests, countApps: countApps, countWidgets: config.widgets.length, countCategories: config.categories.length, diff --git a/src/tools/server/loginBuilder.ts b/src/tools/server/loginBuilder.ts index 9f9a3a2cd..44b8da848 100644 --- a/src/tools/server/loginBuilder.ts +++ b/src/tools/server/loginBuilder.ts @@ -1,8 +1,8 @@ import { - GetServerSideProps, GetServerSidePropsContext, GetServerSidePropsResult, PreviewData, + Redirect } from 'next'; import { Session } from 'next-auth'; @@ -13,13 +13,12 @@ export const checkForSessionOrAskForLogin = ( context: GetServerSidePropsContext, session: Session | null, accessCallback: () => boolean -): GetServerSidePropsResult | undefined => { +): GetServerSidePropsResult | undefined => { const permitted = accessCallback(); // user is logged in but does not have the required access if (session?.user && !permitted) { return { - props: {}, redirect: { destination: '/401', permanent: false @@ -34,7 +33,6 @@ export const checkForSessionOrAskForLogin = ( // user is logged out and needs to sign in return { - props: {}, redirect: { destination: `/auth/login?redirectAfterLogin=${context.resolvedUrl}`, permanent: false, From 404d73ebf726f57e7c87042b5c13b658de92ab1b Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Mon, 13 Nov 2023 20:50:35 +0100 Subject: [PATCH 20/33] =?UTF-8?q?=F0=9F=94=96=20Bumb=20version=20to=201.14?= =?UTF-8?q?.1=20(#1627)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6881f6041..3724f70c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homarr", - "version": "0.14.0", + "version": "0.14.1", "description": "Homarr - A homepage for your server.", "license": "MIT", "repository": { @@ -233,4 +233,4 @@ ] } } -} +} \ No newline at end of file From d2e761534544e5e334d47475baea3f3cd554999d Mon Sep 17 00:00:00 2001 From: ajnart Date: Mon, 13 Nov 2023 21:45:21 +0100 Subject: [PATCH 21/33] =?UTF-8?q?=F0=9F=A7=AA=20Fix=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/pages/board/[slug].spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/pages/board/[slug].spec.ts b/tests/pages/board/[slug].spec.ts index 6cfbd4916..692d72acf 100644 --- a/tests/pages/board/[slug].spec.ts +++ b/tests/pages/board/[slug].spec.ts @@ -157,7 +157,6 @@ describe('[slug] page', () => { destination: '/auth/login?redirectAfterLogin=/board/my-authentication-board', permanent: false, }, - props: {}, }); expect(serverAuthModule.getServerAuthSession).toHaveBeenCalledOnce(); expect(configExistsModule.configExists).toHaveBeenCalledOnce(); From b05152abb12bc989de5fe3fa51338c4295dc35de Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Mon, 13 Nov 2023 21:48:29 +0100 Subject: [PATCH 22/33] =?UTF-8?q?=F0=9F=90=9B=20File=20busy=20with=20node?= =?UTF-8?q?=20>=2020.3=20(#1630)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b5a9e2675..2579bcf85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.5-slim +FROM node:20.2.0-slim WORKDIR /app # Define node.js environment variables From de344ccea979a08a8cd0c3efdb9e1f1d9ab300e3 Mon Sep 17 00:00:00 2001 From: Tagaishi Date: Tue, 14 Nov 2023 20:02:24 +0100 Subject: [PATCH 23/33] =?UTF-8?q?=F0=9F=90=9B=20Remove=20notebook=20edit?= =?UTF-8?q?=20button=20for=20non=20admins=20(#1634)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 Remove permission to modify text to non admins * 🐛 notebook read only checks admin only Fixed by @Tagaishi --- src/widgets/notebook/NotebookEditor.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/widgets/notebook/NotebookEditor.tsx b/src/widgets/notebook/NotebookEditor.tsx index b52c4899c..63ca61310 100644 --- a/src/widgets/notebook/NotebookEditor.tsx +++ b/src/widgets/notebook/NotebookEditor.tsx @@ -49,9 +49,9 @@ import TextStyle from '@tiptap/extension-text-style'; import Underline from '@tiptap/extension-underline'; import { BubbleMenu, useEditor } from '@tiptap/react'; import StarterKit from '@tiptap/starter-kit'; +import { useSession } from 'next-auth/react'; import { useTranslation } from 'next-i18next'; import { Dispatch, SetStateAction, useState } from 'react'; -import { useEditModeStore } from '~/components/Dashboard/Views/useEditModeStore'; import { useConfigContext } from '~/config/provider'; import { useConfigStore } from '~/config/store'; import { api } from '~/utils/api'; @@ -63,7 +63,8 @@ export function Editor({ widget }: { widget: INotebookWidget }) { const [content, setContent] = useState(widget.properties.content); const [toSaveContent, setToSaveContent] = useState(content); - const { enabled } = useEditModeStore(); + const { data: sessionData } = useSession(); + const enabled = !!sessionData?.user.isAdmin; const [isEditing, setIsEditing] = useState(false); const { config, name: configName } = useConfigContext(); @@ -119,11 +120,12 @@ export function Editor({ widget }: { widget: INotebookWidget }) { TaskItem.configure({ nested: true, onReadOnlyChecked: (node, checked) => { - if (widget.properties.allowReadOnlyCheck) { + if (widget.properties.allowReadOnlyCheck && enabled) { const event = new CustomEvent('onReadOnlyCheck', { detail: { node, checked } }); dispatchEvent(event); + return true; } - return widget.properties.allowReadOnlyCheck; + return false; }, }), TaskList.configure({ itemTypeName: 'taskItem' }), @@ -327,7 +329,7 @@ export function Editor({ widget }: { widget: INotebookWidget }) { - {!enabled && ( + {enabled && ( <> Date: Tue, 14 Nov 2023 20:04:13 +0100 Subject: [PATCH 24/33] New Crowdin updates (#1614) --- .../customization/page-appearance.json | 25 ++++++- .../customization/page-appearance.json | 25 ++++++- public/locales/cr/tools/docker.json | 2 +- public/locales/cs/boards/customize.json | 2 +- public/locales/cs/common.json | 6 +- public/locales/cs/layout/header.json | 2 +- public/locales/cs/layout/modals/add-app.json | 18 ++--- public/locales/cs/modules/bookmark.json | 2 +- public/locales/cs/modules/media-server.json | 4 +- .../locales/cs/modules/torrents-status.json | 4 +- .../cs/settings/customization/general.json | 4 +- .../customization/page-appearance.json | 25 ++++++- public/locales/cs/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/da/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/de/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/el/tools/docker.json | 2 +- public/locales/es/layout/modals/about.json | 2 +- public/locales/es/modules/notebook.json | 22 +++--- .../locales/es/modules/torrents-status.json | 8 +-- .../customization/page-appearance.json | 25 ++++++- public/locales/es/tools/docker.json | 2 +- public/locales/fr/layout/modals/about.json | 8 +-- .../locales/fr/modules/torrents-status.json | 8 +-- .../customization/page-appearance.json | 25 ++++++- public/locales/fr/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/he/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/hr/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/hu/tools/docker.json | 2 +- .../locales/it/modules/torrents-status.json | 8 +-- .../customization/page-appearance.json | 25 ++++++- .../customization/page-appearance.json | 25 ++++++- public/locales/ja/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/ko/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/lv/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/nl/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/no/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/pl/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/pt/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/ru/tools/docker.json | 2 +- public/locales/sk/common.json | 6 +- public/locales/sk/layout/modals/about.json | 8 +-- .../locales/sk/modules/dns-hole-summary.json | 4 +- public/locales/sk/modules/notebook.json | 72 +++++++++---------- .../locales/sk/modules/torrents-status.json | 12 ++-- .../sk/settings/customization/general.json | 2 +- .../customization/page-appearance.json | 25 ++++++- .../customization/page-appearance.json | 25 ++++++- .../customization/page-appearance.json | 25 ++++++- .../customization/page-appearance.json | 25 ++++++- public/locales/tr/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/tw/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/uk/tools/docker.json | 2 +- .../customization/page-appearance.json | 25 ++++++- public/locales/vi/tools/docker.json | 2 +- 69 files changed, 771 insertions(+), 150 deletions(-) diff --git a/public/locales/cn/settings/customization/page-appearance.json b/public/locales/cn/settings/customization/page-appearance.json index 928245782..dc18d7a4b 100644 --- a/public/locales/cn/settings/customization/page-appearance.json +++ b/public/locales/cn/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "背景" }, + "backgroundImageAttachment": { + "label": "背景图片附件", + "options": { + "fixed": "固定 - 背景保持在同一位置(推荐)", + "scroll": "滚动 - 背景随鼠标滚动" + } + }, + "backgroundImageSize": { + "label": "背景图像大小", + "options": { + "cover": "覆盖 - 通过裁剪多余的空间,将图像缩放得尽可能小以覆盖整个窗口。 (推荐使用)", + "contain": "包含 - 在不裁剪或拉伸图像的情况下,在容器内尽可能大地缩放图像。" + } + }, + "backgroundImageRepeat": { + "label": "背景图片附件", + "options": { + "repeat": "重复 - 根据需要重复图像,以覆盖整个背景图像绘制区域。", + "no-repeat": "无重复 - 图像不重复且可能不会填满整个空间(推荐)", + "repeat-x": "重复 X - 与 \"重复 \"相同,但只在水平轴上重复。", + "repeat-y": "重复 Y - 与 \"重复 \"相同,但只在垂直轴上重复。" + } + }, "customCSS": { "label": "自定义 CSS", "description": "只推荐有经验的用户使用 CSS 自定义面板", "placeholder": "自定义 CSS 将在最后应用", "applying": "应用CSS中..." } -} \ No newline at end of file +} diff --git a/public/locales/cr/settings/customization/page-appearance.json b/public/locales/cr/settings/customization/page-appearance.json index a06ab514b..3895e5389 100644 --- a/public/locales/cr/settings/customization/page-appearance.json +++ b/public/locales/cr/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "crwdns1628:0crwdne1628:0" }, + "backgroundImageAttachment": { + "label": "crwdns4010:0crwdne4010:0", + "options": { + "fixed": "crwdns4012:0crwdne4012:0", + "scroll": "crwdns4014:0crwdne4014:0" + } + }, + "backgroundImageSize": { + "label": "crwdns4016:0crwdne4016:0", + "options": { + "cover": "crwdns4018:0crwdne4018:0", + "contain": "crwdns4020:0crwdne4020:0" + } + }, + "backgroundImageRepeat": { + "label": "crwdns4022:0crwdne4022:0", + "options": { + "repeat": "crwdns4024:0crwdne4024:0", + "no-repeat": "crwdns4032:0crwdne4032:0", + "repeat-x": "crwdns4028:0crwdne4028:0", + "repeat-y": "crwdns4030:0crwdne4030:0" + } + }, "customCSS": { "label": "crwdns1702:0crwdne1702:0", "description": "crwdns2723:0crwdne2723:0", "placeholder": "crwdns2389:0crwdne2389:0", "applying": "crwdns2561:0crwdne2561:0" } -} \ No newline at end of file +} diff --git a/public/locales/cr/tools/docker.json b/public/locales/cr/tools/docker.json index 998b0210e..ff103e2a1 100644 --- a/public/locales/cr/tools/docker.json +++ b/public/locales/cr/tools/docker.json @@ -2,7 +2,7 @@ "title": "crwdns3821:0crwdne3821:0", "alerts": { "notConfigured": { - "text": "crwdns3823:0crwdne3823:0" + "text": "crwdns4008:0crwdne4008:0" } }, "modals": { diff --git a/public/locales/cs/boards/customize.json b/public/locales/cs/boards/customize.json index 67fbe9da0..11da29d04 100644 --- a/public/locales/cs/boards/customize.json +++ b/public/locales/cs/boards/customize.json @@ -1,5 +1,5 @@ { - "metaTitle": "", + "metaTitle": "Přizpůsobení {{name}} plochy", "pageTitle": "Přizpůsobení {{name}} plochy", "backToBoard": "Zpět na plochu", "settings": { diff --git a/public/locales/cs/common.json b/public/locales/cs/common.json index 69e78f046..065f41b13 100644 --- a/public/locales/cs/common.json +++ b/public/locales/cs/common.json @@ -1,5 +1,5 @@ { - "save": "", + "save": "Uložit", "apply": "", "insert": "", "about": "", @@ -17,13 +17,13 @@ "enableAll": "", "disableAll": "", "version": "", - "changePosition": "", + "changePosition": "Změnit pozici", "remove": "", "removeConfirm": "", "createItem": "", "sections": { "settings": "", - "dangerZone": "" + "dangerZone": "Nebezpečná zóna" }, "secrets": { "apiKey": "", diff --git a/public/locales/cs/layout/header.json b/public/locales/cs/layout/header.json index dbef625cd..0b40bc882 100644 --- a/public/locales/cs/layout/header.json +++ b/public/locales/cs/layout/header.json @@ -14,7 +14,7 @@ "preferences": "Uživatelská nastavení", "defaultBoard": "Výchozí plocha", "manage": "Spravovat", - "logout": "Odhlásit z {{username}}", + "logout": "Odhlásit {{username}}", "login": "" } }, diff --git a/public/locales/cs/layout/modals/add-app.json b/public/locales/cs/layout/modals/add-app.json index f5a7aa4ea..efadec3f7 100644 --- a/public/locales/cs/layout/modals/add-app.json +++ b/public/locales/cs/layout/modals/add-app.json @@ -1,21 +1,21 @@ { "tabs": { - "general": "", - "behaviour": "", + "general": "Obecné", + "behaviour": "Chování", "network": "", - "appearance": "", - "integration": "" + "appearance": "Vzhled", + "integration": "Integrace" }, "general": { "appname": { - "label": "", + "label": "Název aplikace", "description": "" }, "internalAddress": { "label": "", "description": "", "troubleshoot": { - "label": "", + "label": "Narazili jste na problém?", "header": "", "lines": { "nothingAfterPort": "", @@ -36,11 +36,11 @@ }, "behaviour": { "isOpeningNewTab": { - "label": "", - "description": "" + "label": "Otevřít na nové kartě", + "description": "Otevřete aplikaci na nové kartě místo aktuální." }, "tooltipDescription": { - "label": "", + "label": "Popis aplikace", "description": "" }, "customProtocolWarning": "" diff --git a/public/locales/cs/modules/bookmark.json b/public/locales/cs/modules/bookmark.json index 6fedba2d9..87bf684c7 100644 --- a/public/locales/cs/modules/bookmark.json +++ b/public/locales/cs/modules/bookmark.json @@ -35,7 +35,7 @@ }, "name": "", "url": "", - "newTab": "", + "newTab": "Otevřít na nové kartě", "hideHostname": "", "hideIcon": "", "delete": "" diff --git a/public/locales/cs/modules/media-server.json b/public/locales/cs/modules/media-server.json index 7ae94eb7f..16a686ef7 100644 --- a/public/locales/cs/modules/media-server.json +++ b/public/locales/cs/modules/media-server.json @@ -1,12 +1,12 @@ { "descriptor": { - "name": "", + "name": "Mediální server", "description": "", "settings": { "title": "" } }, - "loading": "", + "loading": "Načítání streamů", "card": { "table": { "header": { diff --git a/public/locales/cs/modules/torrents-status.json b/public/locales/cs/modules/torrents-status.json index 97a4805ed..4d700fe75 100644 --- a/public/locales/cs/modules/torrents-status.json +++ b/public/locales/cs/modules/torrents-status.json @@ -75,8 +75,8 @@ } }, "loading": { - "title": "", - "description": "" + "title": "Načítání", + "description": "Navazování spojení" }, "popover": { "introductionPrefix": "", diff --git a/public/locales/cs/settings/customization/general.json b/public/locales/cs/settings/customization/general.json index 75854abae..ed76ad44d 100644 --- a/public/locales/cs/settings/customization/general.json +++ b/public/locales/cs/settings/customization/general.json @@ -14,7 +14,7 @@ "description": "Upravte názvy, logo a PWA" }, "appereance": { - "name": "", + "name": "Vzhled", "description": "Přizpůsobte pozadí, barvy a zobrazení aplikací" }, "accessibility": { @@ -22,7 +22,7 @@ "description": "" }, "access": { - "name": "", + "name": "Oprávnění", "description": "Nastavte, kdo má přístup k Vaší ploše" } } diff --git a/public/locales/cs/settings/customization/page-appearance.json b/public/locales/cs/settings/customization/page-appearance.json index 2ca246303..7f98a8ed0 100644 --- a/public/locales/cs/settings/customization/page-appearance.json +++ b/public/locales/cs/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Pozadí" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "Vlastní CSS", "description": "Dále si můžete přizpůsobit ovládací panel pomocí CSS, doporučujeme pouze zkušeným uživatelům", "placeholder": "", "applying": "" } -} \ No newline at end of file +} diff --git a/public/locales/cs/tools/docker.json b/public/locales/cs/tools/docker.json index 8d403475c..54e726b73 100644 --- a/public/locales/cs/tools/docker.json +++ b/public/locales/cs/tools/docker.json @@ -2,7 +2,7 @@ "title": "", "alerts": { "notConfigured": { - "text": "Vaše instance Homarr nemá nakonfigurovaný Docker nebo se nepodařilo načíst kontejnery. Podívejte se prosím do dokumentace, jak integraci nastavit." + "text": "" } }, "modals": { diff --git a/public/locales/da/settings/customization/page-appearance.json b/public/locales/da/settings/customization/page-appearance.json index 6df6a8617..7f567f72f 100644 --- a/public/locales/da/settings/customization/page-appearance.json +++ b/public/locales/da/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Baggrund" }, + "backgroundImageAttachment": { + "label": "Vedhæftning af baggrundsbillede", + "options": { + "fixed": "Fast - Baggrunden forbliver i samme position (anbefales)", + "scroll": "Scroll - Baggrunden scroller med musen" + } + }, + "backgroundImageSize": { + "label": "Baggrundsbilledets størrelse", + "options": { + "cover": "Cover - Skalerer billedet så lille som muligt for at dække hele vinduet ved at beskære for overskydende materiale. (anbefalede)", + "contain": "Indehold - Skalerer billedet så stort som muligt i dets ramme uden at beskære eller strække billedet." + } + }, + "backgroundImageRepeat": { + "label": "Vedhæftning af baggrundsbillede", + "options": { + "repeat": "Gentag - Billedet gentages så meget som nødvendigt for at dække hele baggrundsbilledets maleområde.", + "no-repeat": "Ingen gentagelse - Billedet gentages ikke og fylder muligvis ikke hele rummet (anbefales)", + "repeat-x": "Gentag X - Samme som 'Gentag' men kun på vandret akse.", + "repeat-y": "Gentag Y - Samme som 'Gentag' men kun på lodret akse." + } + }, "customCSS": { "label": "Tilpasset CSS", "description": "Yderligere, tilpasse dit dashboard ved hjælp af CSS, anbefales kun til erfarne brugere", "placeholder": "Brugerdefineret CSS vil blive anvendt sidst", "applying": "Anvender CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/da/tools/docker.json b/public/locales/da/tools/docker.json index 4ff6d913a..eabaff878 100644 --- a/public/locales/da/tools/docker.json +++ b/public/locales/da/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Din Homarr-instans har ikke Docker konfigureret, eller den har fejlet i at hente containere. Se i dokumentationen, hvordan du sætter integrationen op." + "text": "Din Homarr-instans har ikke Docker konfigureret, eller den har ikke kunne hente containere. Se venligst dokumentationen for, hvordan du opsætter integrationen." } }, "modals": { diff --git a/public/locales/de/settings/customization/page-appearance.json b/public/locales/de/settings/customization/page-appearance.json index b67918dac..c35ff49ce 100644 --- a/public/locales/de/settings/customization/page-appearance.json +++ b/public/locales/de/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Hintergrund" }, + "backgroundImageAttachment": { + "label": "Anhang des Hintergrundbildes", + "options": { + "fixed": "Fixiert - Hintergrund bleibt in der gleichen Position (empfohlen)", + "scroll": "Scrollen – Scrollt mit der Maus im Hintergrund" + } + }, + "backgroundImageSize": { + "label": "Hintergrundbild-Größe", + "options": { + "cover": "Abdecken - Skaliert das Bild so klein wie möglich, um das gesamte Fenster abzudecken, indem überschüssiger Platz abgeschnitten wird. (empfohlen)", + "contain": "Einschließen – Skaliert das Bild innerhalb seines Containers so groß wie möglich, ohne das Bild zu beschneiden oder zu strecken." + } + }, + "backgroundImageRepeat": { + "label": "Anhang des Hintergrundbildes", + "options": { + "repeat": "Wiederholen - Das Bild wird so oft wiederholt, bis es den gesamten Bereich des Hintergrundbildes abdeckt.", + "no-repeat": "Keine Wiederholung – Das Bild wird nicht wiederholt und füllt möglicherweise nicht den gesamten Raum aus (empfohlen)", + "repeat-x": "Wiederholen X – Wie „Wiederholen“, jedoch nur auf der horizontalen Achse.", + "repeat-y": "Wiederholen Y – Wie „Wiederholen“, jedoch nur auf der vertikalen Achse." + } + }, "customCSS": { "label": "Benutzerdefiniertes CSS", "description": "Außerdem können Sie Ihr Dashboard mittels CSS anpassen, dies wird nur für erfahrene Benutzer empfohlen", "placeholder": "Benutzerdefiniertes CSS wird zuletzt angewendet", "applying": "CSS wird übernommen..." } -} \ No newline at end of file +} diff --git a/public/locales/de/tools/docker.json b/public/locales/de/tools/docker.json index 622947e1f..5f6ed9797 100644 --- a/public/locales/de/tools/docker.json +++ b/public/locales/de/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Auf Ihrer Homarr-Instanz ist Docker nicht konfiguriert oder es ist nicht möglich, Container zu erkennen. Bitte lesen Sie in der Dokumentation nach, wie Sie diese Integration einrichten können." + "text": "Auf Ihrer Homarr-Instanz ist Docker nicht konfiguriert oder es war nicht möglich, Container abzurufen. Bitte lesen Sie in der Dokumentation nach, wie Sie diese Integration einrichten können." } }, "modals": { diff --git a/public/locales/el/settings/customization/page-appearance.json b/public/locales/el/settings/customization/page-appearance.json index 7be2dfb8f..4f8e0ed7a 100644 --- a/public/locales/el/settings/customization/page-appearance.json +++ b/public/locales/el/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Φόντο" }, + "backgroundImageAttachment": { + "label": "Συνημμένη εικόνα φόντου", + "options": { + "fixed": "Σταθερό - Το φόντο παραμένει στην ίδια θέση (συνιστάται)", + "scroll": "Κύλιση - Κύλιση φόντου με το ποντίκι σας" + } + }, + "backgroundImageSize": { + "label": "Μέγεθος εικόνας φόντου", + "options": { + "cover": "Κάλυψη - Κλιμακώνει την εικόνα όσο το δυνατόν μικρότερα για να καλύψει ολόκληρο το παράθυρο, περικόπτοντας τον υπερβολικό χώρο. (συνιστάται)", + "contain": "Περιέχει - Κλιμακώνει την εικόνα όσο το δυνατόν περισσότερο μέσα στο χώρο περιέλευσής της, χωρίς περικοπή ή τέντωμα της εικόνας." + } + }, + "backgroundImageRepeat": { + "label": "Συνημμένη εικόνα φόντου", + "options": { + "repeat": "Επανάληψη - Η εικόνα επαναλαμβάνεται όσο χρειάζεται για να καλύψει ολόκληρη την περιοχή ζωγραφικής της εικόνας φόντου.", + "no-repeat": "Χωρίς επανάληψη - Η εικόνα δεν επαναλαμβάνεται και δεν μπορεί να γεμίσει ολόκληρο το χώρο (συνιστάται)", + "repeat-x": "Επανάληψη X - Ίδιο με το 'Επανάληψη' αλλά μόνο στον οριζόντιο άξονα.", + "repeat-y": "Επανάληψη Y - Ίδιο με το 'Επανάληψη' αλλά μόνο στον κατακόρυφο άξονα." + } + }, "customCSS": { "label": "Προσαρμοσμένη CSS", "description": "Περαιτέρω, προσαρμόστε τον πίνακα ελέγχου σας χρησιμοποιώντας CSS, συνιστάται μόνο για έμπειρους χρήστες", "placeholder": "Το προσαρμοσμένο CSS θα εφαρμοστεί τελευταίο", "applying": "Εφαρμογή CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/el/tools/docker.json b/public/locales/el/tools/docker.json index 7df956ae9..3a28ee8f0 100644 --- a/public/locales/el/tools/docker.json +++ b/public/locales/el/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Η Homarr εγκατάσταση σας δεν έχει το Docker εγκατεστημένο ή απέτυχε να ανακτήσει τα containers. Ελέγξτε την τεκμηρίωση για το πώς να ρυθμίσετε την ενσωμάτωση." + "text": "Η Homarr εγκατάσταση σας δεν έχει το Docker εγκατεστημένο ή απέτυχε να ανακτήσει containers. Ελέγξτε την τεκμηρίωση για το πώς να ρυθμίσετε την ενσωμάτωση." } }, "modals": { diff --git a/public/locales/es/layout/modals/about.json b/public/locales/es/layout/modals/about.json index b74557ce9..b9e408509 100644 --- a/public/locales/es/layout/modals/about.json +++ b/public/locales/es/layout/modals/about.json @@ -7,7 +7,7 @@ "keybinds": "Combinaciones de teclas", "translators": "Traductores ({{count}})", "translatorsDescription": "Gracias a estas personas, ¡Homarr está disponible en {{languages}} idiomas! ¿Quieres ayudar a traducir Homarr en tu idioma? Lee cómo hacerlo aquí.", - "contributors": "Contribuidores ({{count}})", + "contributors": "Colaboradores ({{count}})", "contributorsDescription": "¡Estas personas han creado el código que hace que Homarr funcione! ¿Quieres ayudar a construir Homarr? Lee cómo hacerlo aquí", "actions": { "toggleTheme": "Alternar modo claro/oscuro", diff --git a/public/locales/es/modules/notebook.json b/public/locales/es/modules/notebook.json index 4bf4cbf35..b9cf184dd 100644 --- a/public/locales/es/modules/notebook.json +++ b/public/locales/es/modules/notebook.json @@ -20,7 +20,7 @@ "bold": "Negrita", "italic": "Cursiva", "strikethrough": "Tachado", - "underline": "Subrayar", + "underline": "Subrayado", "colorText": "Color de texto", "colorHighlight": "Texto resaltado en color", "code": "Código", @@ -29,23 +29,23 @@ "align": "Alinear texto: {{position}}", "blockquote": "Cita", "horizontalLine": "Línea horizontal", - "bulletList": "Lista de viñetas", + "bulletList": "Lista sin ordenar", "orderedList": "Lista ordenada", - "checkList": "", - "increaseIndent": "Aumentar Sangría", - "decreaseIndent": "Disminuir Sangría", + "checkList": "Lista de control", + "increaseIndent": "Aumentar sangría", + "decreaseIndent": "Disminuir sangría", "link": "Enlace", "unlink": "Eliminar enlace", - "image": "Adjuntar Imagen", + "image": "Insertar imagen", "addTable": "Añadir tabla", - "deleteTable": "Eliminar Tabla", + "deleteTable": "Eliminar tabla", "colorCell": "Color de celda", "mergeCell": "Alternar combinación de celdas", - "addColumnLeft": "Añadir columna antes de", - "addColumnRight": "Añadir columna después de", + "addColumnLeft": "Añadir columna a la izquierda", + "addColumnRight": "Añadir columna a la derecha", "deleteColumn": "Eliminar columna", - "addRowTop": "Añadir fila antes de", - "addRowBelow": "Añador fila después de", + "addRowTop": "Añadir fila encima", + "addRowBelow": "Añadir fila debajo", "deleteRow": "Eliminar fila" }, "modals": { diff --git a/public/locales/es/modules/torrents-status.json b/public/locales/es/modules/torrents-status.json index 0518b7844..493c91153 100644 --- a/public/locales/es/modules/torrents-status.json +++ b/public/locales/es/modules/torrents-status.json @@ -27,8 +27,8 @@ "description": "Cuando se marca 'está en la lista blanca', actuará como una lista blanca. Si no se marca, esta es una lista negra. No hará nada cuando esté vacío" }, "displayRatioWithFilter": { - "label": "", - "info": "" + "label": "Mostrar la relación de la lista de torrents filtrados", + "info": "Si está deshabilitado, solo se mostrará la relación global. La relación global seguirá usando las etiquetas si están configuradas" } } }, @@ -36,8 +36,8 @@ "footer": { "error": "Error", "lastUpdated": "Última actualización hace {{time}}", - "ratioGlobal": "", - "ratioWithFilter": "" + "ratioGlobal": "Relación global", + "ratioWithFilter": "Relación con filtro" }, "table": { "header": { diff --git a/public/locales/es/settings/customization/page-appearance.json b/public/locales/es/settings/customization/page-appearance.json index b20a02e23..9035148af 100644 --- a/public/locales/es/settings/customization/page-appearance.json +++ b/public/locales/es/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Fondo" }, + "backgroundImageAttachment": { + "label": "Adjuntar imagen de fondo", + "options": { + "fixed": "Fijo - El fondo permanece en la misma posición (recomendado)", + "scroll": "Desplazar - El fondo se desplaza con el ratón" + } + }, + "backgroundImageSize": { + "label": "Tamaño de la imagen de fondo", + "options": { + "cover": "Cubrir - Escala la imagen lo mínimo posible para cubrir toda la ventana recortando el espacio excesivo (recomendado)", + "contain": "Contener - Escala la imagen lo más grande posible dentro de su contenedor sin recortarla ni estirarla" + } + }, + "backgroundImageRepeat": { + "label": "Adjuntar imagen de fondo", + "options": { + "repeat": "Repetir - La imagen se repite tanto como sea necesario para cubrir toda el área de pintura de la imagen de fondo", + "no-repeat": "Sin repetir - La imagen no se repite y puede no ocupar todo el espacio (recomendado)", + "repeat-x": "Repetir X - Igual que 'Repetir' pero sólo en el eje horizontal", + "repeat-y": "Repetir Y: igual que 'Repetir' pero solo en el eje vertical" + } + }, "customCSS": { "label": "CSS Personalizado", "description": "Además, personaliza tu panel usando CSS, solo recomendado para usuarios avanzados", "placeholder": "El CSS personalizado se aplicará en último lugar", "applying": "Aplicando CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/es/tools/docker.json b/public/locales/es/tools/docker.json index 0f89db477..18db9e146 100644 --- a/public/locales/es/tools/docker.json +++ b/public/locales/es/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Tu instancia de Homarr no tiene Docker configurado o no pudo recuperar contenedores. Por favor, consulta la documentación sobre cómo configurar la integración." + "text": "Tu instancia de Homarr no tiene Docker configurado o ha fallado al obtener los contenedores. Consulta la documentación sobre cómo configurar la integración." } }, "modals": { diff --git a/public/locales/fr/layout/modals/about.json b/public/locales/fr/layout/modals/about.json index 973583e3a..5f8506523 100644 --- a/public/locales/fr/layout/modals/about.json +++ b/public/locales/fr/layout/modals/about.json @@ -5,10 +5,10 @@ "key": "Raccourci clavier", "action": "Action", "keybinds": "Affectation des touches", - "translators": "", - "translatorsDescription": "", - "contributors": "", - "contributorsDescription": "", + "translators": "Traducteurs ({{count}})", + "translatorsDescription": "Grâce à ces personnes, Homarr est disponible dans {{languages}} langues ! Vous voulez aider à traduire Homarr dans votre langue ? Lisez comment le faire ici.", + "contributors": "Contributeurs ({{count}})", + "contributorsDescription": "Ces personnes ont développé le code qui fait fonctionner homarr ! Vous voulez aider à développer Homarr ? Lisez comment procéder ici", "actions": { "toggleTheme": "Basculer entre mode clair/sombre", "focusSearchBar": "Focus sur la barre de recherche", diff --git a/public/locales/fr/modules/torrents-status.json b/public/locales/fr/modules/torrents-status.json index adea26bb8..7ef7a58b6 100644 --- a/public/locales/fr/modules/torrents-status.json +++ b/public/locales/fr/modules/torrents-status.json @@ -27,8 +27,8 @@ "description": "Si la case \"La liste des libellés est une liste blanche\" est cochée, elle sera appliquée comme une liste blanche. Si la case n'est pas cochée, elle s'appliquera comme une liste noire. Rien ne se passera si elle est vide" }, "displayRatioWithFilter": { - "label": "", - "info": "" + "label": "Afficher le ratio de la liste des torrents filtrés", + "info": "Si désactivé, seul le ratio global sera affiché. Le ratio global utilisera toujours les labels si définis" } } }, @@ -36,8 +36,8 @@ "footer": { "error": "Erreur", "lastUpdated": "Dernière mise à jour : {{time}}", - "ratioGlobal": "", - "ratioWithFilter": "" + "ratioGlobal": "Ratio global", + "ratioWithFilter": "Ratio avec filtre" }, "table": { "header": { diff --git a/public/locales/fr/settings/customization/page-appearance.json b/public/locales/fr/settings/customization/page-appearance.json index f7ac74c4c..dd0df8fc2 100644 --- a/public/locales/fr/settings/customization/page-appearance.json +++ b/public/locales/fr/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Fond" }, + "backgroundImageAttachment": { + "label": "Pièce jointe de l'image d'arrière-plan", + "options": { + "fixed": "Fixe - L'arrière-plan reste dans la même position (recommandé)", + "scroll": "Défilement - L'arrière-plan défile avec la souris" + } + }, + "backgroundImageSize": { + "label": "Taille de l'image d'arrière-plan", + "options": { + "cover": "Couverture - Mise à l'échelle de l'image aussi petite que possible pour couvrir la fenêtre entière en recadrant l'espace excessif. (recommandé)", + "contain": "Contient - Mise à l'échelle de l'image aussi grande que possible dans son conteneur sans recadrer ou étirer l'image." + } + }, + "backgroundImageRepeat": { + "label": "Pièce jointe de l'image d'arrière-plan", + "options": { + "repeat": "Répéter - L'image est répétée autant que nécessaire pour couvrir toute la surface d'arrière-plan.", + "no-repeat": "Pas de répétition - L'image n'est pas répétée et peut ne pas remplir tout l'espace (recommandé)", + "repeat-x": "Répéter X - Identique à 'Répéter' mais uniquement sur l'axe horizontal.", + "repeat-y": "Répéter Y - Identique à 'Répéter' mais uniquement sur l'axe vertical." + } + }, "customCSS": { "label": "CSS personnalisé", "description": "En outre, vous pouvez personnaliser votre tableau de bord à l'aide de CSS. Réservé aux utilisateurs expérimentés.", "placeholder": "Le CSS personnalisé sera appliqué en dernier", "applying": "Application du code CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/fr/tools/docker.json b/public/locales/fr/tools/docker.json index 0ffe2a29a..586fe02aa 100644 --- a/public/locales/fr/tools/docker.json +++ b/public/locales/fr/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Docker n'est pas configuré sur votre instance Homarr ou a échoué à trouver les conteneurs. Veuillez vérifier la documentation pour savoir comment configurer cette intégration." + "text": "Votre instance Homarr n'a pas configuré Docker ou n'a pas réussi à récupérer les conteneurs. Veuillez consulter la documentation pour savoir comment configurer l'intégration." } }, "modals": { diff --git a/public/locales/he/settings/customization/page-appearance.json b/public/locales/he/settings/customization/page-appearance.json index 9645a1356..70d34cfad 100644 --- a/public/locales/he/settings/customization/page-appearance.json +++ b/public/locales/he/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "רקע" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "CSS מותאם אישית", "description": "יתר על כן, התאם את לוח המחוונים שלך באמצעות CSS, מומלץ רק למשתמשים מנוסים", "placeholder": "CSS מותאם אישית יוחל אחרון", "applying": "מחיל CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/he/tools/docker.json b/public/locales/he/tools/docker.json index c2ef87e55..3affb1371 100644 --- a/public/locales/he/tools/docker.json +++ b/public/locales/he/tools/docker.json @@ -2,7 +2,7 @@ "title": "דוקר", "alerts": { "notConfigured": { - "text": "למופע ה-Homarr שלך לא הוגדר Docker או שהוא נכשל באחזור קונטיינרים. אנא עיין בתיעוד כיצד להגדיר את האינטגרציה." + "text": "" } }, "modals": { diff --git a/public/locales/hr/settings/customization/page-appearance.json b/public/locales/hr/settings/customization/page-appearance.json index 3163b9698..0e04c9cd1 100644 --- a/public/locales/hr/settings/customization/page-appearance.json +++ b/public/locales/hr/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Pozadina" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "Prilagođeni CSS", "description": "Dodatno, prilagodite svoju nadzornu ploču koristeći CSS, što se preporučuje samo iskusnim korisnicima", "placeholder": "Prilagođeni CSS će se primijeniti posljednji", "applying": "Primjena CSS-a..." } -} \ No newline at end of file +} diff --git a/public/locales/hr/tools/docker.json b/public/locales/hr/tools/docker.json index b642a53bd..592a71420 100644 --- a/public/locales/hr/tools/docker.json +++ b/public/locales/hr/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Vaša Homarr instanca nema konfiguriran Docker ili nije uspjela dohvatiti spremnike. Provjerite dokumentaciju o tome kako postaviti integraciju." + "text": "" } }, "modals": { diff --git a/public/locales/hu/settings/customization/page-appearance.json b/public/locales/hu/settings/customization/page-appearance.json index 50bb74371..258a04053 100644 --- a/public/locales/hu/settings/customization/page-appearance.json +++ b/public/locales/hu/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Háttér" }, + "backgroundImageAttachment": { + "label": "Háttérkép csatolása", + "options": { + "fixed": "Rögzített – a háttér ugyanabban a helyzetben marad (ajánlott)", + "scroll": "Görgetés - A háttér gördül az egérrel" + } + }, + "backgroundImageSize": { + "label": "Háttér kép mérete", + "options": { + "cover": "Cover - A képet a lehető legkisebbre méretezi, hogy a felesleges terület levágásával a teljes ablakot lefedje. (ajánlott)", + "contain": "Tartalom - A képet a lehető legnagyobb méretre méretezi a tárolón belül anélkül, hogy a képet levágná vagy megnyújtaná." + } + }, + "backgroundImageRepeat": { + "label": "Háttérkép csatolása", + "options": { + "repeat": "Ismétlés – A kép annyiszor ismétlődik, amennyire szükséges, hogy a teljes háttérkép festési területet lefedje.", + "no-repeat": "Nincs ismétlés - A kép nem ismétlődik, és nem tölti ki a teljes helyet (ajánlott)", + "repeat-x": "Ismétlés X - Ugyanaz, mint az 'Ismétlés', de csak a vízszintes tengelyen.", + "repeat-y": "Ismétlés Y - Ugyanaz, mint az 'Ismétlés', de csak a függőleges tengelyen." + } + }, "customCSS": { "label": "Egyéni CSS", "description": "Továbbá, testreszabhatja műszerfalát CSS segítségével, csak tapasztalt felhasználóknak ajánlott", "placeholder": "Az egyéni CSS utoljára kerül alkalmazásra", "applying": "CSS alkalmazása..." } -} \ No newline at end of file +} diff --git a/public/locales/hu/tools/docker.json b/public/locales/hu/tools/docker.json index f2406909f..8111cde62 100644 --- a/public/locales/hu/tools/docker.json +++ b/public/locales/hu/tools/docker.json @@ -7,7 +7,7 @@ }, "modals": { "selectBoard": { - "title": "Válasszon egy táblát", + "title": "Válasszon vezérlőt", "text": "Válassza ki azt a táblát, ahová a kiválasztott Docker-konténerekhez tartozó alkalmazásokat szeretné hozzáadni.", "form": { "board": { diff --git a/public/locales/it/modules/torrents-status.json b/public/locales/it/modules/torrents-status.json index 40f924aa9..86b78fe33 100644 --- a/public/locales/it/modules/torrents-status.json +++ b/public/locales/it/modules/torrents-status.json @@ -27,8 +27,8 @@ "description": "Quando 'è whitelist' è selezionato, agirà come una whitelist. Se non selezionato, è una blacklist. Non farà nulla quando vuoto" }, "displayRatioWithFilter": { - "label": "", - "info": "" + "label": "Visualizza il ratio dell'elenco dei torrent filtrati", + "info": "Se disabilitato, verrà visualizzato solo il ratio globale. Il ratio globale utilizzerà comunque i label, se impostati" } } }, @@ -36,8 +36,8 @@ "footer": { "error": "Errore", "lastUpdated": "Ultimo aggiornamento {{time}} fa", - "ratioGlobal": "", - "ratioWithFilter": "" + "ratioGlobal": "Ratio globale", + "ratioWithFilter": "Ratio con filtro" }, "table": { "header": { diff --git a/public/locales/it/settings/customization/page-appearance.json b/public/locales/it/settings/customization/page-appearance.json index 47ff7bc3e..941a814c2 100644 --- a/public/locales/it/settings/customization/page-appearance.json +++ b/public/locales/it/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Sfondo" }, + "backgroundImageAttachment": { + "label": "Allegato immagine di sfondo", + "options": { + "fixed": "Fisso - Lo sfondo rimane nella stessa posizione (consigliato)", + "scroll": "Scorrimento - Lo sfondo scorre con il mouse" + } + }, + "backgroundImageSize": { + "label": "Dimensioni dell'immagine di sfondo", + "options": { + "cover": "Copertura - Ridimensiona l'immagine il più possibile per coprire l'intera finestra ritagliando lo spazio eccessivo. (consigliato)", + "contain": "Contieni - ridimensiona l'immagine il più grande possibile all'interno del suo container senza ritagliare o allungare l'immagine." + } + }, + "backgroundImageRepeat": { + "label": "Allegato immagine di sfondo", + "options": { + "repeat": "Ripeti - l'immagine viene ripetuta quanto necessario per coprire l'intera area di disegno dell'immagine di sfondo.", + "no-repeat": "Nessuna ripetizione - l'immagine non viene ripetuta e potrebbe non riempire l'intero spazio (consigliato)", + "repeat-x": "Ripeti X - Come 'Ripeti' ma solo sull'asse orizzontale.", + "repeat-y": "Ripeti Y - Come 'Ripeti' ma solo sull'asse verticale." + } + }, "customCSS": { "label": "CSS personalizzato", "description": "Inoltre, personalizza la dashboard utilizzando i CSS, consigliato solo agli utenti esperti", "placeholder": "I CSS personalizzati saranno applicati per ultimi", "applying": "Applicazione CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/ja/settings/customization/page-appearance.json b/public/locales/ja/settings/customization/page-appearance.json index c61693067..3c7f56f61 100644 --- a/public/locales/ja/settings/customization/page-appearance.json +++ b/public/locales/ja/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "背景" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "カスタムCSS", "description": "さらに、CSS を使用してダッシュボードをカスタマイズします。経験豊富なユーザーにのみお勧めします。", "placeholder": "カスタムCSSは最後に適用されます", "applying": "CSSを適用中..." } -} \ No newline at end of file +} diff --git a/public/locales/ja/tools/docker.json b/public/locales/ja/tools/docker.json index 2aa379d71..21b96a1ca 100644 --- a/public/locales/ja/tools/docker.json +++ b/public/locales/ja/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "HomarrインスタンスにDockerが設定されていないか、コンテナの取得に失敗しています。統合の設定方法についてはドキュメントを確認してください。" + "text": "" } }, "modals": { diff --git a/public/locales/ko/settings/customization/page-appearance.json b/public/locales/ko/settings/customization/page-appearance.json index 8ab9a02ea..c98bccd4b 100644 --- a/public/locales/ko/settings/customization/page-appearance.json +++ b/public/locales/ko/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "배경" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "커스텀 CSS", "description": "또한 숙련된 사용자에게만 권장되는 CSS를 사용하여 대시보드를 사용자 지정할 수 있습니다.", "placeholder": "사용자 정의 CSS는 마지막에 적용됩니다.", "applying": "CSS 적용하기..." } -} \ No newline at end of file +} diff --git a/public/locales/ko/tools/docker.json b/public/locales/ko/tools/docker.json index f063f840b..379e81c1c 100644 --- a/public/locales/ko/tools/docker.json +++ b/public/locales/ko/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Homarr 인스턴스에 Docker가 구성되어 있지 않거나 컨테이너 가져오기에 실패했습니다. 연동 설정 방법에 대한 설명서를 확인하세요." + "text": "" } }, "modals": { diff --git a/public/locales/lv/settings/customization/page-appearance.json b/public/locales/lv/settings/customization/page-appearance.json index 733c577ab..cfbb998c9 100644 --- a/public/locales/lv/settings/customization/page-appearance.json +++ b/public/locales/lv/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Fons" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "Pielāgotais CSS", "description": "Turklāt pielāgojiet paneli, izmantojot CSS, ieteicams tikai pieredzējušiem lietotājiem", "placeholder": "Pielāgotais CSS tiks piemērots pēdējais", "applying": "CSS piemērošana..." } -} \ No newline at end of file +} diff --git a/public/locales/lv/tools/docker.json b/public/locales/lv/tools/docker.json index 8d85a5b11..453131d1e 100644 --- a/public/locales/lv/tools/docker.json +++ b/public/locales/lv/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Jūsu Homarr instancē nav konfigurēts Docker vai arī tai nav izdevies iegūtu konteinerus. Lūdzu, pārbaudiet dokumentāciju par to, kā iestatīt integrāciju." + "text": "" } }, "modals": { diff --git a/public/locales/nl/settings/customization/page-appearance.json b/public/locales/nl/settings/customization/page-appearance.json index 2cb430867..fd600c677 100644 --- a/public/locales/nl/settings/customization/page-appearance.json +++ b/public/locales/nl/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Achtergrond" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "Eigen CSS", "description": "Pas uw dashboard verder aan met behulp van CSS, alleen aanbevolen voor ervaren gebruikers", "placeholder": "Eigen CSS wordt als laatste toegepast", "applying": "CSS toepassen..." } -} \ No newline at end of file +} diff --git a/public/locales/nl/tools/docker.json b/public/locales/nl/tools/docker.json index edb195413..a85983df6 100644 --- a/public/locales/nl/tools/docker.json +++ b/public/locales/nl/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Docker is niet geconfigureerd in je Homarr instance of het is mislukt om containers op te halen. Raadpleeg de documentatie over het opzetten van de integratie." + "text": "" } }, "modals": { diff --git a/public/locales/no/settings/customization/page-appearance.json b/public/locales/no/settings/customization/page-appearance.json index 480a24074..ab5c95018 100644 --- a/public/locales/no/settings/customization/page-appearance.json +++ b/public/locales/no/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Bakgrunn" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "Egendefinert CSS", "description": "Videre kan du tilpasse dashbordet ved hjelp av CSS, dette er bare anbefalt for erfarne brukere", "placeholder": "Egendefinert CSS vil bli brukt sist", "applying": "Tar i bruk CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/no/tools/docker.json b/public/locales/no/tools/docker.json index 70f359ea1..d3895345b 100644 --- a/public/locales/no/tools/docker.json +++ b/public/locales/no/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Din Homarr-forekomst har ikke Docker konfigurert eller den har mislyktes i å hente containere. Vennligst sjekk dokumentasjonen for hvordan du setter opp integrasjonen." + "text": "" } }, "modals": { diff --git a/public/locales/pl/settings/customization/page-appearance.json b/public/locales/pl/settings/customization/page-appearance.json index 38a94be16..4cdb44fa8 100644 --- a/public/locales/pl/settings/customization/page-appearance.json +++ b/public/locales/pl/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Tło" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "Niestandardowy CSS", "description": "Jeszcze bardziej dostosuj swój pulpit za pomocą CSS, zalecane tylko dla doświadczonych użytkowników", "placeholder": "Custom CSS zostanie zastosowany jako ostatni", "applying": "Zastosowanie CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/pl/tools/docker.json b/public/locales/pl/tools/docker.json index af1ad0e11..5eccbe96a 100644 --- a/public/locales/pl/tools/docker.json +++ b/public/locales/pl/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Twoja instancja Homarr nie ma skonfigurowanego Dockera lub nie była w stanie pobrać listę kontenerów. Sprawdź dokumentację, aby dowiedzieć się, jak skonfigurować integrację." + "text": "" } }, "modals": { diff --git a/public/locales/pt/settings/customization/page-appearance.json b/public/locales/pt/settings/customization/page-appearance.json index 23432dd2f..8f8a32ec9 100644 --- a/public/locales/pt/settings/customization/page-appearance.json +++ b/public/locales/pt/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Antecedentes" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "CSS Personalizado", "description": "Além disso, personalize seu painel usando CSS, recomendado apenas para usuários experientes", "placeholder": "O CSS personalizado será aplicado por último", "applying": "Aplicando CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/pt/tools/docker.json b/public/locales/pt/tools/docker.json index cb36d10c5..b81fe732e 100644 --- a/public/locales/pt/tools/docker.json +++ b/public/locales/pt/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Sua instância Homarr não tem o Docker configurado ou falhou ao buscar contêineres. Consulte a documentação para saber como configurar a integração." + "text": "" } }, "modals": { diff --git a/public/locales/ru/settings/customization/page-appearance.json b/public/locales/ru/settings/customization/page-appearance.json index 59b33ee80..12a05f72c 100644 --- a/public/locales/ru/settings/customization/page-appearance.json +++ b/public/locales/ru/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Фон" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "Пользовательский CSS", "description": "Дополнительная настройка вашей панели с использованием CSS, рекомендуется только опытным пользователям", "placeholder": "Пользовательский CSS будет применяться в последнюю очередь", "applying": "Применение CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/ru/tools/docker.json b/public/locales/ru/tools/docker.json index f39f5582c..a2c8e69a0 100644 --- a/public/locales/ru/tools/docker.json +++ b/public/locales/ru/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "В вашем экземпляре Homarr не настроен Docker или произошла ошибка при получении контейнеров. Пожалуйста, ознакомьтесь с документацией по настройке интеграции." + "text": "" } }, "modals": { diff --git a/public/locales/sk/common.json b/public/locales/sk/common.json index f77d5f23d..86fc75c7a 100644 --- a/public/locales/sk/common.json +++ b/public/locales/sk/common.json @@ -1,7 +1,7 @@ { "save": "Uložiť", - "apply": "", - "insert": "", + "apply": "Použiť", + "insert": "Vložiť", "about": "O aplikácii", "cancel": "Zrušiť", "close": "Zavrieť", @@ -45,7 +45,7 @@ "seeMore": "Viac informácií...", "position": { "left": "Vľavo", - "center": "", + "center": "Na stred", "right": "Vpravo" }, "attributes": { diff --git a/public/locales/sk/layout/modals/about.json b/public/locales/sk/layout/modals/about.json index c3decebc7..cc4879bf9 100644 --- a/public/locales/sk/layout/modals/about.json +++ b/public/locales/sk/layout/modals/about.json @@ -5,10 +5,10 @@ "key": "Klávesová skratka", "action": "Akcia", "keybinds": "Kľúčové väzby", - "translators": "", - "translatorsDescription": "", - "contributors": "", - "contributorsDescription": "", + "translators": "Prekladatelia ({{count}})", + "translatorsDescription": "Vďaka týmto ľuďom je Homarr dostupný v {{languages}} jazykoch! Chcete pomôcť preložiť Homarr do vášho jazyka? Prečítajte si ako na to tu.", + "contributors": "Prispievatelia ({{count}})", + "contributorsDescription": "Títo ľudia vytvorili kód, vďaka ktorému funguje homarr! Chcete pomôcť vybudovať Homarr? Prečítajte si, ako to urobiť tu", "actions": { "toggleTheme": "Prepínanie režimu svetlo/tma", "focusSearchBar": "Zameranie na vyhľadávací panel", diff --git a/public/locales/sk/modules/dns-hole-summary.json b/public/locales/sk/modules/dns-hole-summary.json index 02727a12f..2a88fe64e 100644 --- a/public/locales/sk/modules/dns-hole-summary.json +++ b/public/locales/sk/modules/dns-hole-summary.json @@ -21,8 +21,8 @@ "metrics": { "domainsOnAdlist": "Domény na adlistoch", "queriesToday": "Poziadavky dnes", - "queriesBlockedTodayPercentage": "", - "queriesBlockedToday": "" + "queriesBlockedTodayPercentage": "Zablokované dnes", + "queriesBlockedToday": "Zablokované dnes" } } } diff --git a/public/locales/sk/modules/notebook.json b/public/locales/sk/modules/notebook.json index 15f725a34..332215067 100644 --- a/public/locales/sk/modules/notebook.json +++ b/public/locales/sk/modules/notebook.json @@ -8,7 +8,7 @@ "label": "Zobrazenie panela nástrojov na pomoc pri písaní poznámok" }, "allowReadOnlyCheck": { - "label": "" + "label": "Povolenie kontroly v režime len na čítanie" }, "content": { "label": "Obsah zápisníka" @@ -17,43 +17,43 @@ }, "card": { "controls": { - "bold": "", - "italic": "", - "strikethrough": "", - "underline": "", - "colorText": "", - "colorHighlight": "", - "code": "", - "clear": "", - "heading": "", - "align": "", - "blockquote": "", - "horizontalLine": "", - "bulletList": "", - "orderedList": "", - "checkList": "", - "increaseIndent": "", - "decreaseIndent": "", - "link": "", - "unlink": "", - "image": "", - "addTable": "", - "deleteTable": "", - "colorCell": "", - "mergeCell": "", - "addColumnLeft": "", - "addColumnRight": "", - "deleteColumn": "", - "addRowTop": "", - "addRowBelow": "", - "deleteRow": "" + "bold": "Tučné", + "italic": "Kurzíva", + "strikethrough": "Prečiarknuté", + "underline": "Podčiarknuté", + "colorText": "Farebný text", + "colorHighlight": "Farebné zvýraznenie textu", + "code": "Kód", + "clear": "Vyčistiť formátovanie", + "heading": "Nadpis {{level}}", + "align": "Zarovnanie textu: {{position}}", + "blockquote": "Citát", + "horizontalLine": "Horizontálna čiara", + "bulletList": "Zoznam odrážok", + "orderedList": "Objednaný zoznam", + "checkList": "Kontrolný zoznam", + "increaseIndent": "Zväčšenie odstupu", + "decreaseIndent": "Zníženie odstupu", + "link": "Odkaz", + "unlink": "Odstrániť odkaz", + "image": "Vložiť obrázok", + "addTable": "Pridať tabuľku", + "deleteTable": "Odstrániť tabuľku", + "colorCell": "Farebná bunka", + "mergeCell": "Prepnúť zlúčenie buniek", + "addColumnLeft": "Pridať stĺpec pred", + "addColumnRight": "Pridať stĺpec po", + "deleteColumn": "Vymazať stĺpec", + "addRowTop": "Pridať riadok pred", + "addRowBelow": "Pridať riadok po", + "deleteRow": "Vymazať riadok" }, "modals": { - "clearColor": "", - "source": "", - "widthPlaceholder": "", - "columns": "", - "rows": "" + "clearColor": "Vymazať farbu", + "source": "Zdroj", + "widthPlaceholder": "Hodnota v % alebo pixeloch", + "columns": "Stĺpce", + "rows": "Riadky" } } } \ No newline at end of file diff --git a/public/locales/sk/modules/torrents-status.json b/public/locales/sk/modules/torrents-status.json index 58247faa1..9a67b43a8 100644 --- a/public/locales/sk/modules/torrents-status.json +++ b/public/locales/sk/modules/torrents-status.json @@ -11,10 +11,10 @@ "label": "Zobraz dokončené torrenty" }, "displayActiveTorrents": { - "label": "" + "label": "Zobraziť aktívne torrenty" }, "speedLimitOfActiveTorrents": { - "label": "" + "label": "Rýchlosť odosielania, aby sa torrent považoval za aktívny (kB/s)" }, "displayStaleTorrents": { "label": "Zobraz zastarané torrenty" @@ -27,8 +27,8 @@ "description": "Ak je začiarknuté políčko 'is whitelist', bude sa toto políčko správať ako biela listina. Ak nie je začiarknuté, ide o čiernu listinu. Ak je prázdny, nerobí nič" }, "displayRatioWithFilter": { - "label": "", - "info": "" + "label": "Zobraziť pomer zoznamu filtrovaných torrentov", + "info": "Ak je vypnutý, zobrazí sa iba globálny pomer. Globálny pomer bude stále používať štítky, ak je nastavený" } } }, @@ -36,8 +36,8 @@ "footer": { "error": "Chyba", "lastUpdated": "Naposledy aktualizované pred {{time}}", - "ratioGlobal": "", - "ratioWithFilter": "" + "ratioGlobal": "Globálny pomer", + "ratioWithFilter": "Pomer s filtrom" }, "table": { "header": { diff --git a/public/locales/sk/settings/customization/general.json b/public/locales/sk/settings/customization/general.json index 3e0bbb6bc..942e7baf5 100644 --- a/public/locales/sk/settings/customization/general.json +++ b/public/locales/sk/settings/customization/general.json @@ -22,7 +22,7 @@ "description": "Konfigurácia aplikácie Homarr pre zdravotne postihnutých a hendikepovaných používateľov" }, "access": { - "name": "", + "name": "Prístup", "description": "Konfigurácia osôb, ktoré majú prístup k vašej nástenke" } } diff --git a/public/locales/sk/settings/customization/page-appearance.json b/public/locales/sk/settings/customization/page-appearance.json index d290a9d25..e9bb84291 100644 --- a/public/locales/sk/settings/customization/page-appearance.json +++ b/public/locales/sk/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Pozadie" }, + "backgroundImageAttachment": { + "label": "Pripojenie obrázku na pozadí", + "options": { + "fixed": "Pevné - pozadie zostáva v rovnakej polohe (odporúčané)", + "scroll": "Posúvanie - Pozadie sa posúva myšou" + } + }, + "backgroundImageSize": { + "label": "Veľkosť obrázka na pozadí", + "options": { + "cover": "Cover (Zakryť) - zmenší obrázok na čo najmenšiu veľkosť, aby zakryl celé okno orezaním nadmerného priestoru. (odporúčané)", + "contain": "Obsahovať - zmenší obrázok na čo najväčšiu veľkosť v rámci kontajnera bez orezania alebo roztiahnutia obrázka." + } + }, + "backgroundImageRepeat": { + "label": "Pripojenie obrázku na pozadí", + "options": { + "repeat": "Opakovať - Obrázok sa opakuje toľkokrát, koľko je potrebné na pokrytie celej oblasti maľovania obrázka na pozadí.", + "no-repeat": "Žiadne opakovanie - obrázok sa neopakuje a nemusí vyplniť celý priestor (odporúčané)", + "repeat-x": "Opakovať X - Rovnaké ako \"Opakovať\", ale len na horizontálnej osi.", + "repeat-y": "Opakovať Y - Rovnaké ako \"Opakovať\", ale len na zvislej osi." + } + }, "customCSS": { "label": "Vlastné CSS", "description": "Ďalej si prispôsobte ovládací panel pomocou CSS, odporúča sa len pre skúsených používateľov", "placeholder": "Vlastné CSS sa použije ako posledné", "applying": "Aplikuje sa CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/sl/settings/customization/page-appearance.json b/public/locales/sl/settings/customization/page-appearance.json index 6702f6723..de935c1a5 100644 --- a/public/locales/sl/settings/customization/page-appearance.json +++ b/public/locales/sl/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Ozadje" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "Po meri CSS", "description": "Dadatno prilagodite pogled s CSS. Priporočljivo le za izkušene uporabnike", "placeholder": "Prilagojeni CSS bo uporabljen kot zadnji", "applying": "Uporaba CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/sv/settings/customization/page-appearance.json b/public/locales/sv/settings/customization/page-appearance.json index 01dc814bc..81aecb90b 100644 --- a/public/locales/sv/settings/customization/page-appearance.json +++ b/public/locales/sv/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Bakgrund" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "Anpassad CSS", "description": "Vidare kan du anpassa din instrumentpanel med CSS, vilket endast rekommenderas för erfarna användare", "placeholder": "Anpassad CSS tillämpas sist", "applying": "Tillämpar CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/tr/settings/customization/page-appearance.json b/public/locales/tr/settings/customization/page-appearance.json index a2b32588a..768963087 100644 --- a/public/locales/tr/settings/customization/page-appearance.json +++ b/public/locales/tr/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Arkaplan" }, + "backgroundImageAttachment": { + "label": "Arkaplan resim ekle", + "options": { + "fixed": "Düzeltildi - Arka plan aynı konumda kalıyor (tavsiye edilen)", + "scroll": "Kaydırma - Arka plan farenizle kaydırılır" + } + }, + "backgroundImageSize": { + "label": "Arkaplan resim boyutu", + "options": { + "cover": "Kapak - Fazla alanı kırparak tüm pencereyi kaplamak için görüntüyü mümkün olduğunca küçük ölçeklendirir. (tavsiye edilen)", + "contain": "Kapsam - Görüntüyü kırpmadan veya genişletmeden, kapsayıcısı içinde mümkün olduğu kadar büyük ölçeklendirir." + } + }, + "backgroundImageRepeat": { + "label": "Arkaplan resim ekle", + "options": { + "repeat": "Tekrarla - Resim, arka plan görüntü alanının tamamını kapsayacak şekilde gerektiği kadar tekrarlanır.", + "no-repeat": "", + "repeat-x": "Tekrarla X - 'Tekrarla' ile aynıdır ancak yalnızca yatay eksende.", + "repeat-y": "Tekrar Y - 'Tekrarla' ile aynıdır, ancak yalnızca dikey eksende." + } + }, "customCSS": { "label": "Özel CSS", "description": "Ayrıca, yalnızca deneyimli kullanıcılar için önerilen CSS kullanarak kontrol panelinizi özelleştirin", "placeholder": "Özel CSS en son uygulanacaktır", "applying": "CSS uygulanıyor..." } -} \ No newline at end of file +} diff --git a/public/locales/tr/tools/docker.json b/public/locales/tr/tools/docker.json index 7c0e3e97d..bceffabd0 100644 --- a/public/locales/tr/tools/docker.json +++ b/public/locales/tr/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Homarr örneğinizde Docker yapılandırılmış değil veya konteynırları getirmede başarısız oldu. Lütfen entegrasyonun nasıl kurulacağına ilişkin belgeleri kontrol edin." + "text": "Homarr yapılandırmanızda, Docker yapılandırılmamış veya konteynırları getirmede başarısız oldu. Lütfen entegrasyonun nasıl yapılacağına ilişkin belgeleri kontrol edin." } }, "modals": { diff --git a/public/locales/tw/settings/customization/page-appearance.json b/public/locales/tw/settings/customization/page-appearance.json index 65fb4d33e..4aa50d4d4 100644 --- a/public/locales/tw/settings/customization/page-appearance.json +++ b/public/locales/tw/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "背景" }, + "backgroundImageAttachment": { + "label": "背景圖片附件", + "options": { + "fixed": "固定 - 背景保持在同一位置 (推薦)", + "scroll": "滾動 - 背景隨滑鼠滾動" + } + }, + "backgroundImageSize": { + "label": "背景圖像大小", + "options": { + "cover": "覆蓋 - 通過剪裁多餘的區域,將圖像縮放到盡可能小的方式來覆蓋整個窗口 (推薦)", + "contain": "包含 - 在不剪裁或拉伸圖像的方式下,在容器中盡可能大的方式來縮放圖像" + } + }, + "backgroundImageRepeat": { + "label": "背景圖片附件", + "options": { + "repeat": "重複 - 根據需要重複圖像,以覆蓋整個背景圖像繪製區域", + "no-repeat": "不重複 - 圖像不重複且不填滿整個區域 (推薦)", + "repeat-x": "重複 X 軸 - 與\"重複\"相同,但只在水平軸上重複", + "repeat-y": "重複 Y 軸 - 與\"重複\"相同,但只在垂直上重複" + } + }, "customCSS": { "label": "自定義 CSS", "description": "此外,只推薦有經驗的使用者使用 CSS 自定義面板", "placeholder": "自定義 CSS 將最後應用", "applying": "應用 CSS 中..." } -} \ No newline at end of file +} diff --git a/public/locales/tw/tools/docker.json b/public/locales/tw/tools/docker.json index 57f79d877..fd70d287f 100644 --- a/public/locales/tw/tools/docker.json +++ b/public/locales/tw/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "您的 Homarr 實例未設定 Docker,或無法獲取容器,請查看文檔了解如設定集成" + "text": "您的 Homarr 實例未配置 Docker,或無法獲取容器。請查說明,了解如何設定集成" } }, "modals": { diff --git a/public/locales/uk/settings/customization/page-appearance.json b/public/locales/uk/settings/customization/page-appearance.json index 3c5adce8f..f4ca83a4d 100644 --- a/public/locales/uk/settings/customization/page-appearance.json +++ b/public/locales/uk/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Фон" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "Власний CSS", "description": "Крім того, налаштуйте дашборд за допомогою CSS, що рекомендується лише досвідченим користувачам", "placeholder": "Власний CSS буде оброблятися в останню чергу", "applying": "Застосувати CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/uk/tools/docker.json b/public/locales/uk/tools/docker.json index e75f23653..d553bf758 100644 --- a/public/locales/uk/tools/docker.json +++ b/public/locales/uk/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "У вашому екземплярі Homarr не налаштовано Docker або він помилково завантажив контейнери. Будь ласка, зверніться до документації про те, як налаштувати інтеграцію." + "text": "" } }, "modals": { diff --git a/public/locales/vi/settings/customization/page-appearance.json b/public/locales/vi/settings/customization/page-appearance.json index ff16304c0..ef0e7f90f 100644 --- a/public/locales/vi/settings/customization/page-appearance.json +++ b/public/locales/vi/settings/customization/page-appearance.json @@ -18,10 +18,33 @@ "background": { "label": "Hình nền" }, + "backgroundImageAttachment": { + "label": "", + "options": { + "fixed": "", + "scroll": "" + } + }, + "backgroundImageSize": { + "label": "", + "options": { + "cover": "", + "contain": "" + } + }, + "backgroundImageRepeat": { + "label": "", + "options": { + "repeat": "", + "no-repeat": "", + "repeat-x": "", + "repeat-y": "" + } + }, "customCSS": { "label": "CSS tuỳ chỉnh", "description": "Ngoài ra có thể tùy chỉnh bảng điều khiển của bạn bằng CSS, chỉ được đề xuất cho người dùng có kinh nghiệm", "placeholder": "CSS tùy chỉnh sẽ được áp dụng sau cùng", "applying": "Đang áp dụng CSS..." } -} \ No newline at end of file +} diff --git a/public/locales/vi/tools/docker.json b/public/locales/vi/tools/docker.json index 7542e70c1..5f57baf16 100644 --- a/public/locales/vi/tools/docker.json +++ b/public/locales/vi/tools/docker.json @@ -2,7 +2,7 @@ "title": "Docker", "alerts": { "notConfigured": { - "text": "Phiên bản Homarr của bạn không được định cấu hình Docker hoặc không thể tìm nạp vùng chứa. Vui lòng kiểm tra tài liệu về cách thiết lập tích hợp." + "text": "" } }, "modals": { From c9d1a1229927929b3b998e048c80fb8062e76538 Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Tue, 14 Nov 2023 20:31:39 +0100 Subject: [PATCH 25/33] =?UTF-8?q?=F0=9F=90=9B=20Copy=20`default.json`=20if?= =?UTF-8?q?=20it=20doesn't=20exist=20(#1636)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/run.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/run.sh b/scripts/run.sh index 67c5cb508..ba017d05e 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -8,6 +8,9 @@ cd ./migrate; yarn db:migrate & PID=$! # Wait for migration to finish wait $PID +## If 'default.json' does not exist in '/app/data/configs', we copy it from '/app/data/default.json' +cp -n /app/data/default.json /app/data/configs/default.json + echo "Starting production server..." node /app/server.js & PID=$! From a0efd01d433590be0018f941407fb58193ef0deb Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Tue, 14 Nov 2023 20:42:17 +0100 Subject: [PATCH 26/33] =?UTF-8?q?=F0=9F=90=9B=20Error=20object=20not=20com?= =?UTF-8?q?patible=20with=20json=20parsing=20of=20gssp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Onboarding/database-not-writeable.tsx | 14 +++++++---- src/pages/onboard.tsx | 24 ++++++++++++------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/components/Onboarding/database-not-writeable.tsx b/src/components/Onboarding/database-not-writeable.tsx index ac1e92527..b2d313a9d 100644 --- a/src/components/Onboarding/database-not-writeable.tsx +++ b/src/components/Onboarding/database-not-writeable.tsx @@ -1,7 +1,13 @@ import { Center, Code, List, Stack, Text, Title } from '@mantine/core'; import Head from 'next/head'; -export const DatabaseNotWriteable = ({ error, errorMessage }: { error: any | unknown, errorMessage: string | undefined }) => { +export const DatabaseNotWriteable = ({ + stringifiedError, + errorMessage, +}: { + stringifiedError: string | undefined; + errorMessage: string | undefined; +}) => { return ( <> @@ -30,11 +36,9 @@ export const DatabaseNotWriteable = ({ error, errorMessage }: { error: any | unk - {error && JSON.stringify(error)} + {stringifiedError} - {errorMessage && ( - {errorMessage} - )} + {errorMessage && {errorMessage}} diff --git a/src/pages/onboard.tsx b/src/pages/onboard.tsx index ab7b4b55d..bad0f1f23 100644 --- a/src/pages/onboard.tsx +++ b/src/pages/onboard.tsx @@ -21,8 +21,8 @@ const exec = util.promisify(require('child_process').exec); export default function OnboardPage({ configSchemaVersions, databaseNotWriteable, - error, - errorMessage + stringifiedError, + errorMessage, }: InferGetServerSidePropsType) { const { fn, colors, colorScheme } = useMantineTheme(); const background = colorScheme === 'dark' ? 'dark.6' : 'gray.1'; @@ -49,7 +49,7 @@ export default function OnboardPage({ {databaseNotWriteable == true ? ( - + ) : ( <> {onboardingSteps ? ( @@ -117,7 +117,8 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { ...translations, configSchemaVersions: configSchemaVersions, databaseNotWriteable: true, - error: error, + errorMessage: 'Database is not writeable', + stringifiedError: JSON.stringify(error), }, }; } @@ -128,13 +129,18 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { const { stdout, stderr } = await exec("mount | grep '/data'"); if (stderr.split('\n').length > 1 || stdout.split('\n').length <= 1) { - Consola.error(`Database at '${rawDatabaseUrl}' has not been mounted: ${stdout.replace('\n', '\\n')} ${stderr.replace('\n', '\\n')}`); + Consola.error( + `Database at '${rawDatabaseUrl}' has not been mounted: ${stdout.replace( + '\n', + '\\n' + )} ${stderr.replace('\n', '\\n')}` + ); return { props: { ...translations, configSchemaVersions: configSchemaVersions, databaseNotWriteable: true, - error: `Database at '${rawDatabaseUrl}' is not mounted:\n${stdout}`, + errorMessage: `Database at '${rawDatabaseUrl}' is not mounted:\n${stdout}`, }, }; } @@ -146,8 +152,8 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { ...translations, configSchemaVersions: configSchemaVersions, databaseNotWriteable: true, - error: error, - errorMessage: errorMessage + stringifiedError: JSON.stringify(error), + errorMessage: errorMessage, }, }; } @@ -160,7 +166,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { props: { ...translations, configSchemaVersions: configSchemaVersions, - databaseNotWriteable: false + databaseNotWriteable: false, }, }; }; From 7634062a85aaf4125a4318a65c3f0a8cf7ac7140 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Tue, 14 Nov 2023 20:42:17 +0100 Subject: [PATCH 27/33] =?UTF-8?q?=F0=9F=90=9B=20Error=20object=20not=20com?= =?UTF-8?q?patible=20with=20json=20parsing=20of=20gssp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Onboarding/database-not-writeable.tsx | 14 +++++++---- src/pages/onboard.tsx | 24 ++++++++++++------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/components/Onboarding/database-not-writeable.tsx b/src/components/Onboarding/database-not-writeable.tsx index ac1e92527..b2d313a9d 100644 --- a/src/components/Onboarding/database-not-writeable.tsx +++ b/src/components/Onboarding/database-not-writeable.tsx @@ -1,7 +1,13 @@ import { Center, Code, List, Stack, Text, Title } from '@mantine/core'; import Head from 'next/head'; -export const DatabaseNotWriteable = ({ error, errorMessage }: { error: any | unknown, errorMessage: string | undefined }) => { +export const DatabaseNotWriteable = ({ + stringifiedError, + errorMessage, +}: { + stringifiedError: string | undefined; + errorMessage: string | undefined; +}) => { return ( <> @@ -30,11 +36,9 @@ export const DatabaseNotWriteable = ({ error, errorMessage }: { error: any | unk - {error && JSON.stringify(error)} + {stringifiedError} - {errorMessage && ( - {errorMessage} - )} + {errorMessage && {errorMessage}} diff --git a/src/pages/onboard.tsx b/src/pages/onboard.tsx index ab7b4b55d..bad0f1f23 100644 --- a/src/pages/onboard.tsx +++ b/src/pages/onboard.tsx @@ -21,8 +21,8 @@ const exec = util.promisify(require('child_process').exec); export default function OnboardPage({ configSchemaVersions, databaseNotWriteable, - error, - errorMessage + stringifiedError, + errorMessage, }: InferGetServerSidePropsType) { const { fn, colors, colorScheme } = useMantineTheme(); const background = colorScheme === 'dark' ? 'dark.6' : 'gray.1'; @@ -49,7 +49,7 @@ export default function OnboardPage({ {databaseNotWriteable == true ? ( - + ) : ( <> {onboardingSteps ? ( @@ -117,7 +117,8 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { ...translations, configSchemaVersions: configSchemaVersions, databaseNotWriteable: true, - error: error, + errorMessage: 'Database is not writeable', + stringifiedError: JSON.stringify(error), }, }; } @@ -128,13 +129,18 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { const { stdout, stderr } = await exec("mount | grep '/data'"); if (stderr.split('\n').length > 1 || stdout.split('\n').length <= 1) { - Consola.error(`Database at '${rawDatabaseUrl}' has not been mounted: ${stdout.replace('\n', '\\n')} ${stderr.replace('\n', '\\n')}`); + Consola.error( + `Database at '${rawDatabaseUrl}' has not been mounted: ${stdout.replace( + '\n', + '\\n' + )} ${stderr.replace('\n', '\\n')}` + ); return { props: { ...translations, configSchemaVersions: configSchemaVersions, databaseNotWriteable: true, - error: `Database at '${rawDatabaseUrl}' is not mounted:\n${stdout}`, + errorMessage: `Database at '${rawDatabaseUrl}' is not mounted:\n${stdout}`, }, }; } @@ -146,8 +152,8 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { ...translations, configSchemaVersions: configSchemaVersions, databaseNotWriteable: true, - error: error, - errorMessage: errorMessage + stringifiedError: JSON.stringify(error), + errorMessage: errorMessage, }, }; } @@ -160,7 +166,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { props: { ...translations, configSchemaVersions: configSchemaVersions, - databaseNotWriteable: false + databaseNotWriteable: false, }, }; }; From f06dff7bb7d3c6f7c602d5f4feed096730b07fc4 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Tue, 14 Nov 2023 20:52:05 +0100 Subject: [PATCH 28/33] =?UTF-8?q?=F0=9F=90=9B=20Add=20production=20environ?= =?UTF-8?q?ment=20check=20before=20checking=20mountpoint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/onboard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/onboard.tsx b/src/pages/onboard.tsx index bad0f1f23..43331fb63 100644 --- a/src/pages/onboard.tsx +++ b/src/pages/onboard.tsx @@ -124,7 +124,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { } Consola.info('Database is writeable'); - if (process.platform !== 'win32') { + if (process.platform !== 'win32' || env.NEXT_PUBLIC_NODE_ENV === 'development') { try { const { stdout, stderr } = await exec("mount | grep '/data'"); From de2a632a4e8157db0902e618deac017043afc72f Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Tue, 14 Nov 2023 20:52:22 +0100 Subject: [PATCH 29/33] =?UTF-8?q?=F0=9F=90=9B=20Failed=20to=20stage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/onboard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/onboard.tsx b/src/pages/onboard.tsx index 43331fb63..c18d7ad9a 100644 --- a/src/pages/onboard.tsx +++ b/src/pages/onboard.tsx @@ -124,7 +124,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { } Consola.info('Database is writeable'); - if (process.platform !== 'win32' || env.NEXT_PUBLIC_NODE_ENV === 'development') { + if (process.platform !== 'win32' && env.NEXT_PUBLIC_NODE_ENV === 'production') { try { const { stdout, stderr } = await exec("mount | grep '/data'"); From a2cfe8391e19bb417ea3622a26e1223587894cb9 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Tue, 14 Nov 2023 20:58:08 +0100 Subject: [PATCH 30/33] Remove mount check do to automatic mounting with Volume in Dockerfile --- src/pages/onboard.tsx | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/src/pages/onboard.tsx b/src/pages/onboard.tsx index c18d7ad9a..238d4ef82 100644 --- a/src/pages/onboard.tsx +++ b/src/pages/onboard.tsx @@ -122,42 +122,6 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { }, }; } - Consola.info('Database is writeable'); - - if (process.platform !== 'win32' && env.NEXT_PUBLIC_NODE_ENV === 'production') { - try { - const { stdout, stderr } = await exec("mount | grep '/data'"); - - if (stderr.split('\n').length > 1 || stdout.split('\n').length <= 1) { - Consola.error( - `Database at '${rawDatabaseUrl}' has not been mounted: ${stdout.replace( - '\n', - '\\n' - )} ${stderr.replace('\n', '\\n')}` - ); - return { - props: { - ...translations, - configSchemaVersions: configSchemaVersions, - databaseNotWriteable: true, - errorMessage: `Database at '${rawDatabaseUrl}' is not mounted:\n${stdout}`, - }, - }; - } - } catch (error) { - const errorMessage = `Database at '${rawDatabaseUrl}' has not been mounted: ${error}`; - Consola.error(errorMessage); - return { - props: { - ...translations, - configSchemaVersions: configSchemaVersions, - databaseNotWriteable: true, - stringifiedError: JSON.stringify(error), - errorMessage: errorMessage, - }, - }; - } - } Consola.info(`Database at '${rawDatabaseUrl}' is writeable and mounted`); } From 8ee28767fc03d1de4d43a97ff992eb1858827628 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Tue, 14 Nov 2023 21:06:07 +0100 Subject: [PATCH 31/33] =?UTF-8?q?=F0=9F=90=9B=20Fix=20build=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/onboard.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pages/onboard.tsx b/src/pages/onboard.tsx index 238d4ef82..fef7b63ad 100644 --- a/src/pages/onboard.tsx +++ b/src/pages/onboard.tsx @@ -15,9 +15,6 @@ import { getTotalUserCountAsync } from '~/server/db/queries/user'; import { getConfig } from '~/tools/config/getConfig'; import { getServerSideTranslations } from '~/tools/server/getServerSideTranslations'; -const util = require('util'); -const exec = util.promisify(require('child_process').exec); - export default function OnboardPage({ configSchemaVersions, databaseNotWriteable, From 6484ed59766dacfa175a76f9a7f17d8df1fe60cf Mon Sep 17 00:00:00 2001 From: ajnart Date: Tue, 14 Nov 2023 21:10:04 +0100 Subject: [PATCH 32/33] add `country` again --- src/tools/language.ts | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/tools/language.ts b/src/tools/language.ts index b351e1e76..62c3abc86 100644 --- a/src/tools/language.ts +++ b/src/tools/language.ts @@ -6,7 +6,7 @@ export type Language = { /** * https://www.iso.org/obp/ui/#search */ - + country: string; locale: string; }; @@ -15,6 +15,7 @@ export const languages = [ shortName: 'en', originalName: 'English', translatedName: 'English', + country: 'GB', locale: 'en-gb', }, { @@ -22,161 +23,188 @@ export const languages = [ originalName: 'Crowdin', translatedName: '(Live translation)', locale: 'cr', + country: 'CROWDIN', }, { shortName: 'fr', originalName: 'Français', translatedName: 'French', + country: 'FR', locale: 'fr', }, { shortName: 'cn', originalName: '中文', translatedName: 'Chinese (Simplified)', + country: 'CN', locale: 'zh-cn', }, { shortName: 'cs', originalName: 'Čeština', translatedName: 'Czech', + country: 'CZ', locale: 'cs', }, { shortName: 'da', originalName: 'Dansk', translatedName: 'Danish', + country: 'DK', locale: 'da', }, { shortName: 'de', originalName: 'Deutsch', translatedName: 'German', + country: 'DE', locale: 'de', }, { + shortName: 'el', originalName: 'Ελληνικά', translatedName: 'Greek', - shortName: 'el', + country: 'GR', locale: 'el', }, { shortName: 'es', originalName: 'Español', translatedName: 'Spanish', + country: 'ES', locale: 'es', }, { shortName: 'he', originalName: 'עברית', translatedName: 'Hebrew', + country: 'IL', locale: 'he', }, { shortName: 'hr', originalName: 'Hrvatski', translatedName: 'Croatian', + country: 'HR', locale: 'hr', }, { shortName: 'hu', originalName: 'Magyar', translatedName: 'Hungarian', + country: 'HU', locale: 'hu', }, { shortName: 'it', originalName: 'Italiano', translatedName: 'Italian', + country: 'IT', locale: 'it', }, { shortName: 'ja', originalName: '日本語', translatedName: 'Japanese', + country: 'JP', locale: 'ja', }, { shortName: 'ko', originalName: '한국어', translatedName: 'Korean', + country: 'KR', locale: 'ko', }, { shortName: 'lv', originalName: 'Latvian', translatedName: 'Latvian', + country: 'LV', locale: 'lv', }, { shortName: 'nl', originalName: 'Nederlands', translatedName: 'Dutch', + country: 'NL', locale: 'nl', }, { shortName: 'no', originalName: 'Norsk', translatedName: 'Norwegian', + country: 'NO', locale: 'no', }, { shortName: 'pl', originalName: 'Polski', translatedName: 'Polish', + country: 'PL', locale: 'pl', }, { shortName: 'pt', originalName: 'Português', translatedName: 'Portuguese', + country: 'PT', locale: 'pt', }, { shortName: 'ru', originalName: 'Русский', translatedName: 'Russian', + country: 'RU', locale: 'ru', }, { shortName: 'sk', originalName: 'Slovenčina', translatedName: 'Slovak', + country: 'SK', locale: 'sk', }, { shortName: 'sl', originalName: 'Slovenščina', translatedName: 'Slovenian', + country: 'SI', locale: 'sl', }, { shortName: 'sv', originalName: 'Svenska', translatedName: 'Swedish', + country: 'SE', locale: 'sv', }, { shortName: 'tr', originalName: 'Türkçe', translatedName: 'Turkish', + country: 'TR', locale: 'tr', }, { shortName: 'tw', originalName: '中文', translatedName: 'Chinese (Traditional)', + country: 'TW', locale: 'zh-tw', }, { shortName: 'uk', originalName: 'Українська', translatedName: 'Ukrainian', + country: 'UA', locale: 'uk', }, { shortName: 'vi', originalName: 'Tiếng Việt', translatedName: 'Vietnamese', + country: 'VN', locale: 'vi', }, ] as const satisfies Readonly; From 687c7587df6ab1dc61cc21a3eff58bcd45af8a38 Mon Sep 17 00:00:00 2001 From: ajnart Date: Tue, 14 Nov 2023 21:11:41 +0100 Subject: [PATCH 33/33] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Remove=20the=20check?= =?UTF-8?q?s=20for=20mounts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/onboard.tsx | 40 ---------------------------------- src/pages/user/preferences.tsx | 2 +- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/src/pages/onboard.tsx b/src/pages/onboard.tsx index bad0f1f23..de85c4eff 100644 --- a/src/pages/onboard.tsx +++ b/src/pages/onboard.tsx @@ -15,9 +15,6 @@ import { getTotalUserCountAsync } from '~/server/db/queries/user'; import { getConfig } from '~/tools/config/getConfig'; import { getServerSideTranslations } from '~/tools/server/getServerSideTranslations'; -const util = require('util'); -const exec = util.promisify(require('child_process').exec); - export default function OnboardPage({ configSchemaVersions, databaseNotWriteable, @@ -123,43 +120,6 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { }; } Consola.info('Database is writeable'); - - if (process.platform !== 'win32') { - try { - const { stdout, stderr } = await exec("mount | grep '/data'"); - - if (stderr.split('\n').length > 1 || stdout.split('\n').length <= 1) { - Consola.error( - `Database at '${rawDatabaseUrl}' has not been mounted: ${stdout.replace( - '\n', - '\\n' - )} ${stderr.replace('\n', '\\n')}` - ); - return { - props: { - ...translations, - configSchemaVersions: configSchemaVersions, - databaseNotWriteable: true, - errorMessage: `Database at '${rawDatabaseUrl}' is not mounted:\n${stdout}`, - }, - }; - } - } catch (error) { - const errorMessage = `Database at '${rawDatabaseUrl}' has not been mounted: ${error}`; - Consola.error(errorMessage); - return { - props: { - ...translations, - configSchemaVersions: configSchemaVersions, - databaseNotWriteable: true, - stringifiedError: JSON.stringify(error), - errorMessage: errorMessage, - }, - }; - } - } - - Consola.info(`Database at '${rawDatabaseUrl}' is writeable and mounted`); } return { diff --git a/src/pages/user/preferences.tsx b/src/pages/user/preferences.tsx index e2eba85f0..85b81532f 100644 --- a/src/pages/user/preferences.tsx +++ b/src/pages/user/preferences.tsx @@ -11,7 +11,6 @@ import { } from '@mantine/core'; import { createFormContext } from '@mantine/form'; import { IconArrowLeft } from '@tabler/icons-react'; -import { changeLanguage } from 'i18next'; import { GetServerSideProps } from 'next'; import { useTranslation } from 'next-i18next'; import Head from 'next/head'; @@ -74,6 +73,7 @@ const SettingsComponent = ({ label: language.originalName, description: language.translatedName, value: language.shortName, + country: language.country, })); const { t, i18n } = useTranslation(['user/preferences', 'common']);