-
-
Notifications
You must be signed in to change notification settings - Fork 432
feat(i18n,ui): add privacy policy page #900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 14 commits
5d92585
3b5bca4
7822a6e
58b27e9
6e7d11f
572c71d
b03fb34
641cba4
db675a8
de9602e
4f9382a
1755360
7449877
eae2328
8552f12
444a4e2
c511fcc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,266 @@ | ||
| <script setup lang="ts"> | ||
| definePageMeta({ | ||
| name: 'cookie-policy', | ||
| }) | ||
|
|
||
| useSeoMeta({ | ||
| title: () => `${$t('cookie_policy.title')} - npmx`, | ||
| description: () => $t('cookie_policy.welcome', { app: 'npmx' }), | ||
| }) | ||
|
|
||
| defineOgImageComponent('Default', { | ||
| title: () => $t('cookie_policy.title'), | ||
| description: () => $t('cookie_policy.welcome', { app: 'npmx' }), | ||
| }) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result:
<script setup lang="ts">
const { t } = useI18n()
useSeoMeta({
title: () => t('seo.home.title'),
description: () => t('seo.home.description'),
ogTitle: () => t('seo.home.title'),
})
</script>This will also update when the locale changes because Sources: Nuxt [1] (nuxt.com) Citations:
🏁 Script executed: # Search for other useSeoMeta usage in the codebase to see if $t() is used elsewhere
rg 'useSeoMeta' -A 5 --type vue --type tsRepository: npmx-dev/npmx.dev Length of output: 88 🏁 Script executed: # Check if there are imports of useI18n in similar components
rg 'useI18n\(\)' -B 5 -A 10 --type vue --type ts | head -100Repository: npmx-dev/npmx.dev Length of output: 88 🏁 Script executed: # Check the actual content of the cookie-policy.vue file to see the full context
cat -n app/pages/cookie-policy.vue | head -20Repository: npmx-dev/npmx.dev Length of output: 652 Use The 🔧 Fix-const buildInfo = useAppConfig().buildInfo
-const { locale } = useI18n()
+const buildInfo = useAppConfig().buildInfo
+const { locale, t } = useI18n()
useSeoMeta({
- title: () => `${$t('cookie_policy.title')} - npmx`,
- description: () => $t('cookie_policy.welcome', { app: 'npmx' }),
+ title: () => `${t('cookie_policy.title')} - npmx`,
+ description: () => t('cookie_policy.welcome', { app: 'npmx' }),
})
defineOgImageComponent('Default', {
- title: () => $t('cookie_policy.title'),
- description: () => $t('cookie_policy.welcome', { app: 'npmx' }),
+ title: () => t('cookie_policy.title'),
+ description: () => t('cookie_policy.welcome', { app: 'npmx' }),
})
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure about this fix, there are more usages of useSeoMeta({
title: () => `${$t('about.title')} - npmx`,
ogTitle: () => `${$t('about.title')} - npmx`,
twitterTitle: () => `${$t('about.title')} - npmx`,
description: () => $t('about.meta_description'),
ogDescription: () => $t('about.meta_description'),
twitterDescription: () => $t('about.meta_description'),
})
defineOgImageComponent('Default', {
primaryColor: '#60a5fa',
title: 'About npmx',
description: 'A better browser for the **npm registry**',
})
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: Length of output: 9200 🏁 Script executed: Length of output: 27 🏁 Script executed: Length of output: 7385 🏁 Script executed: Length of output: 11318 🏁 Script executed: Length of output: 1795 🌐 Web query: 💡 Result: In @nuxtjs/i18n v8, Make
|
||
|
|
||
| const router = useRouter() | ||
| const buildInfo = useAppConfig().buildInfo | ||
| const { locale } = useI18n() | ||
| </script> | ||
|
|
||
| <template> | ||
| <main class="container flex-1 py-12 sm:py-16 w-full overflow-x-hidden"> | ||
| <article class="max-w-2xl mx-auto"> | ||
| <header class="mb-12"> | ||
| <div class="flex items-baseline justify-between gap-4 mb-4"> | ||
| <h1 class="font-mono text-3xl sm:text-4xl font-medium"> | ||
| {{ $t('cookie_policy.title') }} | ||
| </h1> | ||
| <button | ||
| type="button" | ||
| :title="$t('nav.back')" | ||
| class="inline-flex items-center gap-2 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded focus-visible:outline-accent/70 shrink-0" | ||
| @click="router.back()" | ||
| > | ||
| <span class="i-carbon:arrow-left rtl-flip w-4 h-4" aria-hidden="true" /> | ||
| <span class="hidden sm:inline">{{ $t('nav.back') }}</span> | ||
| </button> | ||
| </div> | ||
| <i18n-t | ||
| keypath="cookie_policy.last_updated" | ||
| tag="p" | ||
| scope="global" | ||
| class="text-fg-muted text-lg" | ||
| > | ||
| <template #date> | ||
| <NuxtTime | ||
| :locale | ||
| :datetime="buildInfo.cookiePolicyDate" | ||
| date-style="long" | ||
| time-style="medium" | ||
| /> | ||
| </template> | ||
| </i18n-t> | ||
| </header> | ||
|
|
||
| <div class="prose prose-invert max-w-none text-fg-muted"> | ||
| <p> | ||
| <i18n-t keypath="cookie_policy.welcome" tag="span" scope="global"> | ||
| <template #app> | ||
| <strong class="text-fg">npmx</strong> | ||
| </template> | ||
| </i18n-t> | ||
| </p> | ||
|
|
||
| <section class="mt-8"> | ||
| <h2 class="text-lg text-fg-subtle tracking-wider mb-4"> | ||
| {{ $t('cookie_policy.section_1.title') }} | ||
| </h2> | ||
| <p>{{ $t('cookie_policy.section_1.p1') }}</p> | ||
| </section> | ||
|
|
||
| <section class="mt-8"> | ||
| <h2 class="text-lg text-fg-subtle tracking-wider mb-4"> | ||
| {{ $t('cookie_policy.section_2.title') }} | ||
| </h2> | ||
| <p class="mb-4"> | ||
| <i18n-t keypath="cookie_policy.section_2.p1" tag="span" scope="global"> | ||
| <template #bold> | ||
| <strong class="text-fg">{{ $t('cookie_policy.section_2.bold') }}</strong> | ||
| </template> | ||
| </i18n-t> | ||
| </p> | ||
| <ul class="list-none ps-5 space-y-2"> | ||
| <li class="flex justify-start items-start gap-2"> | ||
| <span aria-hidden="true" class="text-fg-subtle shrink-0">—</span> | ||
| <i18n-t keypath="cookie_policy.section_2.li1" tag="span"> | ||
| <template #li11> | ||
| <strong class="text-fg font-mono text-sm"> | ||
| <bdi>{{ $t('cookie_policy.section_2.cookie_vdpl') }}</bdi> | ||
| </strong> | ||
| </template> | ||
| <template #separator> | ||
| <bdi>{{ $t('cookie_policy.section_2.separator') }}</bdi> | ||
| </template> | ||
| <template #li12> | ||
| <bdi>{{ $t('cookie_policy.section_2.cookie_vdpl_desc') }}</bdi> | ||
| </template> | ||
| </i18n-t> | ||
| </li> | ||
| <li class="flex justify-start items-start gap-2"> | ||
| <span aria-hidden="true" class="text-fg-subtle shrink-0">—</span> | ||
| <i18n-t keypath="cookie_policy.section_2.li2" tag="span"> | ||
| <template #li21> | ||
| <strong class="text-fg font-mono text-sm"> | ||
| <bdi>{{ $t('cookie_policy.section_2.cookie_h3') }}</bdi> | ||
| </strong> | ||
| </template> | ||
| <template #separator> | ||
| <bdi>{{ $t('cookie_policy.section_2.separator') }}</bdi> | ||
| </template> | ||
| <template #li22> | ||
| <bdi>{{ $t('cookie_policy.section_2.cookie_h3_desc') }}</bdi> | ||
| </template> | ||
| </i18n-t> | ||
| </li> | ||
| </ul> | ||
| </section> | ||
|
|
||
| <section class="mt-8"> | ||
| <h2 class="text-lg text-fg-subtle tracking-wider mb-4"> | ||
| {{ $t('cookie_policy.section_3.title') }} | ||
| </h2> | ||
| <p class="mb-4"> | ||
| <i18n-t keypath="cookie_policy.section_3.p1" tag="span" scope="global"> | ||
| <template #bold> | ||
| <strong class="text-fg">{{ $t('cookie_policy.section_3.bold') }}</strong> | ||
| </template> | ||
| <template #settings> | ||
| <NuxtLink | ||
| to="/settings" | ||
| class="text-fg-muted hover:text-fg underline decoration-fg-subtle/50 hover:decoration-fg" | ||
| > | ||
| {{ $t('cookie_policy.section_3.settings') }} | ||
| </NuxtLink> | ||
| </template> | ||
| </i18n-t> | ||
| </p> | ||
| <p> | ||
| <i18n-t keypath="cookie_policy.section_3.p2" tag="span" scope="global"> | ||
| <template #bold2> | ||
| <strong class="text-fg">{{ $t('cookie_policy.section_3.bold2') }}</strong> | ||
| </template> | ||
| </i18n-t> | ||
| </p> | ||
| </section> | ||
|
|
||
| <section class="mt-8"> | ||
| <h2 class="text-lg text-fg-subtle tracking-wider mb-4"> | ||
| {{ $t('cookie_policy.section_4.title') }} | ||
| </h2> | ||
| <p> | ||
| <i18n-t keypath="cookie_policy.section_4.p1" tag="span" scope="global"> | ||
| <template #bold> | ||
| <strong class="text-fg">{{ $t('cookie_policy.section_4.bold') }}</strong> | ||
| </template> | ||
| <template #bold2> | ||
| <strong class="text-fg">{{ $t('cookie_policy.section_4.bold2') }}</strong> | ||
| </template> | ||
| </i18n-t> | ||
| </p> | ||
| </section> | ||
|
|
||
| <section class="mt-8"> | ||
| <h2 class="text-lg text-fg-subtle tracking-wider mb-4"> | ||
| {{ $t('cookie_policy.section_5.title') }} | ||
| </h2> | ||
| <p class="mb-4"> | ||
| <i18n-t keypath="cookie_policy.section_5.p1" tag="span" scope="global"> | ||
| <template #bold> | ||
| <strong class="text-fg">{{ $t('cookie_policy.section_5.bold') }}</strong> | ||
| </template> | ||
| </i18n-t> | ||
| </p> | ||
| <p class="mb-2">{{ $t('cookie_policy.section_5.p2') }}</p> | ||
| <ul class="list-none px-0 space-y-2"> | ||
| <li> | ||
| <a | ||
| href="https://support.google.com/chrome/answer/95647?hl=en" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| class="flex justify-start items-center gap-2 p-3" | ||
| > | ||
| <span aria-hidden="true" class="text-fg-subtle shrink-0">—</span> | ||
| <span class="flex justify-between items-center flex-grow-1"> | ||
| <span | ||
| class="text-fg-muted hover:text-fg underline decoration-fg-subtle/50 hover:decoration-fg" | ||
| > | ||
| {{ $t('cookie_policy.section_5.chrome') }} | ||
| </span> | ||
| <span class="i-carbon:launch rtl-flip w-5 h-5" aria-hidden="true"></span> | ||
| </span> | ||
| </a> | ||
| </li> | ||
| <li> | ||
| <a | ||
| href="https://support.mozilla.org/en-US/kb/clear-cookies-and-site-data-firefox" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| class="flex justify-start items-center gap-2 p-3" | ||
| > | ||
| <span aria-hidden="true" class="text-fg-subtle shrink-0">—</span> | ||
| <span class="flex justify-between items-center flex-grow-1"> | ||
| <span | ||
| class="text-fg-muted hover:text-fg underline decoration-fg-subtle/50 hover:decoration-fg" | ||
| > | ||
| {{ $t('cookie_policy.section_5.firefox') }} | ||
| </span> | ||
| <span class="i-carbon:launch rtl-flip w-5 h-5" aria-hidden="true"></span> | ||
| </span> | ||
| </a> | ||
| </li> | ||
| <li> | ||
| <a | ||
| href="https://support.microsoft.com/en-us/windows/manage-cookies-in-microsoft-edge-view-allow-block-delete-and-use-168dab11-0753-043d-7c16-ede5947fc64d" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| class="flex justify-start items-center gap-2 p-3" | ||
| > | ||
| <span aria-hidden="true" class="text-fg-subtle shrink-0">—</span> | ||
| <span class="flex justify-between items-center flex-grow-1"> | ||
| <span | ||
| class="text-fg-muted hover:text-fg underline decoration-fg-subtle/50 hover:decoration-fg" | ||
| > | ||
| {{ $t('cookie_policy.section_5.edge') }} | ||
| </span> | ||
| <span class="i-carbon:launch rtl-flip w-5 h-5" aria-hidden="true"></span> | ||
| </span> | ||
| </a> | ||
| </li> | ||
| </ul> | ||
| </section> | ||
|
|
||
| <section class="mt-8"> | ||
| <h2 class="text-lg text-fg-subtle tracking-wider mb-4"> | ||
| {{ $t('cookie_policy.section_6.title') }} | ||
| </h2> | ||
| <p> | ||
| <i18n-t keypath="cookie_policy.section_6.p1" tag="span" scope="global"> | ||
| <template #link> | ||
| <a | ||
| href="https://github.com/npmx-dev/npmx.dev/issues" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| class="inline-flex items-center gap-1" | ||
| > | ||
| <span | ||
| class="text-fg-muted hover:text-fg underline decoration-fg-subtle/50 hover:decoration-fg" | ||
| >{{ $t('cookie_policy.section_6.link') }}</span | ||
| > | ||
| <span class="i-carbon:launch rtl-flip w-4 h-4" aria-hidden="true"></span> | ||
| </a> | ||
| </template> | ||
| </i18n-t> | ||
| </p> | ||
| </section> | ||
|
|
||
| <section class="mt-8"> | ||
| <h2 class="text-lg text-fg-subtle tracking-wider mb-4"> | ||
| {{ $t('cookie_policy.section_7.title') }} | ||
| </h2> | ||
| <p>{{ $t('cookie_policy.section_7.p1') }}</p> | ||
| </section> | ||
| </div> | ||
| </article> | ||
| </main> | ||
| </template> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -959,5 +959,58 @@ | |
| "vulnerabilities_summary": "{count} ({critical}C/{high}H)" | ||
| } | ||
| } | ||
| }, | ||
| "cookie_policy": { | ||
| "title": "cookie policy", | ||
| "last_updated": "Last updated: {date}", | ||
| "welcome": "Welcome to {app}. In this policy, we explain what cookies are, how we use them, and how you can manage them.", | ||
| "section_1": { | ||
| "title": "WHAT ARE COOKIES?", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we want this to be uppercase we should do it in CSS rather than here |
||
| "p1": "Cookies are small text files stored on your device when you visit a website. Their purpose is to enhance your browsing experience by remembering certain preferences and settings." | ||
| }, | ||
| "section_2": { | ||
| "title": "WHAT TYPES OF COOKIES DO WE USE?", | ||
| "p1": "On our website, we only use {bold} for purposes strictly necessary for the site's functionality. We do not use third-party or advertising cookies.", | ||
| "bold": "essential technical cookies", | ||
| "li1": "{li11}{separator} {li12}", | ||
| "li2": "{li21}{separator} {li22}", | ||
| "separator": ":", | ||
| "cookie_vdpl": "__vdpl", | ||
| "cookie_vdpl_desc": "This cookie is used by our hosting provider (Vercel) for skew protection. It ensures you fetch assets from the correct deployment version if a new update is released while you are browsing. It does not track you.", | ||
| "cookie_h3": "h3", | ||
| "cookie_h3_desc": "This is our secure session cookie. It stores the OAuth access token when you connect your Atmosphere account. It is essential for maintaining your authenticated session." | ||
| }, | ||
| "section_3": { | ||
| "title": "OTHER STORAGE TECHNOLOGIES", | ||
| "p1": "In addition to session cookies, we use your browser's {bold} to save your display preferences. This allows us to remember the theme (light/dark) and some other {settings} you have selected, so you don't have to reconfigure them on each visit.", | ||
| "bold": "Local Storage", | ||
| "p2": "This information is purely functional, stored only on your device, and {bold2}. We use it exclusively to improve your experience on our website.", | ||
| "bold2": "contains no personal data nor is it used to track you", | ||
| "settings": "settings" | ||
| }, | ||
| "section_4": { | ||
| "title": "COOKIE ACCEPTANCE AND APPLICATION ACCESS", | ||
| "p1": "The use of cookies on our website is {bold}. Therefore, {bold2}. By continuing to browse or log in, you expressly accept our cookie policy.", | ||
| "bold": "essential for its proper functioning", | ||
| "bold2": "if you do not accept the use of cookies, you will not be able to access the application" | ||
| }, | ||
| "section_5": { | ||
| "title": "COOKIE MANAGEMENT", | ||
| "p1": "You can configure your browser to accept, reject, or delete cookies according to your preferences. However, please note that {bold}.", | ||
| "bold": "rejecting cookies will prevent access to and use of the application", | ||
| "p2": "Below are links with instructions for cookie management in the most commonly used browsers:", | ||
| "chrome": "Google Chrome (opens in a new window)", | ||
| "firefox": "Mozilla Firefox (opens in a new window)", | ||
| "edge": "Microsoft Edge (opens in a new window)" | ||
| }, | ||
| "section_6": { | ||
| "title": "DATA CONTROLLER", | ||
| "p1": "While we only use cookies for essential functionality and session management, we guarantee compliance with the principles of transparency and security in data management. For any questions or requests regarding the use of cookies, you can contact us by opening an issue on our {link}.", | ||
| "link": "GitHub repository" | ||
| }, | ||
| "section_7": { | ||
| "title": "CHANGES TO THE COOKIE POLICY", | ||
| "p1": "We reserve the right to modify this policy at any time. Any changes will be published on this page." | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.