Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

feat(config): simplify launch logic (#46)

Corentin Thomasset86733b082ac1
diff --git a/src/app.config.ts b/src/app.config.ts
index e4fa68ba..3df0e28d 100644
--- a/src/app.config.ts
+++ b/src/app.config.ts
@@ -1,18 +1,12 @@
-const isLaunched = true;
-
-export const requestEarlyAccessLink = 'https://tally.so/r/npz6BE';
-const getStartedLink = 'https://dashboard.papra.app';
-
export const config = {
site: {
name: 'Papra',
},
- isLaunched,
discordInvite: 'https://discord.gg/8UPjzsrBNF',
sponsorLink: 'https://github.com/sponsors/CorentinTh',
- getStartedLink: isLaunched ? getStartedLink : requestEarlyAccessLink,
+ getStartedLink: 'https://dashboard.papra.app',
launchDiscount: {
- enabled: isLaunched,
+ enabled: true,
percentage: 50,
// 31 december 2025 Paris time
endsAt: new Date('2025-12-31T23:59:59+01:00'),
diff --git a/src/components/Footer.astro b/src/components/Footer.astro
index ad9610a6..ef61bc5e 100644
--- a/src/components/Footer.astro
+++ b/src/components/Footer.astro
@@ -124,7 +124,7 @@ const sections: {
<div class="max-w-1200px mx-auto p-4">
<div class="flex justify-between flex-col md:flex-row gap-10">
<div class="">
- <a href="/" class="text-xl font-bold flex items-center group mb-2">
+ <a href={buildLocalizedPath({ locale: Astro.currentLocale, path: '/' })} class="text-xl font-bold flex items-center group mb-2">
<div class="i-tabler-file-text size-7 text-primary group-hover:(rotate-25deg) transition transform rotate-12deg"></div>
<span class="ml-2 text-foreground group-hover:text-foreground/80 transition">Papra</span>
</a>
diff --git a/src/components/Header.astro b/src/components/Header.astro
index e54e6e29..7784504c 100644
--- a/src/components/Header.astro
+++ b/src/components/Header.astro
@@ -1,5 +1,5 @@
---
-import { config, requestEarlyAccessLink } from '../app.config';
+import { config } from '../app.config';
import { buildLocalizedPath, useI18n } from '../i18n/i18n';
import { cn } from '../utils/cn';
@@ -40,14 +40,10 @@ const navigation = [
name: t('nav.self-host'),
url: 'https://docs.papra.app/self-hosting/using-docker/',
},
- ...(config.isLaunched
-? [
{
name: t('nav.pricing'),
url: buildLocalizedPath({ locale: Astro.currentLocale, path: '/pricing' }),
},
-]
-: []),
];
type Props = {
@@ -60,7 +56,7 @@ const { class: className } = Astro.props;
<nav
class={`z-100 border-0 border-b md:max-w-4xl pl-4 pr-3 py-4 mx-auto flex items-center justify-between md:(py-2 border-1px rounded-full mt-4) fixed top-0 left-0 right-0 bg-background bg-op-40 backdrop-blur-sm shadow-lg ${className}`}
>
- <a href="/" class="text-lg font-bold flex items-center group">
+ <a href={buildLocalizedPath({ locale: Astro.currentLocale, path: '/' })} class="text-lg font-bold flex items-center group">
<div class="i-tabler-file-text size-6 group-hover:rotate-25deg text-primary transition transform rotate-12deg"></div>
<span class="ml-2">Papra</span>
</a>
@@ -91,7 +87,7 @@ const { class: className } = Astro.props;
href={config.getStartedLink}
target="_blank"
>
- {config.getStartedLink === requestEarlyAccessLink ? t('nav.early-access') : t('nav.sign-in')}
+ {t('nav.sign-in')}
<div class="i-tabler-arrow-right size-4"></div>
</a>
</div>