From a4544e98c4b064b6ec3637563b191df7116a69bd Mon Sep 17 00:00:00 2001 From: Stephane Richin Date: Fri, 12 Jan 2024 10:33:57 +0100 Subject: [PATCH] feat: display device uuid on general setting item --- src/pages/Settings.tsx | 17 +++++++++++++++++ src/translations/en.json | 1 + src/translations/fr.json | 1 + 3 files changed, 19 insertions(+) diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx index c5748d6..00548cb 100644 --- a/src/pages/Settings.tsx +++ b/src/pages/Settings.tsx @@ -20,6 +20,7 @@ import { SponsorBlockSettings } from "../components/SponsorBlockSettings"; import { SwitchPlausibleAnalytics } from "../components/SwitchPlausibleAnalytics"; import { SwitchVideoMode } from "../components/SwitchVideoMode"; import { useStorage } from "../hooks/useStorage"; +import { useSettings } from "../providers/Settings"; export const SettingsPage = memo(() => { const { t } = useTranslation(); @@ -54,6 +55,8 @@ const GeneralItem = memo(() => { + + {t("invidious.description")} @@ -68,6 +71,20 @@ const GeneralItem = memo(() => { ); }); +const DeviceUuid = memo(() => { + const settings = useSettings(); + const { t } = useTranslation(); + + return ( + <> + {t("settings.general.device.uuid")} + + {settings.deviceId} + + + ); +}); + const AnalyticsItem = memo(() => { if (process.env.REACT_APP_PLAUSIBLE_ANALYTICS !== "true") { return null; diff --git a/src/translations/en.json b/src/translations/en.json index 60388e5..4a46427 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1,6 +1,7 @@ { "settings.general.title": "General", "settings.general.description": "Invidious instance, locale and dark mode", + "settings.general.device.uuid": "Device Uuid", "settings.general.invidious.description": "Edit the Invidious instance settings and add your custom instance", "settings.general.invidious.domain": "Domain", "settings.general.invidious.type": "Type", diff --git a/src/translations/fr.json b/src/translations/fr.json index db24956..974d023 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -1,6 +1,7 @@ { "settings.general.title": "General", "settings.general.description": "Instance Invidious, langage et mode sombre", + "settings.general.device.uuid": "Identifiant de l'appareil (uuid)", "settings.general.invidious.description": "Modifier les paramètres d'instances Invidious et ajouter des instances personnaliser", "settings.general.invidious.domain": "Domaine", "settings.general.invidious.type": "Type",