alroyso 5 months ago
parent
commit
e908bcfa84

+ 1 - 1
lib/app/common/constants.dart

@@ -8,7 +8,7 @@ const KLogout = "/api/client/v2/logout";
 const KAuthUser = "/api/client/v2/authUser";
 const kNode = '';
 
-const kVersion = '2.1.2';
+const kVersion = '2.1.3';
 
 
 const kFakeIpMode = 'fake-ip';

+ 2 - 2
lib/app/component/connection_widget.dart

@@ -58,8 +58,8 @@ class _ConnectionWidgetState extends State<ConnectionWidget> {
         Image.asset(
           currentImage,
           fit: BoxFit.cover,
-          width: 250,
-          height: 250,
+          width: 200,
+          height: 200,
         ),
         ClipOval(
           child: Material(

+ 13 - 6
lib/app/modules/home/controllers/home_controller.dart

@@ -169,15 +169,22 @@ class HomeController extends GetxController {
 
 
      // await Future.delayed(Duration(seconds: 3)); // 等待核心状态更新
-      // 继续后面的逻辑
-      var error = await networkService.fetchAuthUser();
-
-      // 根据 error 的结果继续处理
-      if (error == "") {
+      if(globalController.selectedNode.value != null)
+      {
         await connectionService.startConnection();
       } else {
-        globalController.updateMsg("验证失败,{$error}");
+        // 继续后面的逻辑
+        var error = await networkService.fetchAuthUser();
+
+        // 根据 error 的结果继续处理
+        if (error == "") {
+          await connectionService.startConnection();
+        } else {
+          globalController.updateMsg("验证失败,{$error}");
+        }
       }
+
+
     }
   }
 

+ 1 - 1
lib/app/modules/home/views/home_view.dart

@@ -306,6 +306,6 @@ class UserStatusWidget extends StatelessWidget {
                               }
                               // await controller.connectionService.checkServiceInstallation();
                             },
-                            child: Text(controllers.cc_service.installStatus.value ? '卸载务' : '安装服务'),
+                            child: Text(controllers.cc_service.installStatus.value ? '卸载���务' : '安装服务'),
                           ),
 */

+ 3 - 3
lib/main.dart

@@ -69,9 +69,6 @@ void main() async {
       const MyApp()
   );
 
-  if (isDesktop) {
-    initWindow();
-  }
 
 }
 
@@ -140,6 +137,9 @@ class _MyAppState extends State<MyApp> {
   @override
   Widget build(BuildContext context) {
 
+    if (isDesktop) {
+      initWindow();
+    }
     const Set<PointerDeviceKind> kTouchLikeDeviceTypes = <PointerDeviceKind>{
       PointerDeviceKind.touch,
       PointerDeviceKind.mouse,