From 96344a8d5e49ee262c4636a26b47ef39893c0437 Mon Sep 17 00:00:00 2001 From: Ivan Fontosh Date: Sun, 13 Sep 2026 15:38:16 +0800 Subject: [PATCH] feat(pricing): link master keys to VK market products (v1.0.6) Co-authored-by: Cursor --- package.json | 2 +- src/components/sections/Pricing.tsx | 6 +++++- src/components/ui/BuyButton.tsx | 10 +++------- src/data/siteContent.ts | 6 ++++++ src/i18n/messages.ts | 4 ++-- src/siteContent.test.ts | 20 ++++++++++++++++++-- 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index f83cfb8..0797cd3 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/components/sections/Pricing.tsx b/src/components/sections/Pricing.tsx index 2f75f8f..2bef44c 100644 --- a/src/components/sections/Pricing.tsx +++ b/src/components/sections/Pricing.tsx @@ -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() {
  • {feature}
  • ))} - + {copy.cta.buy} diff --git a/src/components/ui/BuyButton.tsx b/src/components/ui/BuyButton.tsx index da14fe9..b061960 100644 --- a/src/components/ui/BuyButton.tsx +++ b/src/components/ui/BuyButton.tsx @@ -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 ( - ); diff --git a/src/data/siteContent.ts b/src/data/siteContent.ts index 05808e2..21ee732 100644 --- a/src/data/siteContent.ts +++ b/src/data/siteContent.ts @@ -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; + export const RECOMMENDED_PRICING_TIER: PricingTierId = "master"; export const FAQ_IDS = [ diff --git a/src/i18n/messages.ts b/src/i18n/messages.ts index 09f530c..d6f7f28 100644 --- a/src/i18n/messages.ts +++ b/src/i18n/messages.ts @@ -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", diff --git a/src/siteContent.test.ts b/src/siteContent.test.ts index 7fc10ea..796c531 100644 --- a/src/siteContent.test.ts +++ b/src/siteContent.test.ts @@ -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"); }); });