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!

(feature) Receive login notifications (#311)

Artem Boichuk55b02e7c3c43
diff --git a/app/api/index.ts b/app/api/index.ts
index 5f8f914d1..c8267ff24 100644
--- a/app/api/index.ts
+++ b/app/api/index.ts
@@ -1068,3 +1068,12 @@ export const resetFilters = (pid: string, type: string, filters: string[]) =>
debug('%s', error)
throw error
})
+
+export const reciveLoginNotification = (recive: boolean) =>
+ api
+ .post('user/login-notification', { recive })
+ .then((response) => response.data)
+ .catch((error) => {
+ debug('%s', error)
+ throw error
+ })
diff --git a/app/pages/Project/Settings/ProjectSettings.tsx b/app/pages/Project/Settings/ProjectSettings.tsx
index 9148a3614..af6ab9bfb 100644
--- a/app/pages/Project/Settings/ProjectSettings.tsx
+++ b/app/pages/Project/Settings/ProjectSettings.tsx
@@ -92,7 +92,7 @@ const ModalMessage = ({
useEffect(() => {
getFiltersList()
- // eslint-disable-next-line react-hooks/exhaustive-deps
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [filterType])
return (
@@ -118,22 +118,22 @@ const ModalMessage = ({
</nav>
</div>
{tab === tabDeleteDataModal[1].name && (
- <>
- <p className='text-gray-500 dark:text-gray-300 mt-4 mb-2 text-sm'>
- {t('project.settings.reseted.partiallyDesc')}
- </p>
- <p className='text-gray-500 dark:text-gray-300 italic mt-1 mb-2 text-sm'>
- {t('project.settings.reseted.partiallyHint')}
- </p>
- <input type='text' className='h-0 w-0 border-0 p-0 m-0 focus:text-transparent focus:border-transparent focus:shadow-none focus:ring-transparent' />
- <FlatPicker
- onChange={(date) => setDateRange(date)}
- options={{
- altInputClass: 'shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 dark:text-gray-50 dark:placeholder-gray-400 dark:border-gray-800 dark:bg-slate-800 rounded-md',
- }}
- value={dateRange}
- />
- </>
+ <>
+ <p className='text-gray-500 dark:text-gray-300 mt-4 mb-2 text-sm'>
+ {t('project.settings.reseted.partiallyDesc')}
+ </p>
+ <p className='text-gray-500 dark:text-gray-300 italic mt-1 mb-2 text-sm'>
+ {t('project.settings.reseted.partiallyHint')}
+ </p>
+ <input type='text' className='h-0 w-0 border-0 p-0 m-0 focus:text-transparent focus:border-transparent focus:shadow-none focus:ring-transparent' />
+ <FlatPicker
+ onChange={(date) => setDateRange(date)}
+ options={{
+ altInputClass: 'shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 dark:text-gray-50 dark:placeholder-gray-400 dark:border-gray-800 dark:bg-slate-800 rounded-md',
+ }}
+ value={dateRange}
+ />
+ </>
)}
{tab === tabDeleteDataModal[0].name && (
<p className='text-gray-500 dark:text-gray-300 italic mt-4 mb-4 text-sm'>
@@ -558,28 +558,28 @@ const ProjectSettings = ({
hint={t('project.settings.publicHint')}
/>
{!isSelfhosted && (
- <Checkbox
- checked={Boolean(form.isPasswordProtected)}
- onChange={() => {
- if (!form.public && form.isPasswordProtected) {
- setForm({
- ...form,
- isPasswordProtected: false,
- })
- return
- }
+ <Checkbox
+ checked={Boolean(form.isPasswordProtected)}
+ onChange={() => {
+ if (!form.public && form.isPasswordProtected) {
+ setForm({
+ ...form,
+ isPasswordProtected: false,
+ })
+ return
+ }
- if (!form.public) {
- setShowProtected(true)
- }
- }}
- disabled={form?.public}
- name='isPasswordProtected'
- id='isPasswordProtected'
- className='mt-4'
- label={t('project.settings.protected')}
- hint={t('project.settings.protectedHint')}
- />
+ if (!form.public) {
+ setShowProtected(true)
+ }
+ }}
+ disabled={form?.public}
+ name='isPasswordProtected'
+ id='isPasswordProtected'
+ className='mt-4'
+ label={t('project.settings.protected')}
+ hint={t('project.settings.protectedHint')}
+ />
)}
<div className='flex flex-wrap justify-center sm:justify-between gap-2 mt-8'>
<div className='flex flex-wrap items-center gap-2'>
@@ -591,41 +591,41 @@ const ProjectSettings = ({
</Button>
</div>
{!project?.shared && (
- <div className='flex flex-wrap justify-center gap-2'>
- {!isSelfhosted && (
- <Button onClick={() => setShowTransfer(true)} semiDanger semiSmall>
- <>
- <RocketLaunchIcon className='w-5 h-5 mr-1' />
- {t('project.settings.transfer')}
- </>
- </Button>
- )}
- <Button onClick={() => !projectResetting && setShowReset(true)} loading={projectDeleting} semiDanger semiSmall>
- <>
- <TrashIcon className='w-5 h-5 mr-1' />
- {t('project.settings.reset')}
- </>
- </Button>
- <Button onClick={() => !projectDeleting && setShowDelete(true)} loading={projectDeleting} danger semiSmall>
- <>
- <ExclamationTriangleIcon className='w-5 h-5 mr-1' />
- {t('project.settings.delete')}
- </>
- </Button>
- </div>
+ <div className='flex flex-wrap justify-center gap-2'>
+ {!isSelfhosted && (
+ <Button onClick={() => setShowTransfer(true)} semiDanger semiSmall>
+ <>
+ <RocketLaunchIcon className='w-5 h-5 mr-1' />
+ {t('project.settings.transfer')}
+ </>
+ </Button>
+ )}
+ <Button onClick={() => !projectResetting && setShowReset(true)} loading={projectDeleting} semiDanger semiSmall>
+ <>
+ <TrashIcon className='w-5 h-5 mr-1' />
+ {t('project.settings.reset')}
+ </>
+ </Button>
+ <Button onClick={() => !projectDeleting && setShowDelete(true)} loading={projectDeleting} danger semiSmall>
+ <>
+ <ExclamationTriangleIcon className='w-5 h-5 mr-1' />
+ {t('project.settings.delete')}
+ </>
+ </Button>
+ </div>
)}
</div>
{!isSelfhosted && !project?.shared && (
- <>
- <hr className='mt-8 xs:mt-2 sm:mt-5 border-gray-200 dark:border-gray-600' />
- <Emails projectId={id} projectName={project.name} />
- </>
+ <>
+ <hr className='mt-8 xs:mt-2 sm:mt-5 border-gray-200 dark:border-gray-600' />
+ <Emails projectId={id} projectName={project.name} />
+ </>
)}
{!isSelfhosted && !project?.shared && (
- <>
- <hr className='mt-2 sm:mt-5 border-gray-200 dark:border-gray-600' />
- <People project={project} />
- </>
+ <>
+ <hr className='mt-2 sm:mt-5 border-gray-200 dark:border-gray-600' />
+ <People project={project} />
+ </>
)}
</>
) : (
@@ -635,14 +635,14 @@ const ProjectSettings = ({
)}
{!isSettings && (
- <div>
- <Button className='mr-2 border-indigo-100 dark:text-gray-50 dark:border-slate-700/50 dark:bg-slate-800 dark:hover:bg-slate-700' onClick={onCancel} secondary regular>
- {t('common.cancel')}
- </Button>
- <Button type='submit' loading={projectSaving} primary regular>
- {t('common.save')}
- </Button>
- </div>
+ <div>
+ <Button className='mr-2 border-indigo-100 dark:text-gray-50 dark:border-slate-700/50 dark:bg-slate-800 dark:hover:bg-slate-700' onClick={onCancel} secondary regular>
+ {t('common.cancel')}
+ </Button>
+ <Button type='submit' loading={projectSaving} primary regular>
+ {t('common.save')}
+ </Button>
+ </div>
)}
</form>
<Modal
@@ -691,7 +691,7 @@ const ProjectSettings = ({
error={beenSubmitted ? errors.password : null}
/>
</div>
- )}
+ )}
isOpened={showProtected}
/>
<Modal
@@ -721,7 +721,7 @@ const ProjectSettings = ({
onChange={(e) => setTransferEmail(e.target.value)}
/>
</div>
- )}
+ )}
isOpened={showTransfer}
onSubmit={onTransfer}
/>
diff --git a/app/pages/UserSettings/UserSettings.container.tsx b/app/pages/UserSettings/UserSettings.container.tsx
index 79dc5fe80..3a8d2e179 100644
--- a/app/pages/UserSettings/UserSettings.container.tsx
+++ b/app/pages/UserSettings/UserSettings.container.tsx
@@ -22,13 +22,18 @@ const mapStateToProps = (state: StateType) => {
const mapDispatchToProps = (dispatch: AppDispatch) => ({
onGDPRExportFailed: (message: string) => {
- dispatch(errorsActions.genericError({
- message,
- }))
+ dispatch(
+ errorsActions.genericError({
+ message,
+ }),
+ )
},
- onDelete: (t: (key: string) => string, onSuccess: {
- (): void,
- }) => {
+ onDelete: (
+ t: (key: string) => string,
+ onSuccess: {
+ (): void;
+ },
+ ) => {
dispatch(
sagaActions.deleteAccountAsync(
(error: string) => dispatch(
@@ -51,70 +56,87 @@ const mapDispatchToProps = (dispatch: AppDispatch) => ({
dispatch(UIActions.deleteProjectCache({}))
},
userSharedUpdate: (message: string) => {
- dispatch(alertsActions.userSharedUpdate({
- message,
- type: 'success',
- }))
+ dispatch(
+ alertsActions.userSharedUpdate({
+ message,
+ type: 'success',
+ }),
+ )
},
sharedProjectError: (message: string) => {
- dispatch(errorsActions.sharedProjectFailed({
- message,
- }))
+ dispatch(
+ errorsActions.sharedProjectFailed({
+ message,
+ }),
+ )
},
genericError: (message: string) => {
- dispatch(errorsActions.genericError({
- message,
- }))
+ dispatch(
+ errorsActions.genericError({
+ message,
+ }),
+ )
},
removeProject: (projectId: string) => {
- dispatch(UIActions.removeProject({
- pid: projectId,
- shared: true,
- }))
+ dispatch(
+ UIActions.removeProject({
+ pid: projectId,
+ shared: true,
+ }),
+ )
},
removeShareProject: (id: string) => {
dispatch(authActions.deleteShareProject(id))
},
setProjectsShareData: (data: Partial<ISharedProject>, id: string) => {
- dispatch(UIActions.setProjectsShareData({
- data,
- id,
- shared: true,
- }))
+ dispatch(
+ UIActions.setProjectsShareData({
+ data,
+ id,
+ shared: true,
+ }),
+ )
},
setUserShareData: (data: Partial<ISharedProject>, id: string) => {
- dispatch(authActions.setUserShareData({
- data,
- id,
- }))
+ dispatch(
+ authActions.setUserShareData({
+ data,
+ id,
+ }),
+ )
},
updateProfileFailed: (message: string) => {
- dispatch(errorsActions.updateUserProfileFailed({
- message,
- }))
+ dispatch(
+ errorsActions.updateUserProfileFailed({
+ message,
+ }),
+ )
},
accountUpdated: (message: string) => {
- dispatch(alertsActions.accountUpdated({
- message,
- type: 'success',
- }))
+ dispatch(
+ alertsActions.accountUpdated({
+ message,
+ type: 'success',
+ }),
+ )
},
- updateUserProfileAsync: (data: Partial<IUser>, successMessage: string, callback = (e: any) => {}) => {
+ updateUserProfileAsync: (
+ data: Partial<IUser>,
+ successMessage: string,
+ callback = (e: any) => { },
+ ) => {
dispatch(
- sagaActions.updateUserProfileAsync(
- data,
- (res: any) => {
- if (res) {
- dispatch(
- alertsActions.accountUpdated({
- message: successMessage,
- type: 'success',
- }),
- )
- }
- callback(res)
- },
- ),
+ sagaActions.updateUserProfileAsync(data, (res: any) => {
+ if (res) {
+ dispatch(
+ alertsActions.accountUpdated({
+ message: successMessage,
+ type: 'success',
+ }),
+ )
+ }
+ callback(res)
+ }),
)
},
setAPIKey: (apiKey: string) => {
@@ -123,25 +145,24 @@ const mapDispatchToProps = (dispatch: AppDispatch) => ({
// setThemeType: (theme) => {
// dispatch(UIActions.setThemeType(theme))
// },
- linkSSO: (t: (key: string) => string, callback: (e: any) => void, provider: string) => {
- dispatch(
- sagaActions.linkSSO(
- t,
- callback,
- provider,
- ),
- )
- },
- unlinkSSO: (t: (key: string) => string, callback: (e: any) => void, provider: string) => {
- dispatch(
- sagaActions.unlinkSSO(
- t,
- callback,
- provider,
- ),
- )
- },
- updateShowLiveVisitorsInTitle: (show: boolean, callback: (isSuccess: boolean) => void) => {
+ linkSSO: (
+ t: (key: string) => string,
+ callback: (e: any) => void,
+ provider: string,
+ ) => {
+ dispatch(sagaActions.linkSSO(t, callback, provider))
+ },
+ unlinkSSO: (
+ t: (key: string) => string,
+ callback: (e: any) => void,
+ provider: string,
+ ) => {
+ dispatch(sagaActions.unlinkSSO(t, callback, provider))
+ },
+ updateShowLiveVisitorsInTitle: (
+ show: boolean,
+ callback: (isSuccess: boolean) => void,
+ ) => {
dispatch(sagaActions.updateShowLiveVisitorsInTitle(show, callback))
},
logoutAll: () => {
diff --git a/app/pages/UserSettings/UserSettings.tsx b/app/pages/UserSettings/UserSettings.tsx
index 2458743e8..98b2a80c7 100644
--- a/app/pages/UserSettings/UserSettings.tsx
+++ b/app/pages/UserSettings/UserSettings.tsx
@@ -11,7 +11,12 @@ import _findIndex from 'lodash/findIndex'
import _map from 'lodash/map'
import _keys from 'lodash/keys'
import {
- EnvelopeIcon, ExclamationTriangleIcon, ArrowDownTrayIcon, CurrencyDollarIcon, ClipboardDocumentIcon, ChevronDownIcon,
+ EnvelopeIcon,
+ ExclamationTriangleIcon,
+ ArrowDownTrayIcon,
+ CurrencyDollarIcon,
+ ClipboardDocumentIcon,
+ ChevronDownIcon,
} from '@heroicons/react/24/outline'
import PropTypes from 'prop-types'
import dayjs from 'dayjs'
@@ -19,8 +24,14 @@ import utc from 'dayjs/plugin/utc'
import cx from 'clsx'
import {
- reportFrequencies, DEFAULT_TIMEZONE, WEEKLY_REPORT_FREQUENCY, CONFIRMATION_TIMEOUT,
- GDPR_REQUEST, GDPR_EXPORT_TIMEFRAME, TimeFormat, isSelfhosted,
+ reportFrequencies,
+ DEFAULT_TIMEZONE,
+ WEEKLY_REPORT_FREQUENCY,
+ CONFIRMATION_TIMEOUT,
+ GDPR_REQUEST,
+ GDPR_EXPORT_TIMEFRAME,
+ TimeFormat,
+ isSelfhosted,
} from 'redux/constants'
import { IUser } from 'redux/models/IUser'
import { ISharedProject } from 'redux/models/ISharedProject'
@@ -33,12 +44,20 @@ import Select from 'ui/Select'
import Checkbox from 'ui/Checkbox'
import PaidFeature from 'modals/PaidFeature'
import TimezonePicker from 'ui/TimezonePicker'
-import { isValidEmail, isValidPassword, MIN_PASSWORD_CHARS } from 'utils/validator'
+import {
+ isValidEmail,
+ isValidPassword,
+ MIN_PASSWORD_CHARS,
+} from 'utils/validator'
import routes from 'routesPath'
import { trackCustom } from 'utils/analytics'
import { getCookie, setCookie } from 'utils/cookie'
import {
- confirmEmail, exportUserData, generateApiKey, deleteApiKey, // setTheme,
+ confirmEmail,
+ exportUserData,
+ generateApiKey,
+ deleteApiKey, // setTheme,
+ reciveLoginNotification,
} from 'api'
import ProjectList from './components/ProjectList'
import TwoFA from './components/TwoFA'
@@ -77,9 +96,9 @@ interface IProps {
}
interface IForm extends Partial<IUser> {
- repeat: string,
- password: string,
- email: string
+ repeat: string;
+ password: string;
+ email: string;
}
const UserSettings = ({
@@ -90,10 +109,15 @@ const UserSettings = ({
linkSSO, unlinkSSO, theme, updateShowLiveVisitorsInTitle, logoutAll,
}: IProps): JSX.Element => {
const navigate = useNavigate()
- const { t }: {
- t: (key: string, options?: {
- [key: string]: string | number | null,
- }) => string,
+ const {
+ t,
+ }: {
+ t: (
+ key: string,
+ options?: {
+ [key: string]: string | number | null;
+ }
+ ) => string;
} = useTranslation('common')
const [form, setForm] = useState<IForm>({
@@ -103,13 +127,17 @@ const UserSettings = ({
timeFormat: user.timeFormat || TimeFormat['12-hour'],
})
const [showPasswordFields, setShowPasswordFields] = useState<boolean>(false)
- const [timezone, setTimezone] = useState<string>(user.timezone || DEFAULT_TIMEZONE)
+ const [timezone, setTimezone] = useState<string>(
+ user.timezone || DEFAULT_TIMEZONE,
+ )
const [isPaidFeatureOpened, setIsPaidFeatureOpened] = useState<boolean>(false)
const [timezoneChanged, setTimezoneChanged] = useState<boolean>(false)
- const [reportFrequency, setReportFrequency] = useState<string>(user.reportFrequency)
+ const [reportFrequency, setReportFrequency] = useState<string>(
+ user.reportFrequency,
+ )
const [validated, setValidated] = useState<boolean>(false)
const [errors, setErrors] = useState<{
- [key: string]: string,
+ [key: string]: string;
}>({})
const [beenSubmitted, setBeenSubmitted] = useState<boolean>(false)
const [showModal, setShowModal] = useState<boolean>(false)
@@ -125,7 +153,7 @@ const UserSettings = ({
const validate = () => {
const allErrors = {} as {
- [key: string]: string,
+ [key: string]: string;
}
if (!isValidEmail(form.email)) {
@@ -133,7 +161,9 @@ const UserSettings = ({
}
if (_size(form.password) > 0 && !isValidPassword(form.password)) {
- allErrors.password = t('auth.common.xCharsError', { amount: MIN_PASSWORD_CHARS })
+ allErrors.password = t('auth.common.xCharsError', {
+ amount: MIN_PASSWORD_CHARS,
+ })
}
if (form.password !== form.repeat) {
@@ -160,7 +190,7 @@ const UserSettings = ({
useEffect(() => {
validate()
- }, [form]) // eslint-disable-line
+ }, [form]); // eslint-disable-line
useEffect(() => {
return () => {
@@ -178,7 +208,7 @@ const UserSettings = ({
const { target } = event
const value = target.type === 'checkbox' ? target.checked : target.value
- setForm(prevForm => ({
+ setForm((prevForm) => ({
...prevForm,
[target.name]: value,
}))
@@ -210,7 +240,9 @@ const UserSettings = ({
}
}
- const handleShowLiveVisitorsSave = (e: React.ChangeEvent<HTMLInputElement>) => {
+ const handleShowLiveVisitorsSave = (
+ e: React.ChangeEvent<HTMLInputElement>,
+ ) => {
if (settingUpdating) {
return
}
@@ -230,14 +262,39 @@ const UserSettings = ({
})
}
+ const handleReceiveLoginNotifications = async (
+ e: React.ChangeEvent<HTMLInputElement>,
+ ) => {
+ if (settingUpdating) {
+ return
+ }
+
+ const { checked } = e.target
+
+ setSettingUpdating(true)
+
+ try {
+ await reciveLoginNotification(checked)
+ updateUserData({
+ receiveLoginNotifications: checked,
+ })
+ accountUpdated(t('profileSettings.updated'))
+ } catch {
+ genericError(t('apiNotifications.somethingWentWrong'))
+ }
+ }
+
const handleIntegrationSave = (data: any, callback = () => { }) => {
setBeenSubmitted(true)
if (validated) {
- onSubmit({
- ...form,
- ...data,
- }, callback)
+ onSubmit(
+ {
+ ...form,
+ ...data,
+ },
+ callback,
+ )
}
}
@@ -262,10 +319,11 @@ const UserSettings = ({
}
const reportIconExtractor = (_: any, index: number) => {
- if (!isPaidTierUsed && reportFrequencies[index] === WEEKLY_REPORT_FREQUENCY) {
- return (
- <CurrencyDollarIcon className='w-5 h-5 mr-1' />
- )
+ if (
+ !isPaidTierUsed
+ && reportFrequencies[index] === WEEKLY_REPORT_FREQUENCY
+ ) {
+ return <CurrencyDollarIcon className='w-5 h-5 mr-1' />
}
return null
@@ -290,8 +348,19 @@ const UserSettings = ({
const onExport = async (exportedAt: string) => {
try {
- if (getCookie(GDPR_REQUEST) || (!_isNull(exportedAt) && !dayjs().isAfter(dayjs.utc(exportedAt).add(GDPR_EXPORT_TIMEFRAME, 'day'), 'day'))) {
- onGDPRExportFailed(t('profileSettings.tryAgainInXDays', { amount: GDPR_EXPORT_TIMEFRAME }))
+ if (
+ getCookie(GDPR_REQUEST)
+ || (!_isNull(exportedAt)
+ && !dayjs().isAfter(
+ dayjs.utc(exportedAt).add(GDPR_EXPORT_TIMEFRAME, 'day'),
+ 'day',
+ ))
+ ) {
+ onGDPRExportFailed(
+ t('profileSettings.tryAgainInXDays', {
+ amount: GDPR_EXPORT_TIMEFRAME,
+ }),
+ )
return
}
await exportUserData()
@@ -480,7 +549,13 @@ const UserSettings = ({
label={t('profileSettings.selectTimeFormat')}
className='w-full'
items={translatedTimeFormat}
- onSelect={(f) => setForm((prev) => ({ ...prev, timeFormat: timeFormatArray[_findIndex(translatedTimeFormat, (freq) => freq === f)] }))}
+ onSelect={(f) => setForm((prev) => ({
+ ...prev,
+ timeFormat:
+ timeFormatArray[
+ _findIndex(translatedTimeFormat, (freq) => freq === f)
+ ],
+ }))}
/>
</div>
</div>
@@ -543,6 +618,15 @@ const UserSettings = ({
handleIntegrationSave={handleIntegrationSave}
genericError={genericError}
/>
+ <Checkbox
+ checked={user.receiveLoginNotifications}
+ onChange={handleReceiveLoginNotifications}
+ disabled={settingUpdating}
+ name='active'
+ id='active'
+ className='mt-4'
+ label={t('profileSettings.receiveLoginNotifications')}
+ />
<hr className='mt-5 border-gray-200 dark:border-gray-600' />
{/* API access setup */}
@@ -708,6 +792,17 @@ const UserSettings = ({
{t('profileSettings.requestExport')}
</>
</Button>
+ <Button
+ className='ml-3'
+ onClick={() => setShowModal(true)}
+ semiSmall
+ danger
+ >
+ <>
+ <ExclamationTriangleIcon className='w-5 h-5 mr-1' />
+ {t('profileSettings.delete')}
+ </>
+ </Button>
<div className='flex justify-center flex-wrap gap-2'>
<Button onClick={logoutAll} semiSmall semiDanger>
<>
@@ -728,7 +823,10 @@ const UserSettings = ({
)}
</form>
- <PaidFeature isOpened={isPaidFeatureOpened} onClose={() => setIsPaidFeatureOpened(false)} />
+ <PaidFeature
+ isOpened={isPaidFeatureOpened}
+ onClose={() => setIsPaidFeatureOpened(false)}
+ />
<Modal
onClose={() => setShowExportModal(false)}
onSubmit={() => {
diff --git a/app/redux/models/IUser.ts b/app/redux/models/IUser.ts
index 6944dfdcc..b64d09c5e 100644
--- a/app/redux/models/IUser.ts
+++ b/app/redux/models/IUser.ts
@@ -36,4 +36,5 @@ export interface IUser {
maxEventsCount: number
tierCurrency: 'USD' | 'EUR' | 'GBP' | null
showLiveVisitorsInTitle: boolean
+ receiveLoginNotifications: boolean
}
diff --git a/public/locales/en.json b/public/locales/en.json
index d5eecf887..425314c95 100644
--- a/public/locales/en.json
+++ b/public/locales/en.json
@@ -400,6 +400,7 @@
"quitProject": "Are you sure you want to quit this project?",
"quitProjectTitle": "Quit {{project}}?",
"shared": "Shared projects",
+ "receiveLoginNotifications": "Receive login notifications",
"owned": "Owned projects",
"sharedTable": {
"project": "Project",