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.slogan': 'Make Every Coupon Count',
|
||||||
'welcome.phoneRegister': 'Phone Sign Up',
|
'welcome.phoneRegister': 'Phone Sign Up',
|
||||||
'welcome.emailRegister': 'Email Sign Up',
|
'welcome.emailRegister': 'Email Sign Up',
|
||||||
|
'welcome.wechat': 'WeChat',
|
||||||
'welcome.otherLogin': 'Other Login Methods',
|
'welcome.otherLogin': 'Other Login Methods',
|
||||||
'welcome.hasAccount': 'Already have an account?',
|
'welcome.hasAccount': 'Already have an account?',
|
||||||
'welcome.login': 'Log In',
|
'welcome.login': 'Log In',
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ const Map<String, String> ja = {
|
||||||
'welcome.slogan': 'すべてのクーポンに価値を',
|
'welcome.slogan': 'すべてのクーポンに価値を',
|
||||||
'welcome.phoneRegister': '電話番号で登録',
|
'welcome.phoneRegister': '電話番号で登録',
|
||||||
'welcome.emailRegister': 'メールで登録',
|
'welcome.emailRegister': 'メールで登録',
|
||||||
|
'welcome.wechat': 'WeChat',
|
||||||
'welcome.otherLogin': '他の方法でログイン',
|
'welcome.otherLogin': '他の方法でログイン',
|
||||||
'welcome.hasAccount': 'アカウントをお持ちですか?',
|
'welcome.hasAccount': 'アカウントをお持ちですか?',
|
||||||
'welcome.login': 'ログイン',
|
'welcome.login': 'ログイン',
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ const Map<String, String> zhCN = {
|
||||||
'welcome.slogan': '让每一张券都有价值',
|
'welcome.slogan': '让每一张券都有价值',
|
||||||
'welcome.phoneRegister': '手机号注册',
|
'welcome.phoneRegister': '手机号注册',
|
||||||
'welcome.emailRegister': '邮箱注册',
|
'welcome.emailRegister': '邮箱注册',
|
||||||
|
'welcome.wechat': '微信',
|
||||||
'welcome.otherLogin': '其他方式登录',
|
'welcome.otherLogin': '其他方式登录',
|
||||||
'welcome.hasAccount': '已有账号?',
|
'welcome.hasAccount': '已有账号?',
|
||||||
'welcome.login': '登录',
|
'welcome.login': '登录',
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ const Map<String, String> zhTW = {
|
||||||
'welcome.slogan': '讓每一張券都有價值',
|
'welcome.slogan': '讓每一張券都有價值',
|
||||||
'welcome.phoneRegister': '手機號註冊',
|
'welcome.phoneRegister': '手機號註冊',
|
||||||
'welcome.emailRegister': '信箱註冊',
|
'welcome.emailRegister': '信箱註冊',
|
||||||
|
'welcome.wechat': '微信',
|
||||||
'welcome.otherLogin': '其他方式登入',
|
'welcome.otherLogin': '其他方式登入',
|
||||||
'welcome.hasAccount': '已有帳號?',
|
'welcome.hasAccount': '已有帳號?',
|
||||||
'welcome.login': '登入',
|
'welcome.login': '登入',
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import '../../../../app/i18n/app_localizations.dart';
|
||||||
|
|
||||||
/// A1. 欢迎页 - 品牌展示 + 注册/登录入口
|
/// A1. 欢迎页 - 品牌展示 + 注册/登录入口
|
||||||
///
|
///
|
||||||
/// 品牌Logo、Slogan、手机号注册、邮箱注册、社交登录入口(Google/Apple)
|
/// 品牌Logo、Slogan、手机号注册、邮箱注册、社交登录入口(WeChat/Google/Apple)
|
||||||
class WelcomePage extends StatelessWidget {
|
class WelcomePage extends StatelessWidget {
|
||||||
const WelcomePage({super.key});
|
const WelcomePage({super.key});
|
||||||
|
|
||||||
|
|
@ -30,17 +30,22 @@ class WelcomePage extends StatelessWidget {
|
||||||
height: 80,
|
height: 80,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 12),
|
||||||
|
|
||||||
// Brand Name
|
// Brand Name — 使用 logo 同色系渐变
|
||||||
Text(
|
ShaderMask(
|
||||||
|
shaderCallback: (bounds) => const LinearGradient(
|
||||||
|
colors: [Color(0xFF9B5CF6), Color(0xFFD946EF)],
|
||||||
|
).createShader(bounds),
|
||||||
|
child: Text(
|
||||||
'Genex',
|
'Genex',
|
||||||
style: AppTypography.displayLarge.copyWith(
|
style: AppTypography.displayLarge.copyWith(
|
||||||
color: AppColors.primary,
|
color: Colors.white, // ShaderMask 需要白色底
|
||||||
letterSpacing: 2,
|
letterSpacing: 2,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
),
|
||||||
|
const SizedBox(height: 6),
|
||||||
|
|
||||||
// Slogan
|
// Slogan
|
||||||
Text(
|
Text(
|
||||||
|
|
@ -86,10 +91,19 @@ class WelcomePage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
|
||||||
// Social Login Buttons
|
// Social Login Buttons — WeChat + Google + Apple
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
_SocialLoginButton(
|
||||||
|
icon: Icons.wechat,
|
||||||
|
label: context.t('welcome.wechat'),
|
||||||
|
color: const Color(0xFF07C160),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pushReplacementNamed(context, '/main');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(width: 24),
|
||||||
_SocialLoginButton(
|
_SocialLoginButton(
|
||||||
icon: Icons.g_mobiledata_rounded,
|
icon: Icons.g_mobiledata_rounded,
|
||||||
label: 'Google',
|
label: 'Google',
|
||||||
|
|
@ -146,12 +160,14 @@ class WelcomePage extends StatelessWidget {
|
||||||
class _SocialLoginButton extends StatelessWidget {
|
class _SocialLoginButton extends StatelessWidget {
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
final String label;
|
final String label;
|
||||||
|
final Color? color;
|
||||||
final VoidCallback onTap;
|
final VoidCallback onTap;
|
||||||
|
|
||||||
const _SocialLoginButton({
|
const _SocialLoginButton({
|
||||||
required this.icon,
|
required this.icon,
|
||||||
required this.label,
|
required this.label,
|
||||||
required this.onTap,
|
required this.onTap,
|
||||||
|
this.color,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -164,11 +180,11 @@ class _SocialLoginButton extends StatelessWidget {
|
||||||
width: 52,
|
width: 52,
|
||||||
height: 52,
|
height: 52,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColors.gray50,
|
color: color != null ? color!.withValues(alpha: 0.1) : AppColors.gray50,
|
||||||
shape: BoxShape.circle,
|
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),
|
const SizedBox(height: 6),
|
||||||
Text(label, style: AppTypography.caption),
|
Text(label, style: AppTypography.caption),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue