diff --git a/app/components/AppFooter.vue b/app/components/AppFooter.vue index 0018fc414..1ca54cf58 100644 --- a/app/components/AppFooter.vue +++ b/app/components/AppFooter.vue @@ -18,6 +18,12 @@ const isHome = computed(() => route.name === 'index') {{ $t('footer.about') }} + + {{ $t('cookie_policy.title') }} + + + + +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' }), +}) + +const router = useRouter() +const buildInfo = useAppConfig().buildInfo +const { locale } = useI18n() + + + diff --git a/config/env.ts b/config/env.ts index 049fa6a6a..643b9060d 100644 --- a/config/env.ts +++ b/config/env.ts @@ -73,6 +73,16 @@ export async function getGitInfo() { return { branch, commit, shortCommit } } +export async function getFileLastUpdated(path: string) { + try { + // Get ISO date of last commit for file + const date = await git.log(['-1', '--format=%cI', '--', path]) + return date.latest?.date || new Date().toISOString() + } catch { + return new Date().toISOString() + } +} + export async function getEnv(isDevelopment: boolean) { const { commit, shortCommit, branch } = await getGitInfo() const env = isDevelopment diff --git a/i18n/locales/en.json b/i18n/locales/en.json index c9733049e..99a2d2805 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -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?", + "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." + } } } diff --git a/lunaria/files/en-GB.json b/lunaria/files/en-GB.json index e2ef9dc9b..2061b2a5c 100644 --- a/lunaria/files/en-GB.json +++ b/lunaria/files/en-GB.json @@ -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?", + "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." + } } } diff --git a/lunaria/files/en-US.json b/lunaria/files/en-US.json index c9733049e..99a2d2805 100644 --- a/lunaria/files/en-US.json +++ b/lunaria/files/en-US.json @@ -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?", + "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." + } } } diff --git a/modules/build-env.ts b/modules/build-env.ts index 24355dcca..445527f05 100644 --- a/modules/build-env.ts +++ b/modules/build-env.ts @@ -1,7 +1,7 @@ import type { BuildInfo } from '../shared/types' import { createResolver, defineNuxtModule } from 'nuxt/kit' import { isCI } from 'std-env' -import { getEnv, version } from '../config/env' +import { getEnv, getFileLastUpdated, version } from '../config/env' const { resolve } = createResolver(import.meta.url) @@ -10,7 +10,10 @@ export default defineNuxtModule({ name: 'npmx:build-env', }, async setup(_options, nuxt) { - const { env, commit, shortCommit, branch } = await getEnv(nuxt.options.dev) + const [{ env, commit, shortCommit, branch }, cookiePolicyDate] = await Promise.all([ + getEnv(nuxt.options.dev), + getFileLastUpdated('app/pages/cookie-policy.vue'), + ]) nuxt.options.appConfig = nuxt.options.appConfig || {} nuxt.options.appConfig.env = env @@ -21,6 +24,7 @@ export default defineNuxtModule({ shortCommit, branch, env, + cookiePolicyDate, } satisfies BuildInfo nuxt.options.nitro.publicAssets = nuxt.options.nitro.publicAssets || [] diff --git a/shared/types/env.ts b/shared/types/env.ts index b1583e66d..ca0a4f2f5 100644 --- a/shared/types/env.ts +++ b/shared/types/env.ts @@ -5,4 +5,5 @@ export interface BuildInfo { time: number branch: string env: 'preview' | 'canary' | 'dev' | 'release' + cookiePolicyDate: string }