From d46f5f461344f02dd38ea769b9462d195ae3cf9c Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Tue, 13 Sep 2022 20:48:08 +0300 Subject: [PATCH 01/50] reverse status icons for Tautulli --- src/components/services/widgets/service/tautulli.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/services/widgets/service/tautulli.jsx b/src/components/services/widgets/service/tautulli.jsx index 3902d4fc5..4a97b8d79 100644 --- a/src/components/services/widgets/service/tautulli.jsx +++ b/src/components/services/widgets/service/tautulli.jsx @@ -48,10 +48,10 @@ function SingleSessionEntry({ session }) { />
{state === "paused" && ( - + )} {state !== "paused" && ( - + )}
@@ -76,10 +76,10 @@ function SessionEntry({ session }) { />
{state === "paused" && ( - + )} {state !== "paused" && ( - + )} {full_title}
From cf4b230b7ad65511ca4f444905f2d5059e2312be Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Tue, 13 Sep 2022 20:56:08 +0300 Subject: [PATCH 02/50] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..f989048e5 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +ben@phelps.io. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From 5baaf5faec49f9936aca5709992fc975ff3296ac Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Tue, 13 Sep 2022 21:15:55 +0300 Subject: [PATCH 03/50] Create CONTRIBUTING.md --- CONTRIBUTING.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..b80f89fb9 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,41 @@ +# Contributing to Homepage +We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's: + +- Reporting a bug +- Discussing the current state of the project +- Submitting a fix +- Proposing new features +- Becoming a maintainer + +## We Develop with Github +We use github to host code, to track issues and feature requests, as well as accept pull requests. + +## Any contributions you make will be under the GNU General Public License v3.0 +In short, when you submit code changes, your submissions are understood to be under the same [GNU General Public License v3.0](https://choosealicense.com/licenses/gpl-3.0/) that covers the project. Feel free to contact the maintainers if that's a concern. + +## Report bugs using Github's [issues](https://github.com/benphelps/homepage/issues) +We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/benphelps/homepage/issues/new); it's that easy! + +## Write bug reports with detail, background, and sample configurations +Homepage includes a lot of configuration options and is often deploying in larger systems. Please include as much information (configurations, deployment method, Docker & API versions, etc) as you can when reporting an issue. + +**Great Bug Reports** tend to have: + +- A quick summary and/or background +- Steps to reproduce + - Be specific! + - Give example configurations if you can. +- What you expected would happen +- What actually happens +- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) + +People *love* thorough bug reports. I'm not even kidding. + +## Use a Consistent Coding Style +This project follows the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript), please follow it when submitting pull requests. + +## License +By contributing, you agree that your contributions will be licensed under its GNU General Public License. + +## References +This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/main/CONTRIBUTING.md) From b312183a7b35d47cd58f2fbec55f1d4b5d17a554 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Tue, 13 Sep 2022 21:22:14 +0300 Subject: [PATCH 04/50] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 37 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..5b0864a16 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,37 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[Bug]" +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. macOS Ventura] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. + +This includes things like: + - Service version or API version + - Docker version + - Deployment method + - Sample YAML configurations diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..400d18bcb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[Feature Request] " +labels: '' +assignees: '' + +--- + +**Is your feature request related to a service? Please describe.** +A clear and concise description of what you would like to see from this service. + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I would like it if [...] + +**Describe the solution you'd like** +A clear and concise description of how you'd like it to be. + +**Additional context** +Add any other context or screenshots about the feature request here. From 8ee071769a13919e00a717f0d7d3668032a6d701 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Tue, 13 Sep 2022 21:25:53 +0300 Subject: [PATCH 05/50] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 5b0864a16..7b7740a94 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,7 @@ --- name: Bug report about: Create a report to help us improve -title: "[Bug]" +title: "[Bug] " labels: '' assignees: '' @@ -16,16 +16,10 @@ A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. -**Desktop (please complete the following information):** - - OS: [e.g. macOS Ventura] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] +**Configuration** +```yaml +# Please provide your service, widget or otherwise related configuration here +``` **Additional context** Add any other context about the problem here. From cf03e6018634cd0e4767eeb391d1581e002e79b1 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Tue, 13 Sep 2022 21:26:20 +0300 Subject: [PATCH 06/50] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7b7740a94..bced1e3ca 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -22,9 +22,7 @@ If applicable, add screenshots to help explain your problem. ``` **Additional context** -Add any other context about the problem here. - -This includes things like: +Add any other context about the problem here. This includes things like: - Service version or API version - Docker version - Deployment method From f75827c4c64191ede7fb4a35145a99b9c11dc2f4 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Tue, 13 Sep 2022 21:27:05 +0300 Subject: [PATCH 07/50] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index bced1e3ca..48ae7fdc9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -17,6 +17,7 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Configuration** +If applicable, ```yaml # Please provide your service, widget or otherwise related configuration here ``` From 16ddb2461b945374effcb146a08c02dc9d91a1da Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Tue, 13 Sep 2022 21:27:43 +0300 Subject: [PATCH 08/50] Update feature_request.md --- .github/ISSUE_TEMPLATE/feature_request.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 400d18bcb..05d91b523 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -13,8 +13,5 @@ A clear and concise description of what you would like to see from this service. **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I would like it if [...] -**Describe the solution you'd like** -A clear and concise description of how you'd like it to be. - **Additional context** Add any other context or screenshots about the feature request here. From 767aa9b3e1d8640347e5153aa62ffdc3afb95886 Mon Sep 17 00:00:00 2001 From: Chris McGravey Date: Tue, 13 Sep 2022 15:35:53 -0500 Subject: [PATCH 09/50] Update CoinMarketCap widget to have time selector --- public/locales/de/common.json | 8 +++- public/locales/en/common.json | 6 ++- public/locales/es/common.json | 8 +++- public/locales/fr/common.json | 8 +++- public/locales/it/common.json | 8 +++- public/locales/nb-NO/common.json | 8 +++- public/locales/nl/common.json | 8 +++- public/locales/pt/common.json | 8 +++- public/locales/ru/common.json | 8 +++- public/locales/vi/common.json | 8 +++- public/locales/zh-CN/common.json | 8 +++- public/locales/zh-Hant/common.json | 8 +++- src/components/services/dropdown.jsx | 44 +++++++++++++++++++ src/components/services/item.jsx | 18 +++++++- src/components/services/widget.jsx | 6 +-- .../widgets/service/coinmarketcap.jsx | 17 ++++--- 16 files changed, 145 insertions(+), 34 deletions(-) create mode 100644 src/components/services/dropdown.jsx diff --git a/public/locales/de/common.json b/public/locales/de/common.json index bbb5ff666..2198488cf 100644 --- a/public/locales/de/common.json +++ b/public/locales/de/common.json @@ -109,8 +109,12 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" - }, + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, "gotify": { "apps": "Applications", "clients": "Clients", diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 5fbaaf216..60bfef6b7 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -126,7 +126,11 @@ "total": "Total" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" }, "gotify": { "apps": "Applications", diff --git a/public/locales/es/common.json b/public/locales/es/common.json index d61bda0e9..b9f928fb5 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -109,8 +109,12 @@ "downloaded": "Descargado" }, "coinmarketcap": { - "configure": "Configurar una o varias criptomonedas para su seguimiento" - }, + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, "gotify": { "apps": "Aplicaciones", "clients": "Clientes", diff --git a/public/locales/fr/common.json b/public/locales/fr/common.json index 924d88a61..0f3cc5e3e 100644 --- a/public/locales/fr/common.json +++ b/public/locales/fr/common.json @@ -120,8 +120,12 @@ "rate": "Évaluer" }, "coinmarketcap": { - "configure": "Configurer une ou plusieurs crypto-monnaies à suivre" - }, + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, "gotify": { "apps": "Applications", "clients": "Clients", diff --git a/public/locales/it/common.json b/public/locales/it/common.json index 585aae1e0..0d53c8cbc 100644 --- a/public/locales/it/common.json +++ b/public/locales/it/common.json @@ -109,8 +109,12 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" - }, + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, "gotify": { "apps": "Applications", "clients": "Clients", diff --git a/public/locales/nb-NO/common.json b/public/locales/nb-NO/common.json index 141378e8b..62f6fa338 100644 --- a/public/locales/nb-NO/common.json +++ b/public/locales/nb-NO/common.json @@ -109,8 +109,12 @@ "remaining": "Gjenstående" }, "coinmarketcap": { - "configure": "Sett opp én eller flere kryptovalutaer å holde øye med" - }, + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, "gotify": { "apps": "Programmer", "clients": "Klienter", diff --git a/public/locales/nl/common.json b/public/locales/nl/common.json index d2975cd2e..6ca2a79bf 100644 --- a/public/locales/nl/common.json +++ b/public/locales/nl/common.json @@ -109,8 +109,12 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" - }, + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, "gotify": { "apps": "Applications", "clients": "Clients", diff --git a/public/locales/pt/common.json b/public/locales/pt/common.json index 4dafc19f2..eb18e0879 100644 --- a/public/locales/pt/common.json +++ b/public/locales/pt/common.json @@ -120,8 +120,12 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" - }, + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, "gotify": { "apps": "Aplicações", "clients": "Clientes", diff --git a/public/locales/ru/common.json b/public/locales/ru/common.json index 0f4ae8af4..a35c8869c 100644 --- a/public/locales/ru/common.json +++ b/public/locales/ru/common.json @@ -109,8 +109,12 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" - }, + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, "gotify": { "apps": "Applications", "clients": "Clients", diff --git a/public/locales/vi/common.json b/public/locales/vi/common.json index ab6122f76..4572e4c74 100644 --- a/public/locales/vi/common.json +++ b/public/locales/vi/common.json @@ -109,8 +109,12 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" - }, + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, "gotify": { "apps": "Applications", "clients": "Clients", diff --git a/public/locales/zh-CN/common.json b/public/locales/zh-CN/common.json index b324f35bf..ba4f896bc 100644 --- a/public/locales/zh-CN/common.json +++ b/public/locales/zh-CN/common.json @@ -109,8 +109,12 @@ "downloaded": "下载" }, "coinmarketcap": { - "configure": "配置一个或多个需要追踪的加密" - }, + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, "gotify": { "apps": "应用", "clients": "客户端", diff --git a/public/locales/zh-Hant/common.json b/public/locales/zh-Hant/common.json index 63df53691..c02d976c4 100644 --- a/public/locales/zh-Hant/common.json +++ b/public/locales/zh-Hant/common.json @@ -114,8 +114,12 @@ "total": "Total" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" - }, + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, "prowlarr": { "enableIndexers": "Indexers", "numberOfGrabs": "Grabs", diff --git a/src/components/services/dropdown.jsx b/src/components/services/dropdown.jsx new file mode 100644 index 000000000..c7aad96e5 --- /dev/null +++ b/src/components/services/dropdown.jsx @@ -0,0 +1,44 @@ +import { Fragment } from "react"; +import { Menu, Transition } from "@headlessui/react"; +import { BiCog } from "react-icons/bi"; + +export default function Dropdown({ options, state }) { + return ( + +
+ + {state.value.label} + +
+ + + +
+ {options.map((i) => ( + + + + ))} +
+
+
+
+ ); +} diff --git a/src/components/services/item.jsx b/src/components/services/item.jsx index 2d50276e3..dbdd0f018 100644 --- a/src/components/services/item.jsx +++ b/src/components/services/item.jsx @@ -1,9 +1,11 @@ import Image from "next/future/image"; import { Disclosure } from "@headlessui/react"; +import { useState } from "react"; import Status from "./status"; import Widget from "./widget"; import Docker from "./widgets/service/docker"; +import Dropdown from "./dropdown"; function resolveIcon(icon) { if (icon.startsWith("http")) { @@ -28,6 +30,19 @@ export default function Item({ service }) { } }; + const cmcValues = [ + { label: "1 Hour", value: "1h" }, + { label: "1 Day", value: "24h" }, + { label: "7 Days", value: "7d" }, + { label: "30 Days", value: "30d" }, + ]; + + const [cmcV, cmcSet] = useState(cmcValues[0]); + + const states = { + coinmarketcap: { value: cmcV, set: cmcSet }, + }; + const hasLink = service.href && service.href !== "#"; return ( @@ -82,6 +97,7 @@ export default function Item({ service }) { )} + {service?.widget?.type === "coinmarketcap" && }
@@ -90,7 +106,7 @@ export default function Item({ service }) { - {service.widget && } + {service.widget && } diff --git a/src/components/services/widget.jsx b/src/components/services/widget.jsx index d2c8fbf78..415b24f32 100644 --- a/src/components/services/widget.jsx +++ b/src/components/services/widget.jsx @@ -45,16 +45,16 @@ const widgetMappings = { npm: Npm, tautulli: Tautulli, gotify: Gotify, - prowlarr: Prowlarr + prowlarr: Prowlarr, }; -export default function Widget({ service }) { +export default function Widget({ service, state }) { const { t } = useTranslation("common"); const ServiceWidget = widgetMappings[service.widget.type]; if (ServiceWidget) { - return ; + return ; } return ( diff --git a/src/components/services/widgets/service/coinmarketcap.jsx b/src/components/services/widgets/service/coinmarketcap.jsx index c5e66ebc8..5262eb026 100644 --- a/src/components/services/widgets/service/coinmarketcap.jsx +++ b/src/components/services/widgets/service/coinmarketcap.jsx @@ -1,13 +1,12 @@ import useSWR from "swr"; import { useTranslation } from "react-i18next"; -import getSymbolFromCurrency from "currency-symbol-map"; import Widget from "../widget"; import Block from "../block"; import { formatApiUrl } from "utils/api-helpers"; -export default function CoinMarketCap({ service }) { +export default function CoinMarketCap({ service, state }) { const { t } = useTranslation(); const config = service.widget; @@ -39,7 +38,6 @@ export default function CoinMarketCap({ service }) { } const { data } = statsData; - const currencySymbol = getSymbolFromCurrency(currencyCode); return ( @@ -52,15 +50,20 @@ export default function CoinMarketCap({ service }) {
{data[key].name}
- {currencySymbol} - {data[key].quote[currencyCode].price.toFixed(2)} + {t("common.number", { + value: data[key].quote[currencyCode].price, + style: "currency", + currency: currencyCode, + })}
0 ? "text-emerald-300" : "text-rose-300" + data[key].quote[currencyCode][`percent_change_${state.value.value}`] > 0 + ? "text-emerald-300" + : "text-rose-300" }`} > - {data[key].quote[currencyCode].percent_change_1h.toFixed(2)}% + {data[key].quote[currencyCode][`percent_change_${state.value.value}`].toFixed(2)}%
From ce9c115f3dd0e8383ea313d321830670ea3b62f8 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:10:11 +0300 Subject: [PATCH 10/50] Update common.json --- public/locales/de/common.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/locales/de/common.json b/public/locales/de/common.json index 2198488cf..c72faafaa 100644 --- a/public/locales/de/common.json +++ b/public/locales/de/common.json @@ -109,11 +109,7 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track", - "1hour": "1 Hour", - "1day": "1 Day", - "7days": "7 Days", - "30days": "30 Days" + "configure": "Configure one or more crypto currencies to track" }, "gotify": { "apps": "Applications", From 22a073ba1a284a26369243acb4f160d71a3867c7 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:10:38 +0300 Subject: [PATCH 11/50] Update common.json --- public/locales/de/common.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/locales/de/common.json b/public/locales/de/common.json index c72faafaa..bbb5ff666 100644 --- a/public/locales/de/common.json +++ b/public/locales/de/common.json @@ -110,7 +110,7 @@ }, "coinmarketcap": { "configure": "Configure one or more crypto currencies to track" - }, + }, "gotify": { "apps": "Applications", "clients": "Clients", From 13db31ede082eac94b19924c1c1715a70bdf4ed1 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:11:00 +0300 Subject: [PATCH 12/50] Update common.json --- public/locales/es/common.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/locales/es/common.json b/public/locales/es/common.json index b9f928fb5..bbca362c0 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -109,12 +109,8 @@ "downloaded": "Descargado" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track", - "1hour": "1 Hour", - "1day": "1 Day", - "7days": "7 Days", - "30days": "30 Days" - }, + "configure": "Configure one or more crypto currencies to track" + }, "gotify": { "apps": "Aplicaciones", "clients": "Clientes", From 4b69fdefef65cfdd589fe1bfcc282a8a00a99e27 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:11:30 +0300 Subject: [PATCH 13/50] Update common.json --- public/locales/es/common.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/locales/es/common.json b/public/locales/es/common.json index bbca362c0..d61bda0e9 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -109,7 +109,7 @@ "downloaded": "Descargado" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" + "configure": "Configurar una o varias criptomonedas para su seguimiento" }, "gotify": { "apps": "Aplicaciones", From 06d4f2b9f3f103bae9ffb7508990389646c2fa93 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:11:55 +0300 Subject: [PATCH 14/50] Update common.json --- public/locales/fr/common.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/locales/fr/common.json b/public/locales/fr/common.json index 0f3cc5e3e..924d88a61 100644 --- a/public/locales/fr/common.json +++ b/public/locales/fr/common.json @@ -120,12 +120,8 @@ "rate": "Évaluer" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track", - "1hour": "1 Hour", - "1day": "1 Day", - "7days": "7 Days", - "30days": "30 Days" - }, + "configure": "Configurer une ou plusieurs crypto-monnaies à suivre" + }, "gotify": { "apps": "Applications", "clients": "Clients", From 17d716137474e862186da35be3aefaa86cbd0acc Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:12:13 +0300 Subject: [PATCH 15/50] Update common.json --- public/locales/it/common.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/locales/it/common.json b/public/locales/it/common.json index 0d53c8cbc..585aae1e0 100644 --- a/public/locales/it/common.json +++ b/public/locales/it/common.json @@ -109,12 +109,8 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track", - "1hour": "1 Hour", - "1day": "1 Day", - "7days": "7 Days", - "30days": "30 Days" - }, + "configure": "Configure one or more crypto currencies to track" + }, "gotify": { "apps": "Applications", "clients": "Clients", From e5db1ec848ef408c90c42a945a631cc0034d6536 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:12:50 +0300 Subject: [PATCH 16/50] Update common.json --- public/locales/nb-NO/common.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/locales/nb-NO/common.json b/public/locales/nb-NO/common.json index 62f6fa338..141378e8b 100644 --- a/public/locales/nb-NO/common.json +++ b/public/locales/nb-NO/common.json @@ -109,12 +109,8 @@ "remaining": "Gjenstående" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track", - "1hour": "1 Hour", - "1day": "1 Day", - "7days": "7 Days", - "30days": "30 Days" - }, + "configure": "Sett opp én eller flere kryptovalutaer å holde øye med" + }, "gotify": { "apps": "Programmer", "clients": "Klienter", From 331999c1a494d5826cbab1e83b36332e7c3e0158 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:13:08 +0300 Subject: [PATCH 17/50] Update common.json --- public/locales/nl/common.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/locales/nl/common.json b/public/locales/nl/common.json index 6ca2a79bf..d2975cd2e 100644 --- a/public/locales/nl/common.json +++ b/public/locales/nl/common.json @@ -109,12 +109,8 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track", - "1hour": "1 Hour", - "1day": "1 Day", - "7days": "7 Days", - "30days": "30 Days" - }, + "configure": "Configure one or more crypto currencies to track" + }, "gotify": { "apps": "Applications", "clients": "Clients", From b94d7a4ae88577845054ac027dcd2ac0089d2e10 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:13:46 +0300 Subject: [PATCH 18/50] Update common.json --- public/locales/pt/common.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/locales/pt/common.json b/public/locales/pt/common.json index eb18e0879..4dafc19f2 100644 --- a/public/locales/pt/common.json +++ b/public/locales/pt/common.json @@ -120,12 +120,8 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track", - "1hour": "1 Hour", - "1day": "1 Day", - "7days": "7 Days", - "30days": "30 Days" - }, + "configure": "Configure one or more crypto currencies to track" + }, "gotify": { "apps": "Aplicações", "clients": "Clientes", From beee9ecd8492229f73d052f03fca4b937bcff3f6 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:14:00 +0300 Subject: [PATCH 19/50] Update common.json --- public/locales/ru/common.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/locales/ru/common.json b/public/locales/ru/common.json index a35c8869c..0f4ae8af4 100644 --- a/public/locales/ru/common.json +++ b/public/locales/ru/common.json @@ -109,12 +109,8 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track", - "1hour": "1 Hour", - "1day": "1 Day", - "7days": "7 Days", - "30days": "30 Days" - }, + "configure": "Configure one or more crypto currencies to track" + }, "gotify": { "apps": "Applications", "clients": "Clients", From 55a3e6880bac08afe86be7ab71bf9a064b396723 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:14:20 +0300 Subject: [PATCH 20/50] Update common.json --- public/locales/vi/common.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/locales/vi/common.json b/public/locales/vi/common.json index 4572e4c74..ab6122f76 100644 --- a/public/locales/vi/common.json +++ b/public/locales/vi/common.json @@ -109,12 +109,8 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track", - "1hour": "1 Hour", - "1day": "1 Day", - "7days": "7 Days", - "30days": "30 Days" - }, + "configure": "Configure one or more crypto currencies to track" + }, "gotify": { "apps": "Applications", "clients": "Clients", From 5d9e90f0338c3d1545462ec3b8fe463b0fd2065b Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:14:42 +0300 Subject: [PATCH 21/50] Update common.json --- public/locales/zh-CN/common.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/locales/zh-CN/common.json b/public/locales/zh-CN/common.json index ba4f896bc..b324f35bf 100644 --- a/public/locales/zh-CN/common.json +++ b/public/locales/zh-CN/common.json @@ -109,12 +109,8 @@ "downloaded": "下载" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track", - "1hour": "1 Hour", - "1day": "1 Day", - "7days": "7 Days", - "30days": "30 Days" - }, + "configure": "配置一个或多个需要追踪的加密" + }, "gotify": { "apps": "应用", "clients": "客户端", From b81a5d1e5103098baeab0ff017985c205fef332a Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 01:15:06 +0300 Subject: [PATCH 22/50] Update common.json --- public/locales/zh-Hant/common.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/locales/zh-Hant/common.json b/public/locales/zh-Hant/common.json index c02d976c4..63df53691 100644 --- a/public/locales/zh-Hant/common.json +++ b/public/locales/zh-Hant/common.json @@ -114,12 +114,8 @@ "total": "Total" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track", - "1hour": "1 Hour", - "1day": "1 Day", - "7days": "7 Days", - "30days": "30 Days" - }, + "configure": "Configure one or more crypto currencies to track" + }, "prowlarr": { "enableIndexers": "Indexers", "numberOfGrabs": "Grabs", From 6b458254728e4f5cbe54d9f34f415206af6c8e7e Mon Sep 17 00:00:00 2001 From: Chris McGravey Date: Tue, 13 Sep 2022 17:29:02 -0500 Subject: [PATCH 23/50] translate --- src/components/services/item.jsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/services/item.jsx b/src/components/services/item.jsx index dbdd0f018..1c4475970 100644 --- a/src/components/services/item.jsx +++ b/src/components/services/item.jsx @@ -1,6 +1,7 @@ import Image from "next/future/image"; import { Disclosure } from "@headlessui/react"; import { useState } from "react"; +import { useTranslation } from "react-i18next"; import Status from "./status"; import Widget from "./widget"; @@ -24,6 +25,8 @@ function resolveIcon(icon) { } export default function Item({ service }) { + const { t } = useTranslation(); + const handleOnClick = () => { if (service.href && service.href !== "#") { window.open(service.href, "_blank").focus(); @@ -31,10 +34,10 @@ export default function Item({ service }) { }; const cmcValues = [ - { label: "1 Hour", value: "1h" }, - { label: "1 Day", value: "24h" }, - { label: "7 Days", value: "7d" }, - { label: "30 Days", value: "30d" }, + { label: t("coinmarketcap.1hour"), value: "1h" }, + { label: t("coinmarketcap.1day"), value: "24h" }, + { label: t("coinmarketcap.7days"), value: "7d" }, + { label: t("coinmarketcap.30days"), value: "30d" }, ]; const [cmcV, cmcSet] = useState(cmcValues[0]); From 62188ffdc752382fa8fbd7c56c22ceb8063e7e44 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 09:09:11 +0300 Subject: [PATCH 24/50] cleanup --- src/components/services/dropdown.jsx | 24 ++++++++------ src/components/services/item.jsx | 16 +--------- src/components/services/widget.jsx | 4 +-- .../widgets/service/coinmarketcap.jsx | 32 ++++++++++++++----- src/components/services/widgets/widget.jsx | 2 +- 5 files changed, 42 insertions(+), 36 deletions(-) diff --git a/src/components/services/dropdown.jsx b/src/components/services/dropdown.jsx index c7aad96e5..4bc25a8fd 100644 --- a/src/components/services/dropdown.jsx +++ b/src/components/services/dropdown.jsx @@ -1,14 +1,15 @@ import { Fragment } from "react"; import { Menu, Transition } from "@headlessui/react"; import { BiCog } from "react-icons/bi"; +import classNames from "classnames"; -export default function Dropdown({ options, state }) { +export default function Dropdown({ options, value, setValue }) { return (
- - {state.value.label} -
@@ -21,18 +22,21 @@ export default function Dropdown({ options, state }) { leaveFrom="transform opacity-100 scale-100" leaveTo="transform opacity-0 scale-95" > - +
- {options.map((i) => ( - + {options.map((option) => ( + ))} diff --git a/src/components/services/item.jsx b/src/components/services/item.jsx index 1c4475970..06cc1629d 100644 --- a/src/components/services/item.jsx +++ b/src/components/services/item.jsx @@ -33,19 +33,6 @@ export default function Item({ service }) { } }; - const cmcValues = [ - { label: t("coinmarketcap.1hour"), value: "1h" }, - { label: t("coinmarketcap.1day"), value: "24h" }, - { label: t("coinmarketcap.7days"), value: "7d" }, - { label: t("coinmarketcap.30days"), value: "30d" }, - ]; - - const [cmcV, cmcSet] = useState(cmcValues[0]); - - const states = { - coinmarketcap: { value: cmcV, set: cmcSet }, - }; - const hasLink = service.href && service.href !== "#"; return ( @@ -100,7 +87,6 @@ export default function Item({ service }) { )} - {service?.widget?.type === "coinmarketcap" && }
@@ -109,7 +95,7 @@ export default function Item({ service }) { - {service.widget && } + {service.widget && } diff --git a/src/components/services/widget.jsx b/src/components/services/widget.jsx index 415b24f32..df1243240 100644 --- a/src/components/services/widget.jsx +++ b/src/components/services/widget.jsx @@ -48,13 +48,13 @@ const widgetMappings = { prowlarr: Prowlarr, }; -export default function Widget({ service, state }) { +export default function Widget({ service }) { const { t } = useTranslation("common"); const ServiceWidget = widgetMappings[service.widget.type]; if (ServiceWidget) { - return ; + return ; } return ( diff --git a/src/components/services/widgets/service/coinmarketcap.jsx b/src/components/services/widgets/service/coinmarketcap.jsx index 5262eb026..8fc30f525 100644 --- a/src/components/services/widgets/service/coinmarketcap.jsx +++ b/src/components/services/widgets/service/coinmarketcap.jsx @@ -1,14 +1,26 @@ import useSWR from "swr"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import Widget from "../widget"; import Block from "../block"; +import Dropdown from "components/services/dropdown"; import { formatApiUrl } from "utils/api-helpers"; +import classNames from "classnames"; -export default function CoinMarketCap({ service, state }) { +export default function CoinMarketCap({ service }) { const { t } = useTranslation(); + const dateRangeOptions = [ + { label: t("coinmarketcap.1hour"), value: "1h" }, + { label: t("coinmarketcap.1day"), value: "24h" }, + { label: t("coinmarketcap.7days"), value: "7d" }, + { label: t("coinmarketcap.30days"), value: "30d" }, + ]; + + const [dateRange, setDateRange] = useState(dateRangeOptions[0].value); + const config = service.widget; const currencyCode = config.currency ?? "USD"; const { symbols } = config; @@ -29,7 +41,7 @@ export default function CoinMarketCap({ service, state }) { return ; } - if (!statsData) { + if (!statsData || !dateRange) { return ( @@ -41,29 +53,33 @@ export default function CoinMarketCap({ service, state }) { return ( +
+ +
+
- {symbols.map((key) => ( + {symbols.map((symbol) => (
-
{data[key].name}
+
{data[symbol].name}
{t("common.number", { - value: data[key].quote[currencyCode].price, + value: data[symbol].quote[currencyCode].price, style: "currency", currency: currencyCode, })}
0 + data[symbol].quote[currencyCode][`percent_change_${dateRange}`] > 0 ? "text-emerald-300" : "text-rose-300" }`} > - {data[key].quote[currencyCode][`percent_change_${state.value.value}`].toFixed(2)}% + {data[symbol].quote[currencyCode][`percent_change_${dateRange}`].toFixed(2)}%
diff --git a/src/components/services/widgets/widget.jsx b/src/components/services/widgets/widget.jsx index 98e4683eb..12202c05f 100644 --- a/src/components/services/widgets/widget.jsx +++ b/src/components/services/widgets/widget.jsx @@ -7,5 +7,5 @@ export default function Widget({ error = false, children }) { ); } - return
{children}
; + return
{children}
; } From 6c5bfa466f7ce84b9b0bbedc20ffe2fe278c6ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Fern=C3=A1ndez=20S=C3=A1nchez?= Date: Tue, 13 Sep 2022 16:22:40 +0000 Subject: [PATCH 25/50] Translated using Weblate (Spanish) Currently translated at 100.0% (89 of 89 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/es/ --- public/locales/es/common.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/public/locales/es/common.json b/public/locales/es/common.json index d61bda0e9..83804720e 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -11,7 +11,7 @@ "total": "Total", "free": "Libre", "used": "Usado", - "load": "Load" + "load": "Carga" }, "docker": { "rx": "Recibido", @@ -34,8 +34,8 @@ }, "rutorrent": { "active": "Activo", - "upload": "Subir", - "download": "Descargar" + "upload": "Subida", + "download": "Descarga" }, "sonarr": { "wanted": "Más deseado", @@ -69,7 +69,7 @@ }, "speedtest": { "upload": "Subir", - "download": "Descargar", + "download": "Descarga", "ping": "Ping" }, "portainer": { @@ -117,16 +117,16 @@ "messages": "Mensajes" }, "prowlarr": { - "enableIndexers": "Indexers", - "numberOfGrabs": "Grabs", - "numberOfQueries": "Queries", - "numberOfFailGrabs": "Fail Grabs", - "numberOfFailQueries": "Fail Queries" + "enableIndexers": "Indexadores", + "numberOfGrabs": "Capturas", + "numberOfQueries": "Consultas", + "numberOfFailGrabs": "Capturas Fallidas", + "numberOfFailQueries": "Consultas Fallidas" }, "transmission": { - "download": "Download", - "upload": "Upload", - "leech": "Leech", - "seed": "Seed" + "download": "Descarga", + "upload": "Subida", + "leech": "Egoístas (Leech)", + "seed": "Semillas" } } From 4d2004c8c99a8d9d6947c46bb773b7e4402239a8 Mon Sep 17 00:00:00 2001 From: Nonoss117 Date: Tue, 13 Sep 2022 05:14:54 +0000 Subject: [PATCH 26/50] Translated using Weblate (French) Currently translated at 100.0% (89 of 89 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/fr/ --- public/locales/fr/common.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/locales/fr/common.json b/public/locales/fr/common.json index 924d88a61..4e33ae5b5 100644 --- a/public/locales/fr/common.json +++ b/public/locales/fr/common.json @@ -135,8 +135,8 @@ "numberOfFailQueries": "Demande échouée" }, "transmission": { - "download": "Download", - "upload": "Upload", + "download": "Réception", + "upload": "Envoi", "leech": "Leech", "seed": "Seed" } From acd421c61717bf7110a6314332d894b4cc97b5d5 Mon Sep 17 00:00:00 2001 From: Francisco Coelho Date: Tue, 13 Sep 2022 22:00:43 +0000 Subject: [PATCH 27/50] Translated using Weblate (Portuguese) Currently translated at 98.8% (88 of 89 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/pt/ --- public/locales/pt/common.json | 52 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/public/locales/pt/common.json b/public/locales/pt/common.json index 4dafc19f2..249f8b87b 100644 --- a/public/locales/pt/common.json +++ b/public/locales/pt/common.json @@ -1,6 +1,6 @@ { "widget": { - "missing_type": "Tipo de widget ausente: {{type}}", + "missing_type": "Widget ausente: {{type}}", "api_error": "Erro da API", "status": "Status" }, @@ -10,7 +10,7 @@ "resources": { "total": "Total", "free": "Livre", - "used": "Usada", + "used": "Usado", "load": "Load" }, "docker": { @@ -18,22 +18,22 @@ "tx": "Tx", "mem": "Mem", "cpu": "CPU", - "offline": "Desligada" + "offline": "Desligado" }, "emby": { "playing": "A reproduzir", "transcoding": "Transcodificação", - "bitrate": "Taxa de bits", - "no_active": "No Active Streams" + "bitrate": "Bitrate", + "no_active": "Sem streams ativas" }, "tautulli": { "playing": "Reproduzindo", "transcoding": "Transcodificação", "bitrate": "Taxa de bits", - "no_active": "No Active Streams" + "no_active": "Sem streams ativas" }, "rutorrent": { - "active": "Ativa", + "active": "Ativo", "upload": "Envio", "download": "ReceçãoDownload" }, @@ -44,13 +44,13 @@ }, "radarr": { "wanted": "Desejado", - "queued": "Enfileiradas", + "queued": "Fila", "movies": "Filmes" }, "readarr": { "wanted": "Wanted", - "queued": "Queued", - "books": "Books" + "queued": "Em fila", + "books": "Livros" }, "ombi": { "pending": "Pendente", @@ -65,7 +65,7 @@ "pihole": { "queries": "Consultas", "blocked": "Bloqueado", - "gravity": "Gravidade" + "gravity": "Gravity" }, "speedtest": { "upload": "Envio", @@ -73,18 +73,18 @@ "ping": "Ping" }, "portainer": { - "running": "Corrida", - "stopped": "Parou", + "running": "A correr", + "stopped": "Parado", "total": "Total" }, "traefik": { - "routers": "Roteadores", + "routers": "Routers", "services": "Serviços", "middleware": "Middleware" }, "npm": { - "enabled": "Habilitada", - "disabled": "Desabilitada", + "enabled": "Ativo", + "disabled": "Desabilitado", "total": "Total" }, "common": { @@ -105,22 +105,22 @@ "wait": "Por favor aguarde" }, "overseerr": { - "pending": "Pending", - "approved": "Approved", - "available": "Available" + "pending": "Pendente", + "approved": "Aprovado", + "available": "Disponível" }, "sabnzbd": { "rate": "Rate", - "queue": "Queue", - "timeleft": "Time Left" + "queue": "Fila", + "timeleft": "Tempo restante" }, "nzbget": { "rate": "Rate", - "remaining": "Remaining", + "remaining": "Restante", "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" + "configure": "Configurar uma ou mais moedas" }, "gotify": { "apps": "Aplicações", @@ -131,12 +131,12 @@ "enableIndexers": "Indexers", "numberOfGrabs": "Grabs", "numberOfQueries": "Queries", - "numberOfFailGrabs": "Fail Grabs", - "numberOfFailQueries": "Fail Queries" + "numberOfFailGrabs": "Falhados", + "numberOfFailQueries": "Pesquisas falhadas" }, "transmission": { "download": "Download", - "upload": "Upload", + "upload": "Envio", "leech": "Leech", "seed": "Seed" } From 94c093ea573aed53e76e05e1b0afd86c43fbf7f1 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 06:10:00 +0000 Subject: [PATCH 28/50] Translated using Weblate (German) Currently translated at 68.8% (64 of 93 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/de/ --- public/locales/de/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/de/common.json b/public/locales/de/common.json index bbb5ff666..74d79bb86 100644 --- a/public/locales/de/common.json +++ b/public/locales/de/common.json @@ -109,7 +109,11 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" }, "gotify": { "apps": "Applications", From 4d1ad16ea260a49c8585ae6416b9149d98d9fae8 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 06:10:00 +0000 Subject: [PATCH 29/50] Translated using Weblate (Spanish) Currently translated at 95.6% (89 of 93 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/es/ --- public/locales/es/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/es/common.json b/public/locales/es/common.json index 83804720e..c184907e0 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -109,7 +109,11 @@ "downloaded": "Descargado" }, "coinmarketcap": { - "configure": "Configurar una o varias criptomonedas para su seguimiento" + "configure": "Configurar una o varias criptomonedas para su seguimiento", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" }, "gotify": { "apps": "Aplicaciones", From a6c52df4cb1c1ec48fbf34c3895d8173f7ce7f16 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 06:10:01 +0000 Subject: [PATCH 30/50] Translated using Weblate (French) Currently translated at 95.6% (89 of 93 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/fr/ --- public/locales/fr/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/fr/common.json b/public/locales/fr/common.json index 4e33ae5b5..f7d77f88f 100644 --- a/public/locales/fr/common.json +++ b/public/locales/fr/common.json @@ -120,7 +120,11 @@ "rate": "Évaluer" }, "coinmarketcap": { - "configure": "Configurer une ou plusieurs crypto-monnaies à suivre" + "configure": "Configurer une ou plusieurs crypto-monnaies à suivre", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" }, "gotify": { "apps": "Applications", From c2a036c52665f1790c4778c4bd16de1bda97d5c4 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 06:10:01 +0000 Subject: [PATCH 31/50] Translated using Weblate (Portuguese) Currently translated at 94.6% (88 of 93 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/pt/ --- public/locales/pt/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/pt/common.json b/public/locales/pt/common.json index 249f8b87b..be261b448 100644 --- a/public/locales/pt/common.json +++ b/public/locales/pt/common.json @@ -120,7 +120,11 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configurar uma ou mais moedas" + "configure": "Configurar uma ou mais moedas", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" }, "gotify": { "apps": "Aplicações", From 710f979f94a2424c867fee02ddd6b1b5c0d1b66d Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 06:10:01 +0000 Subject: [PATCH 32/50] Translated using Weblate (Russian) Currently translated at 13.9% (13 of 93 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/ru/ --- public/locales/ru/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/ru/common.json b/public/locales/ru/common.json index 0f4ae8af4..c8d956725 100644 --- a/public/locales/ru/common.json +++ b/public/locales/ru/common.json @@ -109,7 +109,11 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" }, "gotify": { "apps": "Applications", From 6d55e74ae49dda8ec6a7fc93f279fe03681b19d6 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 06:10:01 +0000 Subject: [PATCH 33/50] Translated using Weblate (Chinese (Simplified)) Currently translated at 86.0% (80 of 93 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/zh_Hans/ --- public/locales/zh-CN/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/zh-CN/common.json b/public/locales/zh-CN/common.json index b324f35bf..723776aaa 100644 --- a/public/locales/zh-CN/common.json +++ b/public/locales/zh-CN/common.json @@ -109,7 +109,11 @@ "downloaded": "下载" }, "coinmarketcap": { - "configure": "配置一个或多个需要追踪的加密" + "configure": "配置一个或多个需要追踪的加密", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" }, "gotify": { "apps": "应用", From 75214c345a432cdca2c572f930e145e0ae8aa541 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 06:10:02 +0000 Subject: [PATCH 34/50] Translated using Weblate (Italian) Currently translated at 74.1% (69 of 93 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/it/ --- public/locales/it/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/it/common.json b/public/locales/it/common.json index 585aae1e0..62658ca91 100644 --- a/public/locales/it/common.json +++ b/public/locales/it/common.json @@ -109,7 +109,11 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" + "configure": "Configure one or more crypto currencies to track", + "1day": "1 Day", + "7days": "7 Days", + "1hour": "1 Hour", + "30days": "30 Days" }, "gotify": { "apps": "Applications", From 5d85e3c0e2e16f7f56f13cef8e647e46c8515188 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 06:10:00 +0000 Subject: [PATCH 35/50] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?= =?UTF-8?q?=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 84.9% (79 of 93 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/nb_NO/ --- public/locales/nb-NO/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/nb-NO/common.json b/public/locales/nb-NO/common.json index 141378e8b..33894cdf0 100644 --- a/public/locales/nb-NO/common.json +++ b/public/locales/nb-NO/common.json @@ -109,7 +109,11 @@ "remaining": "Gjenstående" }, "coinmarketcap": { - "configure": "Sett opp én eller flere kryptovalutaer å holde øye med" + "configure": "Sett opp én eller flere kryptovalutaer å holde øye med", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" }, "gotify": { "apps": "Programmer", From b7f490544a86d40aa1de53c5662bf1f27ea3fb17 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 06:10:02 +0000 Subject: [PATCH 36/50] Translated using Weblate (Vietnamese) Currently translated at 35.4% (33 of 93 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/vi/ --- public/locales/vi/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/vi/common.json b/public/locales/vi/common.json index ab6122f76..1d15ff9d0 100644 --- a/public/locales/vi/common.json +++ b/public/locales/vi/common.json @@ -109,7 +109,11 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" }, "gotify": { "apps": "Applications", From 193b58d0fc1e9aac5a1223f1cb6156920aa59779 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 06:10:02 +0000 Subject: [PATCH 37/50] Translated using Weblate (Dutch) Currently translated at 66.6% (62 of 93 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/nl/ --- public/locales/nl/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/nl/common.json b/public/locales/nl/common.json index d2975cd2e..0259d05ca 100644 --- a/public/locales/nl/common.json +++ b/public/locales/nl/common.json @@ -109,7 +109,11 @@ "downloaded": "Downloaded" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "7days": "7 Days", + "1day": "1 Day", + "30days": "30 Days" }, "gotify": { "apps": "Applications", From f9f816845fab71b5c327001a72e49a0d09137eb7 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 06:10:02 +0000 Subject: [PATCH 38/50] Translated using Weblate (Chinese (Traditional)) Currently translated at 9.6% (9 of 93 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/zh_Hant/ --- public/locales/zh-Hant/common.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/zh-Hant/common.json b/public/locales/zh-Hant/common.json index 63df53691..e0f03e295 100644 --- a/public/locales/zh-Hant/common.json +++ b/public/locales/zh-Hant/common.json @@ -114,7 +114,11 @@ "total": "Total" }, "coinmarketcap": { - "configure": "Configure one or more crypto currencies to track" + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" }, "prowlarr": { "enableIndexers": "Indexers", From b40dad3d3e0f0870641d840c81770374d3d8e7b4 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 09:11:44 +0300 Subject: [PATCH 39/50] remove unused package --- package.json | 1 - pnpm-lock.yaml | 6 ------ 2 files changed, 7 deletions(-) diff --git a/package.json b/package.json index ae8ce0e38..f416ef665 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "@headlessui/react": "^1.7.0", "@tailwindcss/forms": "^0.5.3", "classnames": "^2.3.1", - "currency-symbol-map": "^5.1.0", "dockerode": "^3.3.4", "i18next": "^21.9.1", "i18next-browser-languagedetector": "^6.1.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aed4b537c..32becdd4c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,7 +5,6 @@ specifiers: '@tailwindcss/forms': ^0.5.3 autoprefixer: ^10.4.9 classnames: ^2.3.1 - currency-symbol-map: ^5.1.0 dockerode: ^3.3.4 eslint: ^8.23.1 eslint-config-airbnb: ^19.0.4 @@ -42,7 +41,6 @@ dependencies: '@headlessui/react': 1.7.0_biqbaboplfbrettd7655fr4n2y '@tailwindcss/forms': 0.5.3_tailwindcss@3.1.8 classnames: 2.3.1 - currency-symbol-map: 5.1.0 dockerode: 3.3.4 i18next: 21.9.1 i18next-browser-languagedetector: 6.1.5 @@ -706,10 +704,6 @@ packages: engines: {node: '>=4'} hasBin: true - /currency-symbol-map/5.1.0: - resolution: {integrity: sha512-LO/lzYRw134LMDVnLyAf1dHE5tyO6axEFkR3TXjQIOmMkAM9YL6QsiUwuXzZAmFnuDJcs4hayOgyIYtViXFrLw==} - dev: false - /damerau-levenshtein/1.0.8: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} dev: true From 7f91fe59e21fe93107fbf753c96074ae042d78aa Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 09:11:55 +0300 Subject: [PATCH 40/50] allow setting base and favicon --- src/pages/index.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 2a33872b4..2a1901b53 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -46,6 +46,8 @@ export default function Home({ settings }) { {settings.title || "Homepage"} + {settings.base && } + {settings.favicon && }
From 79e5ff2feaa0d52cfabe3341d38739d9d1d2b995 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 09:23:21 +0300 Subject: [PATCH 41/50] fix linting --- src/components/services/item.jsx | 5 ----- src/components/services/widgets/service/coinmarketcap.jsx | 2 +- src/components/widgets/resources/resources.jsx | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/components/services/item.jsx b/src/components/services/item.jsx index 06cc1629d..2d50276e3 100644 --- a/src/components/services/item.jsx +++ b/src/components/services/item.jsx @@ -1,12 +1,9 @@ import Image from "next/future/image"; import { Disclosure } from "@headlessui/react"; -import { useState } from "react"; -import { useTranslation } from "react-i18next"; import Status from "./status"; import Widget from "./widget"; import Docker from "./widgets/service/docker"; -import Dropdown from "./dropdown"; function resolveIcon(icon) { if (icon.startsWith("http")) { @@ -25,8 +22,6 @@ function resolveIcon(icon) { } export default function Item({ service }) { - const { t } = useTranslation(); - const handleOnClick = () => { if (service.href && service.href !== "#") { window.open(service.href, "_blank").focus(); diff --git a/src/components/services/widgets/service/coinmarketcap.jsx b/src/components/services/widgets/service/coinmarketcap.jsx index 8fc30f525..a34e6e924 100644 --- a/src/components/services/widgets/service/coinmarketcap.jsx +++ b/src/components/services/widgets/service/coinmarketcap.jsx @@ -1,13 +1,13 @@ import useSWR from "swr"; import { useState } from "react"; import { useTranslation } from "react-i18next"; +import classNames from "classnames"; import Widget from "../widget"; import Block from "../block"; import Dropdown from "components/services/dropdown"; import { formatApiUrl } from "utils/api-helpers"; -import classNames from "classnames"; export default function CoinMarketCap({ service }) { const { t } = useTranslation(); diff --git a/src/components/widgets/resources/resources.jsx b/src/components/widgets/resources/resources.jsx index 72933a024..a1bf7dfc4 100644 --- a/src/components/widgets/resources/resources.jsx +++ b/src/components/widgets/resources/resources.jsx @@ -3,7 +3,6 @@ import Cpu from "./cpu"; import Memory from "./memory"; export default function Resources({ options }) { - console.log(options); const { expanded } = options; return (
From 5acaa31a1f33bdc643576601929cffec27cb04b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Benn=C3=A0ssar=20Carretero?= Date: Wed, 14 Sep 2022 09:14:45 +0200 Subject: [PATCH 42/50] Added translation using Weblate (Catalan) --- public/locales/ca/common.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 public/locales/ca/common.json diff --git a/public/locales/ca/common.json b/public/locales/ca/common.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/public/locales/ca/common.json @@ -0,0 +1 @@ +{} From 70592c243803c6b87eed97372092705c9296113d Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 14 Sep 2022 07:14:46 +0000 Subject: [PATCH 43/50] Translated using Weblate (Catalan) Currently translated at 100.0% (0 of 0 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/ca/ --- public/locales/ca/common.json | 137 +++++++++++++++++++++++++++++++++- 1 file changed, 136 insertions(+), 1 deletion(-) diff --git a/public/locales/ca/common.json b/public/locales/ca/common.json index 0967ef424..94936d40c 100644 --- a/public/locales/ca/common.json +++ b/public/locales/ca/common.json @@ -1 +1,136 @@ -{} +{ + "widget": { + "missing_type": "Missing Widget Type: {{type}}", + "api_error": "API Error", + "status": "Status" + }, + "weather": { + "allow": "Click to allow", + "updating": "Updating", + "wait": "Please wait", + "current": "Current Location" + }, + "search": { + "placeholder": "Search…" + }, + "transmission": { + "seed": "Seed", + "download": "Download", + "upload": "Upload", + "leech": "Leech" + }, + "sonarr": { + "wanted": "Wanted", + "queued": "Queued", + "series": "Series" + }, + "speedtest": { + "ping": "Ping", + "upload": "Upload", + "download": "Download" + }, + "resources": { + "total": "Total", + "free": "Free", + "used": "Used", + "load": "Load" + }, + "docker": { + "rx": "RX", + "tx": "TX", + "mem": "MEM", + "cpu": "CPU", + "offline": "Offline" + }, + "emby": { + "playing": "Playing", + "transcoding": "Transcoding", + "bitrate": "Bitrate", + "no_active": "No Active Streams" + }, + "tautulli": { + "playing": "Playing", + "transcoding": "Transcoding", + "bitrate": "Bitrate", + "no_active": "No Active Streams" + }, + "nzbget": { + "rate": "Rate", + "remaining": "Remaining", + "downloaded": "Downloaded" + }, + "sabnzbd": { + "rate": "Rate", + "queue": "Queue", + "timeleft": "Time Left" + }, + "rutorrent": { + "active": "Active", + "upload": "Upload", + "download": "Download" + }, + "radarr": { + "wanted": "Wanted", + "queued": "Queued", + "movies": "Movies" + }, + "readarr": { + "wanted": "Wanted", + "queued": "Queued", + "books": "Books" + }, + "ombi": { + "pending": "Pending", + "approved": "Approved", + "available": "Available" + }, + "jellyseerr": { + "pending": "Pending", + "approved": "Approved", + "available": "Available" + }, + "overseerr": { + "pending": "Pending", + "approved": "Approved", + "available": "Available" + }, + "pihole": { + "queries": "Queries", + "blocked": "Blocked", + "gravity": "Gravity" + }, + "portainer": { + "running": "Running", + "stopped": "Stopped", + "total": "Total" + }, + "traefik": { + "routers": "Routers", + "services": "Services", + "middleware": "Middleware" + }, + "npm": { + "total": "Total", + "enabled": "Enabled", + "disabled": "Disabled" + }, + "coinmarketcap": { + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, + "gotify": { + "apps": "Applications", + "clients": "Clients", + "messages": "Messages" + }, + "prowlarr": { + "enableIndexers": "Indexers", + "numberOfGrabs": "Grabs", + "numberOfQueries": "Queries", + "numberOfFailGrabs": "Fail Grabs", + "numberOfFailQueries": "Fail Queries" + } +} From 06de8dd5329f417a2aba24f8eb07a874fafbce46 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 14:43:51 +0300 Subject: [PATCH 44/50] update contributions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f3c8829a7..fd45423c8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ - Automatic service discovery (via labels) * Service Integration - Sonarr, Radarr, Readarr, Prowlarr, Emby, Jellyfin, Tautulli (Plex) - - Ombi, Overseerr, Jellyseerr, NZBGet, SABnzbd, ruTorrent + - Ombi, Overseerr, Jellyseerr, NZBGet, SABnzbd, ruTorrent, Transmission - Portainer, Traefik, Speedtest Tracker, PiHole, Nginx Proxy Manager, Gotify * Information Providers - Coin Market Cap @@ -127,7 +127,7 @@ Huge thanks to the all the contributors who have helped make this project what i * [ilusi0n](https://github.com/benphelps/homepage/commits?author=ilusi0n) - Jellyseerr Integration * [ItsJustMeChris](https://github.com/benphelps/homepage/commits?author=ItsJustMeChris) - Coin Market Cap Widget * [jackblk](https://github.com/benphelps/homepage/commits?author=jackblk) - Vietnamese Translation - * [JazzFisch](https://github.com/benphelps/homepage/commits?author=JazzFisch) - Readarr, SABnzbd Integrations + * [JazzFisch](https://github.com/benphelps/homepage/commits?author=JazzFisch) - Readarr, SABnzbd & Transmission Integrations * [modem7](https://github.com/benphelps/homepage/commits?author=modem7) - Impvoed Docker Image * [nicedc](https://github.com/benphelps/homepage/commits?author=nicedc) - Chinese Translation * [Nonoss117](https://github.com/benphelps/homepage/commits?author=Nonoss117) - French Translation From d876454638738a9320a8f11cc6b66699bef6450b Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 15:04:40 +0300 Subject: [PATCH 45/50] experimental docker user support --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b1193813c..ba6079e9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ COPY --link package.json pnpm-lock.yaml* ./ RUN < Date: Wed, 14 Sep 2022 16:04:00 +0300 Subject: [PATCH 46/50] use linuxserver.io base image --- Dockerfile | 14 +++++--------- package.json | 3 ++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index ba6079e9b..27f9aaa00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax = docker/dockerfile:latest # Install dependencies only when needed -FROM node:current-alpine AS deps +FROM ghcr.io/linuxserver/baseimage-alpine:3.15 AS deps WORKDIR /app @@ -9,9 +9,9 @@ COPY --link package.json pnpm-lock.yaml* ./ RUN < config/settings.yaml npm run build EOF @@ -42,11 +42,6 @@ LABEL org.opencontainers.image.source='https://github.com/benphelps/homepage' LABEL org.opencontainers.image.licenses='Apache-2.0' ENV NODE_ENV production -ENV PUID 0 -ENV PGID 0 -ENV TZ Europe/London - -USER $PUID:$PGID WORKDIR /app # Copy files from context (this allows the files to copy before the builder stage is done). @@ -63,4 +58,5 @@ EXPOSE $PORT HEALTHCHECK --interval=10s --timeout=3s --start-period=20s \ CMD wget --no-verbose --tries=1 --spider --no-check-certificate http://localhost:$PORT/api/healthcheck || exit 1 +USER $PUID:$PGID CMD ["node", "server.js"] diff --git a/package.json b/package.json index f416ef665..6acc6a4ef 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "telemetry": "next telemetry disable" }, "dependencies": { "@headlessui/react": "^1.7.0", From 5a284bff26295bd89f2044f7871b44a1d2b91428 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 16:08:32 +0300 Subject: [PATCH 47/50] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index caeabab22..a95c6be52 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -96,7 +96,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} # https://github.com/docker/setup-qemu-action#about # platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 - platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7 + platforms: linux/amd64,linux/arm64,linux/arm/v7 # linux/arm/v6 cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max From d4b05b2612623035b54ede040d85bd55e753e480 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 19:04:19 +0300 Subject: [PATCH 48/50] experiment with entrypoint for backwards compat --- Dockerfile | 5 +++-- docker-entrypoint.sh | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 docker-entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 27f9aaa00..ab7e12725 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,6 +44,8 @@ LABEL org.opencontainers.image.licenses='Apache-2.0' ENV NODE_ENV production WORKDIR /app +ADD docker-entrypoint.sh docker-entrypoint.sh + # Copy files from context (this allows the files to copy before the builder stage is done). COPY --link package.json next.config.js ./ COPY --link /public ./public @@ -58,5 +60,4 @@ EXPOSE $PORT HEALTHCHECK --interval=10s --timeout=3s --start-period=20s \ CMD wget --no-verbose --tries=1 --spider --no-check-certificate http://localhost:$PORT/api/healthcheck || exit 1 -USER $PUID:$PGID -CMD ["node", "server.js"] +ENTRYPOINT ["/app/docker-entrypoint.sh"] diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100755 index 000000000..5603d7e58 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# This is in attempt to preserve the original behavior of the Dockerfile, +# while also supporting the lscr.io /config directory +[ ! -d "/app/config" ] && ln -s /config /app/config + +node server.js From 81af23ecb5fc1a518ff1f51f9170110915cb71e5 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 19:19:02 +0300 Subject: [PATCH 49/50] revert to previous Dockerfile --- Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index ab7e12725..b1193813c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax = docker/dockerfile:latest # Install dependencies only when needed -FROM ghcr.io/linuxserver/baseimage-alpine:3.15 AS deps +FROM node:current-alpine AS deps WORKDIR /app @@ -9,9 +9,9 @@ COPY --link package.json pnpm-lock.yaml* ./ RUN < config/settings.yaml npm run build EOF @@ -42,9 +42,8 @@ LABEL org.opencontainers.image.source='https://github.com/benphelps/homepage' LABEL org.opencontainers.image.licenses='Apache-2.0' ENV NODE_ENV production -WORKDIR /app -ADD docker-entrypoint.sh docker-entrypoint.sh +WORKDIR /app # Copy files from context (this allows the files to copy before the builder stage is done). COPY --link package.json next.config.js ./ @@ -60,4 +59,4 @@ EXPOSE $PORT HEALTHCHECK --interval=10s --timeout=3s --start-period=20s \ CMD wget --no-verbose --tries=1 --spider --no-check-certificate http://localhost:$PORT/api/healthcheck || exit 1 -ENTRYPOINT ["/app/docker-entrypoint.sh"] +CMD ["node", "server.js"] From 680d488647d5ed01267461697c80efc8a40cb85f Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Wed, 14 Sep 2022 19:19:22 +0300 Subject: [PATCH 50/50] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index a95c6be52..aa5265edb 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -96,7 +96,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} # https://github.com/docker/setup-qemu-action#about # platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 - platforms: linux/amd64,linux/arm64,linux/arm/v7 # linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max