refactor(contact): 渠道抽单源常量 + RedeemScreen 删去哪买引流卡(仅留兑换码)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// contact_channels.dart — 联系渠道单源常量(Telegram/邮箱/官网)
|
||||
//
|
||||
// 三处引用点:screens/contact_page.dart(桌面联系页)、
|
||||
// widgets/account_screens.dart 的 ContactScreen / RedeemScreen。
|
||||
// name 用 nameKey 占位,页面侧按 t 映射(telegram→字面量,email/website→AppText),
|
||||
// 避免把 AppText 塞进常量。点击行为仍由 services/channel_launch.dart::launchChannel 处理。
|
||||
import 'package:flutter/widgets.dart';
|
||||
import '../widgets/pangolin_icons.dart';
|
||||
|
||||
class ContactChannel {
|
||||
const ContactChannel({required this.icon, required this.name, required this.sub, this.accent = false});
|
||||
final IconData icon;
|
||||
final String name; // 展示名(Telegram 用字面量;邮箱/官网用 l10n,在页面侧传入)
|
||||
final String sub; // handle:@x / a@b / domain(launchChannel 据此推导 URL)
|
||||
final bool accent;
|
||||
}
|
||||
|
||||
// name 用 key 占位,页面按 t 映射;Telegram 固定字面量
|
||||
const List<({IconData icon, String nameKey, String sub, bool accent})> kContactChannels = [
|
||||
(icon: PangolinIcons.send, nameKey: 'telegram', sub: '@pangolin_app', accent: true),
|
||||
(icon: PangolinIcons.mail, nameKey: 'email', sub: 'support@yanmeiai.com', accent: false),
|
||||
(icon: PangolinIcons.globe, nameKey: 'website', sub: 'pangolin.yanmeiai.com', accent: false),
|
||||
];
|
||||
Reference in New Issue
Block a user