Эх сурвалжийг харах

Add 个人中心增加平台信息显示

Yue 1 сар өмнө
parent
commit
875e7b6c6d

+ 13 - 0
UI/CF.APP/chicken_farm/lib/pages/home/profile.dart

@@ -100,6 +100,10 @@ class ProfilePage extends ConsumerWidget {
                     const LogoutButton(),
                     const SizedBox(height: 20),
                   ],
+                  Text(
+                    _buildVersionText(),
+                    style: TextStyle(fontSize: 12, color: Colors.grey),
+                  ),
                 ],
               ],
             ),
@@ -108,4 +112,13 @@ class ProfilePage extends ConsumerWidget {
       ),
     );
   }
+
+  String _buildVersionText() {
+    final deviceType = AppConfig.isPda ? "PDA" : "APP";
+    final mode = AppConfig.isOffline ? "_OFFLINE" : "";
+
+    final deviceInfo = Platform.isAndroid ? "$deviceType$mode" : "WIN$mode";
+
+    return 'ChickenFarm $deviceInfo Powered by IWB ©2025';
+  }
 }