alroyso 1 year ago
parent
commit
c46fb2c759
2 changed files with 25 additions and 1 deletions
  1. 5 0
      lib/app/data/model/NodeMode.dart
  2. 20 1
      lib/app/modules/node/views/node_view.dart

+ 5 - 0
lib/app/data/model/NodeMode.dart

@@ -34,6 +34,9 @@ class NodeMode {
   @JsonProperty(name: 'v2_sni')
   final String? v2Sni;
   final int? vless;
+  final String? leables;
+  @JsonProperty(name: 'traffic_rate')
+  final int? trafficRate;
   @JsonProperty(name: 'vless_pulkey')
   final String? vlessPulkey;
 
@@ -60,6 +63,8 @@ class NodeMode {
     this.v2Tls,
     this.v2Sni,
     this.vless,
+    this.leables,
+    this.trafficRate,
     this.vlessPulkey,
   });
 }

+ 20 - 1
lib/app/modules/node/views/node_view.dart

@@ -115,6 +115,8 @@ class NodeView extends GetView<NodeController> {
                               if(node.vless == 1){
                                 type = "vless";
                               }
+                              var trafficRate = node.trafficRate;
+                              var leables = node.leables;
                               return Container(
                                 color: controllers.global.selectedNode.value?.id ==
                                     node.id ? Colors.black12 : null,
@@ -123,7 +125,24 @@ class NodeView extends GetView<NodeController> {
                                   title: Text(node.name.toString()),
                                   //tileColor: controller.selectedNode.value?.id == node.id ? Colors.blueAccent : null,
                                   // 如果选中则更改背景颜色
-                                  subtitle: Text(type ?? ""),
+                                  subtitle: Column(
+                                    crossAxisAlignment: CrossAxisAlignment.start,
+                                    children: [
+
+                                      Text("$trafficRate倍速率 $type",
+                                        style: TextStyle(
+                                        fontSize: 10.0, // 设置字体大小为 20.0
+                                      ),
+                                      ),
+                                      SizedBox(height: 4,),
+                                      Text(
+                                        leables ?? "",
+                                        style: TextStyle(
+                                        fontSize: 10.0, // 设置字体大小为 20.0
+                                      ),
+                                      )
+                                    ],
+                                  ),
                                   trailing: Row(
                                     mainAxisSize: MainAxisSize.min,
                                     children: [