feat: legal stuff

This commit is contained in:
TrèsAbhi committed 2024-05-23 12:41:21 -05:00
1 parent e2502abd9b
commit dab3393ba2
4 files changed
+32 -4

No files matched your search

+1
View File
@@ -61,6 +61,7 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"lz4js": "^0.2.0", "lz4js": "^0.2.0",
"markdown-escape": "^2.0.0", "markdown-escape": "^2.0.0",
"markdown-to-jsx": "^7.4.7",
"next": "^14.1.0", "next": "^14.1.0",
"parse-dds": "^1.2.1", "parse-dds": "^1.2.1",
"pickleparser": "^0.2.1", "pickleparser": "^0.2.1",
+9 -4
View File
@@ -1,6 +1,7 @@
'use client'; 'use client';
import { AlertDialog, Button, Flex, Heading, Text } from '@radix-ui/themes'; import { AlertDialog, Button, Flex, Heading, Text } from '@radix-ui/themes';
import { usePathname } from 'next/navigation';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { Link } from '../../components/Link'; import { Link } from '../../components/Link';
import { extendAuth } from '../../core/blitz/extendAuth'; import { extendAuth } from '../../core/blitz/extendAuth';
@@ -17,6 +18,8 @@ export function Checks() {
const policiesAgreementIndex = useApp( const policiesAgreementIndex = useApp(
(state) => state.policiesAgreementIndex, (state) => state.policiesAgreementIndex,
); );
const pathname = usePathname();
const isLegal = pathname.startsWith('/legal');
useEffect(() => { useEffect(() => {
setShowDevBuildAlert( setShowDevBuildAlert(
@@ -69,7 +72,8 @@ export function Checks() {
</AlertDialog.Content> </AlertDialog.Content>
</AlertDialog.Root> </AlertDialog.Root>
{policiesAgreementIndex !== CURRENT_POLICIES_AGREEMENT_INDEX && ( {policiesAgreementIndex !== CURRENT_POLICIES_AGREEMENT_INDEX &&
!isLegal && (
<Flex <Flex
align="end" align="end"
style={{ style={{
@@ -108,13 +112,14 @@ export function Checks() {
<Text> <Text>
This website utilizes cookies to perform analytics and This website utilizes cookies to perform analytics and
personalize your experience. You can learn more through{' '} personalize your experience. You can learn more through{' '}
<Link href="/legal/privacy-policy">our privacy policy</Link>. <Link href="/legal/privacy-policy">our privacy policy</Link>
You may opt out of personalized advertizement by visiting{' '} . You may opt out of personalized advertizement by visiting{' '}
<Link href="https://www.google.com/settings/ads"> <Link href="https://www.google.com/settings/ads">
Google Ad Settings Google Ad Settings
</Link> </Link>
. By using BlitzKit, you also agree to our{' '} . By using BlitzKit, you also agree to our{' '}
<Link href="/legal/terms-of-service">terms of service</Link>. <Link href="/legal/terms-of-service">terms of service</Link>
.
</Text> </Text>
</Flex> </Flex>
+17
View File
@@ -0,0 +1,17 @@
import Markdown from 'markdown-to-jsx';
import { use } from 'react';
import PageWrapper from '../../../components/PageWrapper';
export default function Page({ params }: { params: { document: string } }) {
const markdown = use(
fetch(
`https://raw.githubusercontent.com/tresabhi/blitzkit/main/docs/legal/${params.document}.md`,
).then((response) => response.text()),
);
return (
<PageWrapper>
<Markdown>{markdown}</Markdown>
</PageWrapper>
);
}
+5
View File
@@ -4402,6 +4402,11 @@ markdown-escape@^2.0.0:
resolved "https://registry.yarnpkg.com/markdown-escape/-/markdown-escape-2.0.0.tgz#44484d30d7845b91575c77fd8898f23a0a6f890c" resolved "https://registry.yarnpkg.com/markdown-escape/-/markdown-escape-2.0.0.tgz#44484d30d7845b91575c77fd8898f23a0a6f890c"
integrity sha512-Trz4v0+XWlwy68LJIyw3bLbsJiC8XAbRCKF9DbEtZjyndKOGVx6n+wNB0VfoRmY2LKboQLeniap3xrb6LGSJ8A== integrity sha512-Trz4v0+XWlwy68LJIyw3bLbsJiC8XAbRCKF9DbEtZjyndKOGVx6n+wNB0VfoRmY2LKboQLeniap3xrb6LGSJ8A==
markdown-to-jsx@^7.4.7:
version "7.4.7"
resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-7.4.7.tgz#740ee7ec933865ef5cc683a0992797685a75e2ee"
integrity sha512-0+ls1IQZdU6cwM1yu0ZjjiVWYtkbExSyUIFU2ZeDIFuZM1W42Mh4OlJ4nb4apX4H8smxDHRdFaoIVJGwfv5hkg==
media-query-parser@^2.0.2: media-query-parser@^2.0.2:
version "2.0.2" version "2.0.2"
resolved "https://registry.yarnpkg.com/media-query-parser/-/media-query-parser-2.0.2.tgz#ff79e56cee92615a304a1c2fa4f2bd056c0a1d29" resolved "https://registry.yarnpkg.com/media-query-parser/-/media-query-parser-2.0.2.tgz#ff79e56cee92615a304a1c2fa4f2bd056c0a1d29"