@@ -65,6 +65,8 @@ export function Home() {
6565 ) ; // feat: 新增状态,用于存储当前选中的域名
6666 const [ showEmailModal , setShowEmailModal ] = useState ( false ) ; // feat: 新增状态,用于控制邮件详情模态框的显示
6767 const [ showPromoModal , setShowPromoModal ] = useState ( ( ) => {
68+ // 如果未启用推广,不弹出
69+ if ( ! config . showAff ) return false ;
6870 // 检查是否已经显示过弹框(使用 localStorage)
6971 const hasShown = localStorage . getItem ( "aicentos_promo_shown" ) ;
7072 return ! hasShown ; // 如果没显示过,则自动弹出
@@ -361,7 +363,7 @@ export function Home() {
361363 />
362364 </ InfoModal >
363365 ) }
364- { showPromoModal && (
366+ { config . showAff && showPromoModal && (
365367 < InfoModal
366368 showModal = { showPromoModal }
367369 setShowModal = { setShowPromoModal }
@@ -458,12 +460,14 @@ export function Home() {
458460 < h1 className = "text-gray-50 text-xl font-bold mb-3 group-hover:text-cyan-500 duration-500" >
459461 { t ( "Virtual Temporary Email" ) }
460462 </ h1 >
461- < button
462- type = "button"
463- onClick = { ( ) => setShowPromoModal ( true ) }
464- className = "mb-6 text-left text-sm text-cyan-400 hover:text-cyan-300 transition-colors underline underline-offset-4 decoration-cyan-500/60" >
465- Vmail & AICentOS 联动注册送 Claude Code、Codex 免费额度
466- </ button >
463+ { config . showAff && (
464+ < button
465+ type = "button"
466+ onClick = { ( ) => setShowPromoModal ( true ) }
467+ className = "mb-6 text-left text-sm text-cyan-400 hover:text-cyan-300 transition-colors underline underline-offset-4 decoration-cyan-500/60" >
468+ Vmail & AICentOS 联动注册送 Claude Code、Codex 免费额度
469+ </ button >
470+ ) }
467471 < div className = "flex flex-col gap-4 text-sm text-gray-200" >
468472 < a
469473 href = "https://github.com/oiov/vmail"
0 commit comments