Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

some improvements

Blue Mouse836d1ba215a8
diff --git a/public/locales/en.json b/public/locales/en.json
index 9e9011594..9afbb16db 100644
--- a/public/locales/en.json
+++ b/public/locales/en.json
@@ -22,7 +22,8 @@
"integrationRemovalError": "Error occurred while removing the integration",
"enterACorrectNumber": "Please enter a correct number",
"numberCantBeNegative": "The number cannot be negative",
- "forecastNumberCantBeBigger": "The forecast number cannot be bigger than {{max}} for the selected frequency"
+ "forecastNumberCantBeBigger": "The forecast number cannot be bigger than {{max}} for the selected frequency",
+ "invalidToken": "Invalid token"
},
"common": {
"features": "Features",
diff --git a/src/pages/Project/Settings/Emails/ConfirmReportsShare/index.jsx b/src/pages/Project/Settings/Emails/ConfirmReportsShare/index.jsx
index 1625df669..a06cf674e 100644
--- a/src/pages/Project/Settings/Emails/ConfirmReportsShare/index.jsx
+++ b/src/pages/Project/Settings/Emails/ConfirmReportsShare/index.jsx
@@ -1,5 +1,5 @@
import React, { useState, useEffect, memo } from 'react'
-import { useParams } from 'react-router-dom'
+import { useParams, Link } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
@@ -7,6 +7,7 @@ import Title from 'components/Title'
import Loader from 'ui/Loader'
import { confirmSubscriberInvite } from 'api'
+import routes from 'routes'
const ConfirmReportsShare = () => {
const { t } = useTranslation('common')
@@ -51,18 +52,32 @@ const ConfirmReportsShare = () => {
if (error) {
return (
<Title title={t('titles.invitation')}>
- <div className='min-h-page bg-gray-50 dark:bg-gray-800'>
- <div className='flex justify-center pt-10'>
- <div className='rounded-md p-4 w-11/12 bg-red-50 lg:w-4/6'>
- <div className='flex'>
- <div className='flex-shrink-0'>
- <XCircleIcon className='h-5 w-5 text-red-400' aria-hidden='true' />
+ <div className='bg-gray-50 dark:bg-gray-800 min-h-page px-4 py-16 sm:px-6 sm:py-24 md:grid md:place-items-center lg:px-8'>
+ <div className='max-w-max mx-auto'>
+ <main className='sm:flex'>
+ <XCircleIcon className='h-12 w-12 text-red-400' aria-hidden='true' />
+ <div className='sm:ml-6'>
+ <div className='sm:border-l max-w-prose sm:border-gray-200 sm:pl-6'>
+ <h1 className='text-4xl font-extrabold text-gray-900 dark:text-gray-50 tracking-tight sm:text-5xl'>
+ {error}
+ </h1>
</div>
- <div className='ml-3'>
- <h3 className='text-sm font-medium text-red-800 dark:text-red-500'>{error}</h3>
+ <div className='mt-8 flex space-x-3 sm:border-l sm:border-transparent sm:pl-6'>
+ <Link
+ to={routes.dashboard}
+ className='inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500'
+ >
+ {t('common.dashboard')}
+ </Link>
+ <Link
+ to={routes.contact}
+ className='inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-indigo-700 bg-indigo-100 hover:bg-indigo-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:text-gray-50 dark:bg-gray-700 dark:hover:bg-gray-600 dark:focus:ring-gray-50'
+ >
+ {t('notFoundPage.support')}
+ </Link>
</div>
</div>
- </div>
+ </main>
</div>
</div>
</Title>
@@ -71,20 +86,26 @@ const ConfirmReportsShare = () => {
return (
<Title title={t('titles.invitation')}>
- <div className='min-h-page bg-gray-50 dark:bg-gray-800'>
- <div className='flex justify-center pt-10'>
- <div className='rounded-md p-4 w-11/12 bg-green-50 lg:w-4/6'>
- <div className='flex'>
- <div className='flex-shrink-0'>
- <CheckCircleIcon className='h-5 w-5 text-green-400' aria-hidden='true' />
- </div>
- <div className='ml-3'>
- <h3 className='text-sm font-medium text-green-800 dark:text-green-500'>
+ <div className='bg-gray-50 dark:bg-gray-800 min-h-page px-4 py-16 sm:px-6 sm:py-24 md:grid md:place-items-center lg:px-8'>
+ <div className='max-w-max mx-auto'>
+ <main className='sm:flex'>
+ <CheckCircleIcon className='h-12 w-12 text-green-500 dark:text-green-400' aria-hidden='true' />
+ <div className='sm:ml-6'>
+ <div className='sm:border-l max-w-prose sm:border-gray-200 sm:pl-6'>
+ <h1 className='text-4xl font-extrabold text-gray-900 dark:text-gray-50 tracking-tight sm:text-5xl'>
{t('apiNotifications.acceptInvitation')}
- </h3>
+ </h1>
+ </div>
+ <div className='mt-8 flex space-x-3 sm:border-l sm:border-transparent sm:pl-6'>
+ <Link
+ to={routes.dashboard}
+ className='inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500'
+ >
+ {t('common.dashboard')}
+ </Link>
</div>
</div>
- </div>
+ </main>
</div>
</div>
</Title>
diff --git a/src/pages/Project/Settings/Emails/Emails.jsx b/src/pages/Project/Settings/Emails/Emails.jsx
index f98d6dd34..42a07d3c7 100644
--- a/src/pages/Project/Settings/Emails/Emails.jsx
+++ b/src/pages/Project/Settings/Emails/Emails.jsx
@@ -9,6 +9,7 @@ import _keys from 'lodash/keys'
import _isEmpty from 'lodash/isEmpty'
import _filter from 'lodash/filter'
import _map from 'lodash/map'
+import _toLower from 'lodash/toLower'
import {
addSubscriber, removeSubscriber, getSubscribers, updateSubscriber,
@@ -132,7 +133,7 @@ const EmailList = ({
type='button'
className='inline-flex items-center shadow-sm pl-2 pr-1 py-0.5 border border-gray-200 dark:border-gray-600 text-sm leading-5 font-medium rounded-full bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-600'
>
- {t(`project.settings.roles.${reportFrequency}.name`)}
+ {t(`profileSettings.${_toLower(reportFrequency)}`)}
<ChevronDownIcon
style={{ transform: open ? 'rotate(180deg)' : '' }}
className='w-4 h-4 pt-px ml-0.5'
@@ -144,7 +145,7 @@ const EmailList = ({
<li onClick={() => changeRole(item)} className='p-4 hover:bg-indigo-600 group cursor-pointer flex justify-between items-center' key={item.value}>
<div>
<p className='font-bold text-gray-700 dark:text-gray-200 group-hover:text-gray-200'>
- {t(`project.settings.roles.${item.label}.name`)}
+ {t(`profileSettings.${_toLower(item.label)}`)}
</p>
</div>
{reportFrequency === item.value && (