Skip to content

Commit

Permalink
Merge pull request #129 from s1lvax/feature/privacy-policy
Browse files Browse the repository at this point in the history
privacy policy + crypto changes
  • Loading branch information
s1lvax authored Nov 3, 2024
2 parents aacf9f9 + 8a3ca7d commit 90a0fec
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 17 deletions.
18 changes: 10 additions & 8 deletions src/lib/components/Index/Footer.svelte
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<script>
import { socials } from '$lib/constants/socials';
import { findSocialIcon } from '$lib/utils/findSocialIcon';
import { IconBrandGithub, IconMessage } from '@tabler/icons-svelte';
</script>

<footer class="border-t">
<div class="mx-auto max-w-7xl px-6 py-12 md:flex md:items-center md:justify-between lg:px-8">
<div class="flex justify-center space-x-6 md:order-2">
{#each socials as social}
<a href={social.link} class="text-gray-400 hover:text-gray-500">
<span class="sr-only">{social.name}</span>
<svelte:component this={findSocialIcon(social.name)} />
</a>
{/each}
<a href="https://github.com/s1lvax/route" class="text-gray-400 hover:text-gray-500">
<svelte:component this={IconBrandGithub} />
</a>
<a href="mailto:[email protected]" class="text-gray-400 hover:text-gray-500">
<svelte:component this={IconMessage} />
</a>
<a href="/privacy-policy" class="text-gray-400 hover:text-gray-500">
<p>Privacy Policy</p>
</a>
</div>
<div class="mt-8 md:order-1 md:mt-0">
<p class="text-center text-xs leading-5 text-gray-500">&copy; 2024 Route</p>
Expand Down
108 changes: 108 additions & 0 deletions src/routes/privacy-policy/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<script>
import { Button } from '$lib/components/ui/button';
</script>

<div class="my-4 flex items-center justify-center p-4">
<div class="w-full max-w-4xl space-y-4 text-left leading-relaxed">
<Button href="/">Back to home</Button>
<p class="text-base font-normal">
Welcome to Route. This Privacy Policy is designed to help you understand how we collect, use,
disclose, and safeguard your personal information. By using Route, you consent to the
practices described in this policy.
<br /><br />
Changes To This Privacy Policy Route reserves the right to modify or update this Privacy Policy
at any time without prior notice. Your continued use of Route after any changes constitutes your
acceptance of the revised Privacy Policy. Please review the Privacy Policy periodically.
</p>

<div class="space-y-6">
<h1 class="text-lg font-bold">Information We Collect</h1>
<p class="text-base">
During your use of Route, we may request certain information necessary to provide you with
the best experience. The information we collect includes:
</p>
<ul class="list-inside list-disc">
<li>Account Information: Your username and email when you sign up.</li>
<li>
GitHub Access Token: When authorizing with GitHub, we access only public data necessary to
display on your profile.
</li>
<li>
Spotify Access Token: When authorizing with Spotify, we access only public data necessary
to display on your profile.
</li>
<li>
Chess.com Username: When authorizing with Chess.com, we access only public data necessary
to display on your profile.
</li>
<li>
Social Media Profiles: If you choose to connect your social media profiles, we access only
public data necessary to display on your profile.
</li>
<li>
Profile Data: Information you choose to display, such as links, skills, and any connected
social profiles.
</li>
<li>
Usage Data: Basic usage patterns, such as general activity and engagement metrics, which
help us improve Route’s functionality.
</li>
</ul>
</div>

<h1 class="mt-6 text-lg font-bold">How We Use Your Information</h1>
<p class="text-base">
The information we collect is used to enhance Route’s functionality, improve your experience,
protect Route from unauthorized access, and ensure accurate profile engagement metrics.
</p>

<h1 class="mt-6 text-lg font-bold">Links To Other Sites</h1>
<p class="text-base">
Route may contain links to external sites not operated by us. If you click on a third-party
link, you will be redirected to that site. We encourage you to review the Privacy Policy of
every site you visit, as we have no control over and are not responsible for their content,
privacy policies, or practices.
</p>

<h1 class="mt-6 text-lg font-bold">Disclosure of Your Information</h1>
<p class="text-base">
We do not sell, trade, or rent your personal information to third parties. However, we may
disclose information in response to legal requirements, such as complying with law enforcement
requests, court orders, or other legal processes. If Route is acquired or merged with another
company, your information may be transferred as part of that transaction.
</p>

<h1 class="mt-6 text-lg font-bold">Security</h1>
<p class="text-base">
We take reasonable measures to protect your information from unauthorized access, disclosure,
or alteration. However, no internet transmission is completely secure, and we cannot guarantee
the absolute security of your data.
</p>

<h1 class="mt-6 text-lg font-bold">Your Choices</h1>
<p class="text-base">
You have the right to access, correct, or delete your personal information. To request these
actions, please contact us at <a href="mailto:[email protected]" class="underline"
>[email protected]</a
>
or delete your account in the user's settings.
</p>

<h1 class="mt-6 text-lg font-bold">Children's Information</h1>
<p class="text-base">
Route is not intended for anyone under 16. We do not knowingly collect information from
children under this age. If you believe your child has provided us with personal information
without your consent, please contact us immediately. We will take steps to remove the
information and terminate the child’s account, if applicable.
</p>

<h1 class="mt-6 text-lg font-bold">Contact Us</h1>
<p class="text-base">
For any questions or concerns about this Privacy Policy, please reach out to us at <a
href="mailto:[email protected]"
class="underline">[email protected]</a
>.
</p>
<p class="text-sm italic">Last updated: 02/11/2024</p>
</div>
</div>
42 changes: 33 additions & 9 deletions src/routes/profile/personal/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,20 +239,44 @@ export const actions: Actions = {

if (user) {
try {
await prisma.cryptoWallets.create({
data: {
const existingCrypto = await prisma.cryptoWallets.findFirst({
where: {
cryptoName,
wallet,
userId: user.githubId
}
});

//add the crypto creation to the recent activity of the user
createRecentActivity(
'CRYPTO_CREATED',
`Add your ${cryptoName} address to the footer`,
user.githubId
);
if (existingCrypto) {
// Update if the wallet already exists
await prisma.cryptoWallets.update({
where: { id: existingCrypto.id },
data: {
wallet: wallet
}
});
//update the crypto creation to the recent activity of the user
createRecentActivity(
'CRYPTO_CREATED',
`Updated your ${cryptoName} wallet`,
user.githubId
);
} else {
// Create a new wallet if it doesn't exist
await prisma.cryptoWallets.create({
data: {
cryptoName: cryptoName,
wallet: wallet,
userId: user.githubId
}
});

//add the crypto creation to the recent activity of the user
createRecentActivity(
'CRYPTO_CREATED',
`Add your ${cryptoName} address to the footer`,
user.githubId
);
}
} catch (error) {
console.error(error);
throw Error('Failed to create social');
Expand Down

0 comments on commit 90a0fec

Please sign in to comment.