mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
feat(presets): add OpenCode Go referral link and promo copy without partner badge
Decouple the in-app promotion banner from isPartner so a preset can show a promo phrase plus referral link without earning the paid-partner star. - ApiKeySection: gate the banner on partnerPromotionKey alone; the star is still driven solely by isPartner. This also un-suppresses the existing MiniMax cn/en promos, which already carried copy without isPartner. - OpenCode Go (claude/codex/opencode): point apiKeyUrl at the referral link and add partnerPromotionKey "opencode_go" (no isPartner set). - i18n: add the opencode_go promo string across zh/en/ja/zh-TW.
This commit is contained in:
@@ -29,7 +29,6 @@ export function ApiKeySection({
|
||||
websiteUrl,
|
||||
placeholder,
|
||||
disabled,
|
||||
isPartner,
|
||||
partnerPromotionKey,
|
||||
}: ApiKeySectionProps) {
|
||||
const { t } = useTranslation();
|
||||
@@ -73,8 +72,8 @@ export function ApiKeySection({
|
||||
})}
|
||||
</a>
|
||||
|
||||
{/* 合作伙伴促销信息 */}
|
||||
{isPartner && partnerPromotionKey && (
|
||||
{/* 促销信息(与 isPartner 解耦:仅凭 partnerPromotionKey 即可展示,星标仍由 isPartner 控制) */}
|
||||
{partnerPromotionKey && (
|
||||
<div className="rounded-md bg-blue-50 dark:bg-blue-950/30 p-2.5 border border-blue-200 dark:border-blue-800">
|
||||
<p className="text-xs leading-relaxed text-blue-700 dark:text-blue-300">
|
||||
💡{" "}
|
||||
|
||||
Reference in New Issue
Block a user