feat: 终端同步加固与移动端最小验证 App
- 服务端: RTTY_TOKEN 最小鉴权; Ready.resumed 会话恢复语义; 会话按 ID 原子创建 - 服务端: 桌面端连接/重连时全屏 ANSI 重绘; 惰性语义快照(仅移动端订阅时生成); Ping/Pong 心跳 - 桌面端: 输入改二进制帧无损透传; 指数退避自动重连; token 输入框; resumed 状态展示 - 移动端: 修复 client=mobile 参数(此前永远收不到快照); 新增最小验证 App(连接/快照显示/输入/Keybar); 支持 token; Android 网络权限 - 测试: 修正 e2e onReady 签名; 新增移动端 widget 测试
This commit is contained in:
59
mobile/lib/src/theme.dart
Normal file
59
mobile/lib/src/theme.dart
Normal file
@@ -0,0 +1,59 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Rtty 移动端主题。
|
||||
///
|
||||
/// 设计方向:现代终端卡片美学。深靛蓝底 + 霓虹青绿强调色,
|
||||
/// 用卡片承载命令与输出,强调可读性与触控友好。
|
||||
class RttyMobileTheme {
|
||||
RttyMobileTheme._();
|
||||
|
||||
static const Color background = Color(0xFF0D1117); // 深靛黑
|
||||
static const Color surface = Color(0xFF161C26); // 卡片底
|
||||
static const Color surfaceAlt = Color(0xFF1C2430); // 输入区
|
||||
static const Color border = Color(0xFF2A3442);
|
||||
static const Color primary = Color(0xFF3DDB93); // 霓虹青绿
|
||||
static const Color primaryDim = Color(0xFF176C4B);
|
||||
static const Color accent = Color(0xFFFFB454); // 琥珀
|
||||
static const Color danger = Color(0xFFE5534B);
|
||||
static const Color text = Color(0xFFE2E8F0);
|
||||
static const Color textDim = Color(0xFF93A1B3);
|
||||
static const Color textFaint = Color(0xFF5B6878);
|
||||
static const Color commandTag = Color(0xFF7C5CFF); // 命令标签紫
|
||||
|
||||
static ThemeData app() {
|
||||
final base = ThemeData.dark(useMaterial3: true);
|
||||
return base.copyWith(
|
||||
scaffoldBackgroundColor: background,
|
||||
colorScheme: ColorScheme.dark(
|
||||
primary: primary,
|
||||
secondary: accent,
|
||||
surface: surface,
|
||||
error: danger,
|
||||
onPrimary: const Color(0xFF07130C),
|
||||
onSurface: text,
|
||||
),
|
||||
textTheme: base.textTheme.copyWith(
|
||||
bodyMedium: base.textTheme.bodyMedium?.copyWith(
|
||||
color: text,
|
||||
fontSize: 15,
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: surfaceAlt,
|
||||
hintStyle: const TextStyle(color: textFaint, fontSize: 15),
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
borderSide: const BorderSide(color: primaryDim, width: 1.5),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user