fix(welcome): 修复欢迎页3个设计问题
1. Logo色与主色调不一致 — 品牌名"Genex"改用 ShaderMask 渐变 (#9B5CF6→#D946EF),与 logo icon 色系完全匹配 2. Logo到品牌名间距过大 — 24px → 12px,品牌名到slogan 8px → 6px 符合 8pt grid 美学标准(紧凑型视觉组 4-8-12px) 3. 缺少微信登录 — 新增 WeChat 社交登录按钮(绿色#07C160), 4语言i18n key: welcome.wechat Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3aeb0885a0
commit
9d7a5a7266
|
|
@ -32,6 +32,7 @@ const Map<String, String> en = {
|
|||
'welcome.slogan': 'Make Every Coupon Count',
|
||||
'welcome.phoneRegister': 'Phone Sign Up',
|
||||
'welcome.emailRegister': 'Email Sign Up',
|
||||
'welcome.wechat': 'WeChat',
|
||||
'welcome.otherLogin': 'Other Login Methods',
|
||||
'welcome.hasAccount': 'Already have an account?',
|
||||
'welcome.login': 'Log In',
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ const Map<String, String> ja = {
|
|||
'welcome.slogan': 'すべてのクーポンに価値を',
|
||||
'welcome.phoneRegister': '電話番号で登録',
|
||||
'welcome.emailRegister': 'メールで登録',
|
||||
'welcome.wechat': 'WeChat',
|
||||
'welcome.otherLogin': '他の方法でログイン',
|
||||
'welcome.hasAccount': 'アカウントをお持ちですか?',
|
||||
'welcome.login': 'ログイン',
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ const Map<String, String> zhCN = {
|
|||
'welcome.slogan': '让每一张券都有价值',
|
||||
'welcome.phoneRegister': '手机号注册',
|
||||
'welcome.emailRegister': '邮箱注册',
|
||||
'welcome.wechat': '微信',
|
||||
'welcome.otherLogin': '其他方式登录',
|
||||
'welcome.hasAccount': '已有账号?',
|
||||
'welcome.login': '登录',
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ const Map<String, String> zhTW = {
|
|||
'welcome.slogan': '讓每一張券都有價值',
|
||||
'welcome.phoneRegister': '手機號註冊',
|
||||
'welcome.emailRegister': '信箱註冊',
|
||||
'welcome.wechat': '微信',
|
||||
'welcome.otherLogin': '其他方式登入',
|
||||
'welcome.hasAccount': '已有帳號?',
|
||||
'welcome.login': '登入',
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import '../../../../app/i18n/app_localizations.dart';
|
|||
|
||||
/// A1. 欢迎页 - 品牌展示 + 注册/登录入口
|
||||
///
|
||||
/// 品牌Logo、Slogan、手机号注册、邮箱注册、社交登录入口(Google/Apple)
|
||||
/// 品牌Logo、Slogan、手机号注册、邮箱注册、社交登录入口(WeChat/Google/Apple)
|
||||
class WelcomePage extends StatelessWidget {
|
||||
const WelcomePage({super.key});
|
||||
|
||||
|
|
@ -30,17 +30,22 @@ class WelcomePage extends StatelessWidget {
|
|||
height: 80,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Brand Name
|
||||
Text(
|
||||
'Genex',
|
||||
style: AppTypography.displayLarge.copyWith(
|
||||
color: AppColors.primary,
|
||||
letterSpacing: 2,
|
||||
// Brand Name — 使用 logo 同色系渐变
|
||||
ShaderMask(
|
||||
shaderCallback: (bounds) => const LinearGradient(
|
||||
colors: [Color(0xFF9B5CF6), Color(0xFFD946EF)],
|
||||
).createShader(bounds),
|
||||
child: Text(
|
||||
'Genex',
|
||||
style: AppTypography.displayLarge.copyWith(
|
||||
color: Colors.white, // ShaderMask 需要白色底
|
||||
letterSpacing: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const SizedBox(height: 6),
|
||||
|
||||
// Slogan
|
||||
Text(
|
||||
|
|
@ -86,10 +91,19 @@ class WelcomePage extends StatelessWidget {
|
|||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Social Login Buttons
|
||||
// Social Login Buttons — WeChat + Google + Apple
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
_SocialLoginButton(
|
||||
icon: Icons.wechat,
|
||||
label: context.t('welcome.wechat'),
|
||||
color: const Color(0xFF07C160),
|
||||
onTap: () {
|
||||
Navigator.pushReplacementNamed(context, '/main');
|
||||
},
|
||||
),
|
||||
const SizedBox(width: 24),
|
||||
_SocialLoginButton(
|
||||
icon: Icons.g_mobiledata_rounded,
|
||||
label: 'Google',
|
||||
|
|
@ -146,12 +160,14 @@ class WelcomePage extends StatelessWidget {
|
|||
class _SocialLoginButton extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String label;
|
||||
final Color? color;
|
||||
final VoidCallback onTap;
|
||||
|
||||
const _SocialLoginButton({
|
||||
required this.icon,
|
||||
required this.label,
|
||||
required this.onTap,
|
||||
this.color,
|
||||
});
|
||||
|
||||
@override
|
||||
|
|
@ -164,11 +180,11 @@ class _SocialLoginButton extends StatelessWidget {
|
|||
width: 52,
|
||||
height: 52,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.gray50,
|
||||
color: color != null ? color!.withValues(alpha: 0.1) : AppColors.gray50,
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: AppColors.border),
|
||||
border: Border.all(color: color?.withValues(alpha: 0.3) ?? AppColors.border),
|
||||
),
|
||||
child: Icon(icon, size: 28, color: AppColors.textPrimary),
|
||||
child: Icon(icon, size: 28, color: color ?? AppColors.textPrimary),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(label, style: AppTypography.caption),
|
||||
|
|
|
|||
Loading…
Reference in New Issue