diff --git a/src/app/[lang]/dashboard/commercial_license/GetStartedCommercial.tsx b/src/app/[lang]/dashboard/commercial_license/GetStartedCommercial.tsx index 9b05209..7ae251c 100644 --- a/src/app/[lang]/dashboard/commercial_license/GetStartedCommercial.tsx +++ b/src/app/[lang]/dashboard/commercial_license/GetStartedCommercial.tsx @@ -1,21 +1,45 @@ "use client"; import { Dictionary } from "@/dictionaries"; -import { Button, Card, Text } from "@/components/Geist"; +import { Button, Card, Snippet, Spacer, Text } from "@/components/Geist"; import Markdown from "marked-react"; import React from "react"; +import Link from "next/link"; +import { UserDetails } from "@/supabase/supabaseServer"; -export function GetStartedCommercial(props: { d: Dictionary }) { +export function GetStartedCommercial(props: { + userDetails: UserDetails; + d: Dictionary; +}) { const d = props.d.dashboard.get_started_license; + const { userDetails } = props; return ( - - {d.title} - - {d.explanation} -
- -
-
+ <> + + {d.run_docker_title} + {d.run_docker_setup_server} + + {d.run_docker_features} + {d.run_docker_contact} + + + + {d.purchase_license_title} + {d.purchase_license_explanation} +
+ + + +
+
+ ); } diff --git a/src/app/[lang]/dashboard/commercial_license/page.tsx b/src/app/[lang]/dashboard/commercial_license/page.tsx index 0a46002..0550729 100644 --- a/src/app/[lang]/dashboard/commercial_license/page.tsx +++ b/src/app/[lang]/dashboard/commercial_license/page.tsx @@ -2,7 +2,11 @@ import { dictionary } from "@/dictionaries"; import React from "react"; import { GetStartedCommercial } from "./GetStartedCommercial"; import { Dashboard } from "../Dashboard"; -import { getSession, getSubAndCalls } from "@/supabase/supabaseServer"; +import { + getSession, + getSubAndCalls, + getUserDetails, +} from "@/supabase/supabaseServer"; import { redirect } from "next/navigation"; export default async function CommercialLicensePage({ @@ -16,6 +20,7 @@ export default async function CommercialLicensePage({ } const subAndCalls = await getSubAndCalls(session.user.id); + const userDetails = await getUserDetails(); const d = await dictionary(lang); return ( @@ -25,7 +30,7 @@ export default async function CommercialLicensePage({ showApiUsage={false} tab="commercial_license" > - + ); } diff --git a/src/dictionaries/en.json b/src/dictionaries/en.json index 08905ed..acc86bd 100644 --- a/src/dictionaries/en.json +++ b/src/dictionaries/en.json @@ -99,8 +99,13 @@ "dont_worry": "Don't worry, I have prepared a [beginner's guide](https://docs.reacher.email/getting-started/quickstart) for using the API, with a program called Postman. If you still have questions, just use the chat widget on the bottom right corner to send me a message, or shoot me an email at [📧 amaury@reacher.email](mailto:amaury@reacher.email)." }, "get_started_license": { - "title": "How to get started with the Commercial License?", - "explanation": "To get started with self-hosting, please refer to our [Self-Host Guide](https://docs.reacher.email/self-hosting/install).\n\nIf you have any questions about self-hosting, please contact [✉️ amaury@reacher.email](mailto:amaury@reacher.email)." + "run_docker_title": "Get Started with Reacher in 20 Minutes", + "run_docker_setup_server": "Check out our [installation guide](https://docs.reacher.email/self-hosting/install) to set up Reacher on your server. When prompted, use this command to run Reacher:", + "run_docker_features": "Your trial Docker image includes:\n- A **pre-configured proxy** from [Proxy4Smtp](https://www.proxy4smtp.com). Learn more about [proxy configuration](https://docs.reacher.email/self-hosting/proxies).\n- Up to **10000 email checks** daily.\n- Basic usage metrics **shared with Reacher** (anonymized).", + "run_docker_contact": "Need help or customization? Whether you want to use your own proxy, increase verification limits, or have other requirements - reach out to me at [✉️ amaury@reacher.email](mailto:amaury@reacher.email).", + "purchase_license_title": "Ready to Scale? Get a Commercial License", + "purchase_license_explanation": "Try the Commercial License Trial with no strict time limit - I'll check in after about two weeks to see how it's going. Once you've put Reacher through its paces, upgrade to a full Commercial License for **unlimited verifications** and **complete data privacy**. After purchase, I'll personally provide your unrestricted Dockerfile.", + "purchase_license_button": "Get Commercial License" } }, "footer": { @@ -240,7 +245,7 @@ "button_sign_up": "Sign up", "button_signing_up": "Signing up...", "login": "Login", - "prevent_spam": "Due to a recent surge in spam usage of Reacher, I'm personally reviewing new signups for the Commercial License trial. Could you answer help me answer a few quick questions?", + "prevent_spam": "To ensure the best experience for all users, we're currently reviewing new Commercial License trial signups. Would you mind answering a few quick questions to help me get to know you better?", "company_website": "Company website", "email_volume": { "title": "What is your monthly email volume?", diff --git a/src/dictionaries/fr.json b/src/dictionaries/fr.json index 8c50b29..449e8d2 100644 --- a/src/dictionaries/fr.json +++ b/src/dictionaries/fr.json @@ -99,8 +99,13 @@ "dont_worry": "Ne vous inquiétez pas, j'ai préparé un [guide pour débutants](https://docs.reacher.email/getting-started/quickstart) pour utiliser l'API, avec un programme appelé Postman. Si vous avez encore des questions, utilisez simplement le widget de chat en bas à droite pour m'envoyer un message, ou envoyez-moi un e-mail à [📧 amaury@reacher.email](mailto:amaury@reacher.email)." }, "get_started_license": { - "title": "Comment commencer avec la Licence Commerciale ?", - "explanation": "Pour commencer l'auto-hébergement, veuillez vous référer à notre [Guide d'Auto-Hébergement](https://docs.reacher.email/self-hosting/install).\n\nSi vous avez des questions sur l'auto-hébergement, veuillez contacter [✉️ amaury@reacher.email](mailto:amaury@reacher.email)." + "run_docker_title": "Installez Reacher en 20 minutes", + "run_docker_setup_server": "Suivez le [guide d'installation](https://docs.reacher.email/self-hosting/install) pour installer Reacher sur votre serveur. Lorsqu'on vous demande d'exécuter l'image Docker, entrez cette commande :", + "run_docker_features": "Le Dockerfile a les fonctionnalités et limitations suivantes :\n- Utilise un **proxy intégré** fourni par [Proxy4Smtp](https://www.proxy4smtp.com). En savoir plus sur les [proxies](https://docs.reacher.email/self-hosting/proxies).\n- **10000 vérifications** par jour.\n- Résultats de vérification anonymisés **envoyés à Reacher**.", + "run_docker_contact": "Si vous rencontrez des problèmes ou avez besoin de personnaliser le Dockerfile fourni (par exemple, utiliser votre propre proxy, augmenter la limite quotidienne, etc.), contactez-moi à [✉️ amaury@reacher.email](mailto:amaury@reacher.email).", + "purchase_license_title": "Acheter une Licence Commerciale", + "purchase_license_explanation": "Il n'y a pas de limite stricte sur la durée de l'essai de la Licence Commerciale, mais je vous contacterai dans un délai d'environ deux semaines. Une fois que vous aurez testé Reacher de manière approfondie sur votre serveur, achetez une Licence Commerciale pour débloquer les **vérifications d'emails illimitées** et **aucune donnée envoyée à Reacher**. Je vous contacterai peu après l'achat pour vous fournir le nouveau Dockerfile sans limitations.", + "purchase_license_button": "Acheter une Licence Commerciale" } }, "footer": { diff --git a/supabase/migrations/20241214113511_commercial_license_trial.sql b/supabase/migrations/20241214113511_commercial_license_trial.sql index 97fa2ee..d00b753 100644 --- a/supabase/migrations/20241214113511_commercial_license_trial.sql +++ b/supabase/migrations/20241214113511_commercial_license_trial.sql @@ -1,4 +1,5 @@ -CREATE VIEW commercial_license_trial AS +CREATE VIEW commercial_license_trial +WITH (security_invoker = on) AS SELECT user_id, COUNT(*) AS calls_last_day,