diff --git a/Roadmap.md b/Roadmap.md index 70735ff..284ab60 100644 --- a/Roadmap.md +++ b/Roadmap.md @@ -2,6 +2,12 @@ ## Planned Features +### v0.1.2 + +- [x] Add a privacy policy page. +- [x] Add a cookie agreement banner at the bottom of the page. +- [ ] Add an option to allow an alert will not show up in the future once user dismiss it. + ### v0.2.0 - [ ] Allow to delete a notification in both desktop and mobile devices. diff --git a/src/components/common/CookiePrivacyBanner.vue b/src/components/common/CookiePrivacyBanner.vue new file mode 100644 index 0000000..9601925 --- /dev/null +++ b/src/components/common/CookiePrivacyBanner.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/src/components/common/Header.astro b/src/components/common/Header.astro index 2083430..179b4e5 100644 --- a/src/components/common/Header.astro +++ b/src/components/common/Header.astro @@ -20,7 +20,7 @@ const isAllowedUser = session?.user?.email && allowedEmails.includes(session.use
-
AlphaPush
+ { isAllowedUser ? (
+ + - \ No newline at end of file + diff --git a/src/pages/403.astro b/src/pages/403.astro index f981dda..5da124c 100644 --- a/src/pages/403.astro +++ b/src/pages/403.astro @@ -7,7 +7,7 @@ import { Card, CardContent } from '@/components/ui/card';

Access Denied

-

Sorry, you don't have permission to access the push service.

+

Sorry, you don't have permission to access the push service.

diff --git a/src/pages/index.astro b/src/pages/index.astro index 9dfa2a9..0e48804 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,7 +1,9 @@ --- +import { getSession } from 'auth-astro/server'; + +import CookiePrivacyBanner from '@/components/common/CookiePrivacyBanner.vue'; import Page from '@/components/common/Page.astro'; import NotificationList from '@/components/notification/NotificationList.vue'; -import { getSession } from 'auth-astro/server'; const session = await getSession(Astro.request); let initialNotifications = []; @@ -28,9 +30,9 @@ if (session?.user?.email) { if (response.ok) { const data = (await response.json()) as { notifications: any[]; totalPages: number; totalCount: number }; const highlightedNotificationId = Astro.url.searchParams.get('notificationId'); - initialNotifications = data.notifications.map(notification => ({ + initialNotifications = data.notifications.map((notification) => ({ ...notification, - highlight: notification.id === highlightedNotificationId + highlight: notification.id === highlightedNotificationId, })); totalPages = data.totalPages; } else { @@ -46,4 +48,5 @@ if (session?.user?.email) { initialNotifications={initialNotifications} initialTotalPages={totalPages} /> - \ No newline at end of file + + diff --git a/src/pages/privacy-policy.astro b/src/pages/privacy-policy.astro new file mode 100644 index 0000000..f0b60a5 --- /dev/null +++ b/src/pages/privacy-policy.astro @@ -0,0 +1,90 @@ +--- +import { marked } from 'marked'; +import Page from '@/components/common/Page.astro'; +import { Card, CardContent } from '@/components/ui/card'; + +const privacyPolicyMarkdown = ` +# Privacy Policy + +## Introduction + +Welcome to AlphaPush. We are committed to protecting your privacy and ensuring the security of your personal information. This Privacy Policy explains how we collect, use, and safeguard your data when you use our service. + +## Information We Collect + +### Device Information + +We use Fingerprint.js to collect device information for the purpose of improving your experience and ensuring the security of our service. This information may include: + +### Cookies +We use cookies to enhance your browsing experience and provide personalized features. Cookies are small text files stored on your device that help us recognize you and remember your preferences. + +## How We Use Your Information + +The information we collect is used solely for the following purposes: + +1. To provide and maintain our service +2. To improve user experience + +## Data Security + +We take the security of your data seriously. All device information and other data collected are: + +- Not shared with any third parties +- Not stored alongside sensitive data in our local databases +- Protected using industry-standard security measures + +## Your Rights + +You have the right to: + +- Access the personal information we hold about you +- Request correction of any inaccurate information +- Request deletion of your data from our systems + +## Changes to This Policy + +We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page. +`; + +const content = marked(privacyPolicyMarkdown); +--- + + + + +
+ + +

Last updated: 2024-08-25

+ + +