feat(client): 设备管理屏在线状态徽章 → StatusPill + golden
onlineBadge(在线/离线 圆点文字)→ StatusPill(圆点软底 pill, success/okSoft 与 muted/infoSoft);整屏 golden ×三主题(桌面+移动)入回归闸。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX
This commit is contained in:
@@ -7,6 +7,7 @@ import '../../core/theme/context_tokens.dart';
|
||||
import '../../models/session.dart';
|
||||
import '../../providers/session_provider.dart';
|
||||
import '../../widgets/data_table_card.dart';
|
||||
import '../../widgets/kpi_card.dart';
|
||||
import '../../widgets/mobile_list_card.dart';
|
||||
|
||||
/// 设备 / 状态管理:本店在线设备/会话列表。
|
||||
@@ -81,20 +82,16 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
|
||||
Widget _buildTable(BuildContext context, WidgetRef ref,
|
||||
List<DeviceSession> sessions, bool canKick) {
|
||||
Widget onlineBadge(bool online) => Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.circle,
|
||||
size: 9,
|
||||
color: online ? context.tokens.success : context.tokens.muted),
|
||||
const SizedBox(width: 4),
|
||||
Text(online ? '在线' : '离线',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color:
|
||||
online ? context.tokens.success : context.tokens.muted)),
|
||||
],
|
||||
);
|
||||
// 还原原型 .badge.b-在线/b-离线:圆点软底 pill。
|
||||
Widget onlineBadge(bool online) => online
|
||||
? StatusPill(
|
||||
label: '在线',
|
||||
color: context.tokens.success,
|
||||
background: context.tokens.okSoft)
|
||||
: StatusPill(
|
||||
label: '离线',
|
||||
color: context.tokens.muted,
|
||||
background: context.tokens.infoSoft);
|
||||
|
||||
String fmt(DateTime? t) => t == null ? '-' : _fmt.format(t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user