feat(pricing): link master keys to VK market products (v1.0.6)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ttrpg-player-landing",
|
||||
"private": true,
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "Marketing landing for TTRPG Player (НРИ Плеер)",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
PRICING_TIER_BUY_URLS,
|
||||
PRICING_TIER_IDS,
|
||||
RECOMMENDED_PRICING_TIER,
|
||||
} from "../../data/siteContent";
|
||||
@@ -60,7 +61,10 @@ export function Pricing() {
|
||||
<li key={feature}>{feature}</li>
|
||||
))}
|
||||
</ul>
|
||||
<BuyButton variant={recommended ? "gold" : "secondary"}>
|
||||
<BuyButton
|
||||
href={PRICING_TIER_BUY_URLS[id]}
|
||||
variant={recommended ? "gold" : "secondary"}
|
||||
>
|
||||
{copy.cta.buy}
|
||||
</BuyButton>
|
||||
</article>
|
||||
|
||||
@@ -1,28 +1,24 @@
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
import { CROWDFUNDING_URL } from "../../data/siteContent";
|
||||
import { Button } from "./Button";
|
||||
|
||||
type BuyButtonVariant = "primary" | "secondary" | "ghost" | "gold";
|
||||
|
||||
type BuyButtonProps = {
|
||||
href: string;
|
||||
children: ReactNode;
|
||||
variant?: BuyButtonVariant;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export function BuyButton({
|
||||
href,
|
||||
children,
|
||||
variant = "secondary",
|
||||
className,
|
||||
}: BuyButtonProps) {
|
||||
return (
|
||||
<Button
|
||||
href={CROWDFUNDING_URL}
|
||||
variant={variant}
|
||||
className={className}
|
||||
newTab
|
||||
>
|
||||
<Button href={href} variant={variant} className={className} newTab>
|
||||
{children}
|
||||
</Button>
|
||||
);
|
||||
|
||||
@@ -103,6 +103,12 @@ export const PRICING_TIER_IDS = ["basic", "master", "legend"] as const;
|
||||
|
||||
export type PricingTierId = (typeof PRICING_TIER_IDS)[number];
|
||||
|
||||
export const PRICING_TIER_BUY_URLS = {
|
||||
basic: "https://vk.ru/market/product/bazovy-klyuch-238917656-13366032",
|
||||
master: "https://vk.ru/market/product/klyuch-mastera-238917656-13366158",
|
||||
legend: "https://vk.ru/market/product/legenda-nri-238917656-13366160",
|
||||
} as const satisfies Record<PricingTierId, string>;
|
||||
|
||||
export const RECOMMENDED_PRICING_TIER: PricingTierId = "master";
|
||||
|
||||
export const FAQ_IDS = [
|
||||
|
||||
@@ -24,7 +24,7 @@ const ru = {
|
||||
navAria: "Основная навигация",
|
||||
cta: {
|
||||
download: "Скачать",
|
||||
buy: "Поддержать",
|
||||
buy: "Купить",
|
||||
downloadFree: "Скачать бесплатно",
|
||||
buyLicense: "Поддержать проект",
|
||||
downloadForOs: "Скачать для моей ОС",
|
||||
@@ -294,7 +294,7 @@ const en: SiteCopy = {
|
||||
navAria: "Main navigation",
|
||||
cta: {
|
||||
download: "Download",
|
||||
buy: "Support",
|
||||
buy: "Buy",
|
||||
downloadFree: "Download free",
|
||||
buyLicense: "Support the project",
|
||||
downloadForOs: "Download for my OS",
|
||||
|
||||
+18
-2
@@ -9,6 +9,7 @@ import {
|
||||
FEATURE_VARIANTS,
|
||||
NAV_LINK_KEYS,
|
||||
NAV_HREFS,
|
||||
PRICING_TIER_BUY_URLS,
|
||||
PRICING_TIER_IDS,
|
||||
RECOMMENDED_PRICING_TIER,
|
||||
REQUIRED_SECTION_IDS,
|
||||
@@ -76,6 +77,21 @@ describe("siteContent", () => {
|
||||
assert.equal(VK_URL, "https://vk.com/ttrpgplayer");
|
||||
});
|
||||
|
||||
it("maps each pricing tier to a VK market product url", () => {
|
||||
assert.equal(
|
||||
PRICING_TIER_BUY_URLS.basic,
|
||||
"https://vk.ru/market/product/bazovy-klyuch-238917656-13366032",
|
||||
);
|
||||
assert.equal(
|
||||
PRICING_TIER_BUY_URLS.master,
|
||||
"https://vk.ru/market/product/klyuch-mastera-238917656-13366158",
|
||||
);
|
||||
assert.equal(
|
||||
PRICING_TIER_BUY_URLS.legend,
|
||||
"https://vk.ru/market/product/legenda-nri-238917656-13366160",
|
||||
);
|
||||
});
|
||||
|
||||
it("maps each feature variant to a screenshot asset", () => {
|
||||
for (const variant of FEATURE_VARIANTS) {
|
||||
assert.match(SCREENSHOT_SRC[variant], /^\/images\/screenshot-.+\.png$/u);
|
||||
@@ -103,8 +119,8 @@ describe("i18n messages", () => {
|
||||
it("documents download and support labels in both locales", () => {
|
||||
assert.equal(MESSAGES.ru.cta.download, "Скачать");
|
||||
assert.equal(MESSAGES.en.cta.download, "Download");
|
||||
assert.equal(MESSAGES.ru.cta.buy, "Поддержать");
|
||||
assert.equal(MESSAGES.en.cta.buy, "Support");
|
||||
assert.equal(MESSAGES.ru.cta.buy, "Купить");
|
||||
assert.equal(MESSAGES.en.cta.buy, "Buy");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user