diff --git a/src/app/components/Checks.tsx b/src/app/components/Checks.tsx index 39cb31b3d..4453ebb9b 100644 --- a/src/app/components/Checks.tsx +++ b/src/app/components/Checks.tsx @@ -1,18 +1,22 @@ 'use client'; -import { AlertDialog, Button, Flex } from '@radix-ui/themes'; +import { AlertDialog, Button, Flex, Heading, Text } from '@radix-ui/themes'; import { useEffect, useState } from 'react'; +import { Link } from '../../components/Link'; import { extendAuth } from '../../core/blitz/extendAuth'; import { logout } from '../../core/blitz/logout'; import isDev from '../../core/blitzkit/isDev'; import { isLocalhost } from '../../core/blitzkit/isLocalhost'; -import { useApp } from '../../stores/app'; +import { CURRENT_POLICIES_AGREEMENT_INDEX, useApp } from '../../stores/app'; const DEV_BUILD_AGREEMENT_COOLDOWN = 8 * 24 * 60 * 60 * 1000; export function Checks() { const [showDevBuildAlert, setShowDevBuildAlert] = useState(false); const login = useApp((state) => state.login); + const policiesAgreementIndex = useApp( + (state) => state.policiesAgreementIndex, + ); useEffect(() => { setShowDevBuildAlert( @@ -37,31 +41,96 @@ export function Checks() { }); return ( - - - Experimental version! - - This version may have a lot of issues. Report issues to{' '} - - the official Discord server - - . Also consider using{' '} - the more stable release version. - You will be asked again in 8 days. - + <> + + + Experimental version! + + This version may have a lot of issues. Report issues to{' '} + + the official Discord server + + . Also consider using{' '} + the more stable release version. + You will be asked again in 8 days. + - - + + + + + {policiesAgreementIndex !== CURRENT_POLICIES_AGREEMENT_INDEX && ( + + - Continue - + + + + {policiesAgreementIndex === -1 + ? "BlitzKit's cookies" + : "BlitzKit's policies have changed"} + + + + This website utilizes cookies to perform analytics and + personalize your experience. You can learn more through{' '} + our privacy policy. + You may opt out of personalized advertizement by visiting{' '} + + Google Ad Settings + + . By using BlitzKit, you also agree to our{' '} + terms of service. + + + + + + - - + )} + ); } diff --git a/src/stores/app.ts b/src/stores/app.ts index cb036b2db..0931749f3 100644 --- a/src/stores/app.ts +++ b/src/stores/app.ts @@ -13,13 +13,17 @@ export interface App { devBuildAgreementTime: number; developerMode: boolean; login?: Login; + policiesAgreementIndex: number; } +export const CURRENT_POLICIES_AGREEMENT_INDEX = 0; + export const useApp = create()( persist( (set) => ({ devBuildAgreementTime: 0, developerMode: false, + policiesAgreementIndex: -1, }), { name: 'app', merge: (a, b) => merge(b, a) }, ),