Skip to content

Commit

Permalink
Better terms/privacy/support
Browse files Browse the repository at this point in the history
  • Loading branch information
pauljonescodes committed Feb 22, 2024
1 parent 202bfef commit 48992d5
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 9 deletions.
29 changes: 25 additions & 4 deletions src/renderer/components/drawers/SettingsDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ import {
FormLabel,
HStack,
Input,
Link,
Link as ChakraLink,
Select,
VStack,
useColorMode,
useToast,
} from '@chakra-ui/react';
import FileSaver from 'file-saver';
import { Link as RouterLink } from 'react-router-dom';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useRxCollection, useRxDB } from 'rxdb-hooks';
Expand Down Expand Up @@ -203,9 +204,29 @@ export function SettingsDrawer(props: SettingsDrawerProps) {
>
{t('reset')}
</Button>
<Link href={PathEnum.terms}>Terms</Link>
<Link href={PathEnum.privacy}>Privacy</Link>
<Link href={PathEnum.support}>Support</Link>
<HStack width="full" justify="space-between">
<ChakraLink
as={RouterLink}
to={PathEnum.terms}
onClick={onClose}
>
{t('terms')}
</ChakraLink>
<ChakraLink
as={RouterLink}
to={PathEnum.privacy}
onClick={onClose}
>
{t('privacy')}
</ChakraLink>
<ChakraLink
as={RouterLink}
to={PathEnum.support}
onClick={onClose}
>
{t('support')}
</ChakraLink>
</HStack>
</VStack>
</DrawerBody>
</DrawerContent>
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/i18n/dictionaries/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"plansEmpty": "لم يتم العثور على خطط",
"previous": "السابق",
"price": "السعر",
"privacy": "الخصوصية",
"protein": "بروتين",
"proteinTarget": "هدف البروتين",
"reset": "إعادة تعيين",
Expand All @@ -79,6 +80,8 @@
"submit": "تقديم",
"success": "نجاح",
"sugar": "سكر",
"support": "الدعم",
"terms": "الشروط",
"today": "اليوم",
"toggleColorMode": "تبديل وضع اللون",
"totalPrice": "السعر الإجمالي",
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/i18n/dictionaries/cmn.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"plansEmpty": "未找到计划",
"previous": "上一个",
"price": "价格",
"privacy": "隐私",
"protein": "蛋白质",
"proteinTarget": "蛋白质目标",
"reset": "重置",
Expand All @@ -79,6 +80,8 @@
"submit": "提交",
"success": "成功",
"sugar": "",
"support": "支持",
"terms": "条款",
"today": "今天",
"toggleColorMode": "切换界面",
"totalPrice": "总价",
Expand Down
13 changes: 8 additions & 5 deletions src/renderer/i18n/dictionaries/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"carbohydrateTarget": "Carb target",
"cholesterol": "Cholesterol",
"cmCentimeters": "cm",
"copied": "Copied",
"copy": "Copy",
"couchDbUrl": "CouchDB URL",
"count": "Count",
"currency": "Currency",
Expand All @@ -27,6 +29,7 @@
"dietaryCarbohydratePercent": "Dietary carbohydrate percent",
"dietaryFatPercent": "Dietary fat percent",
"dietaryProteinPercent": "Dietary protein percent",
"edit": "Edit",
"energy": "Energy",
"energyTarget": "Energy target",
"exportJson": "Export JSON",
Expand Down Expand Up @@ -62,6 +65,7 @@
"plansEmpty": "No plans found",
"previous": "Previous",
"price": "Price",
"privacy": "Privacy",
"protein": "Protein",
"proteinTarget": "Protein target",
"reset": "Reset",
Expand All @@ -72,17 +76,16 @@
"settings": "Settings",
"sex": "Sex",
"sodium": "Sodium",
"subitems": "Subitems",
"submit": "Submit",
"success": "Success",
"sugar": "Sugar",
"support": "Support",
"terms": "Terms",
"today": "Today",
"toggleColorMode": "Toggle dark UI",
"totalPrice": "Total price",
"transFat": "Trans fat",
"week": "Week",
"weight": "Weight",
"subitems": "Subitems",
"edit": "Edit",
"copy": "Copy",
"copied": "Copied"
"weight": "Weight"
}
3 changes: 3 additions & 0 deletions src/renderer/i18n/dictionaries/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"plansEmpty": "No se encontraron planes",
"previous": "Anterior",
"price": "Precio",
"privacy": "Privacidad",
"protein": "Proteína",
"proteinTarget": "Objetivo de proteínas",
"reset": "Reiniciar",
Expand All @@ -79,6 +80,8 @@
"submit": "Enviar",
"success": "Éxito",
"sugar": "Azúcar",
"support": "Soporte",
"terms": "Términos",
"today": "Hoy",
"toggleColorMode": "Cambiar modo de color",
"totalPrice": "Precio total",
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/i18n/dictionaries/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"plansEmpty": "Aucun plan trouvé",
"previous": "Précédent",
"price": "Prix",
"privacy": "Confidentialité",
"protein": "Protéine",
"proteinTarget": "Objectif de protéines",
"reset": "Réinitialiser",
Expand All @@ -79,6 +80,8 @@
"submit": "Soumettre",
"success": "Succès",
"sugar": "Sucre",
"support": "Support",
"terms": "Conditions",
"today": "Aujourd'hui",
"toggleColorMode": "Basculer le mode couleur",
"totalPrice": "Prix total",
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/i18n/dictionaries/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"plansEmpty": "कोई योजनाएँ नहीं मिलीं",
"previous": "पिछला",
"price": "मूल्य",
"privacy": "गोपनीयता",
"protein": "प्रोटीन",
"proteinTarget": "प्रोटीन लक्ष्य",
"reset": "रीसेट",
Expand All @@ -79,6 +80,8 @@
"submit": "जमा करें",
"success": "सफलता",
"sugar": "चीनी",
"support": "सहायता",
"terms": "शर्तें",
"today": "आज",
"toggleColorMode": "यूआई टॉगल करें",
"totalPrice": "कुल मूल्य",
Expand Down

0 comments on commit 48992d5

Please sign in to comment.