Ver código fonte

1.修正添加节点错误的BUG
2.修正订阅错误的BUG

bingo 7 anos atrás
pai
commit
4ee830f559

+ 1 - 2
app/Http/Controllers/SubscribeController.php

@@ -71,8 +71,7 @@ class SubscribeController extends Controller
             exit($this->noneNode());
         }
 
-        // 打乱
-        shuffle($nodeList);
+        //TODO:打乱数组
 
         // 控制客户端最多获取节点数
         $scheme = self::$config['subscribe_max'] > 0 ? 'MAX=' . self::$config['subscribe_max'] . "\n" : '';

+ 0 - 8
resources/views/admin/addNode.blade.php

@@ -349,14 +349,6 @@
             var sort = $('#sort').val();
             var status = $('#status').val();
 
-            // 判断IPV4合法性
-            var reg = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/;
-            if(reg.test(ip))
-            {
-                if( RegExp.$1<256 && RegExp.$2<256 && RegExp.$3<256 && RegExp.$4<256)
-                    return true;
-            }
-            // 判断IPV6合法性
             $.ajax({
                 type: "POST",
                 url: "{{url('admin/addNode')}}",

+ 8 - 6
resources/views/admin/export.blade.php

@@ -14,17 +14,19 @@
                 <!-- BEGIN PORTLET-->
                 <div class="portlet light bordered">
                     <div class="portlet-body">
-                        <div class="table-scrollable">
-                            <table class="table table-hover table-striped table-bordered">
+                        <div class="table-scrollable table-scrollable-borderless">
+                            <table class="table table-hover table-light">
                                 <thead>
-                                    <tr>
-                                        <th>节点</th>
-                                        <th>配置信息</th>
+                                    <tr class="uppercase">
+                                        <th style="width: 10%;">#</th>
+                                        <th style="width: 30%;">节点</th>
+                                        <th style="width: 60%;">配置信息</th>
                                     </tr>
                                 </thead>
                                 <tbody>
-                                    @foreach($nodeList as $node)
+                                    @foreach($nodeList as $k => $node)
                                         <tr>
+                                            <td>{{$k + 1}}</td>
                                             <td>
                                                 {{$node->name}}
                                                 @if($node->compatible) <span class="label label-info">兼</span> @endif