Files
pangolin/client/lib/services/contact_channels.dart
T
2026-07-12 17:30:25 +08:00

24 lines
1.3 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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 / domainlaunchChannel 据此推导 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),
];