export.blade.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link href="/assets/global/vendor/bootstrap-table/bootstrap-table.min.css" type="text/css" rel="stylesheet">
  4. <link href="/assets/global/fonts/font-awesome/font-awesome.css" type="text/css" rel="stylesheet">
  5. @endsection
  6. @section('content')
  7. <div class="page-content container-fluid">
  8. <div class="panel">
  9. <div class="panel-heading">
  10. <h2 class="panel-title">【{{$user->email}}】连接配置信息</h2>
  11. </div>
  12. <div class="panel-body">
  13. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  14. <thead class="thead-default">
  15. <tr>
  16. <th>#</th>
  17. <th>节点</th>
  18. <th>扩展</th>
  19. <th>域名</th>
  20. <th>IPv4</th>
  21. <th>配置信息</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. @foreach($nodeList as $node)
  26. <tr>
  27. <td>{{$loop->iteration}}</td>
  28. <td>
  29. <a href="/admin/editNode?id={{$node->id}}" target="_blank"> {{$node->name}} </a>
  30. </td>
  31. <td>
  32. @if($node->compatible) <span class="label label-info">兼</span> @endif
  33. @if($node->single) <span class="label label-danger">单</span> @endif
  34. @if($node->ipv6) <span class="label label-danger">IPv6</span> @endif
  35. </td>
  36. <td>{{$node->server}}</td>
  37. <td>{{$node->ip}}</td>
  38. <td>
  39. <div class="btn-group">
  40. <button class="btn btn-sm btn-outline-info" onclick="getInfo('{{$node->id}}','code')"><i class="icon fa-code"></i></button>
  41. <button class="btn btn-sm btn-outline-info" onclick="getInfo('{{$node->id}}','qrcode')"><i class="icon fa-qrcode"></i></button>
  42. <button class="btn btn-sm btn-outline-info" onclick="getInfo('{{$node->id}}','text')"><i class="icon fa-list"></i></button>
  43. </div>
  44. </td>
  45. </tr>
  46. @endforeach
  47. </tbody>
  48. </table>
  49. </div>
  50. <div class="panel-footer">
  51. <div class="row">
  52. <div class="col-sm-4">
  53. 共 <code>{{$nodeList->total()}}</code> 个账号
  54. </div>
  55. <nav class="Page navigation float-right">
  56. {{$nodeList->links()}}
  57. </nav>
  58. </div>
  59. </div>
  60. </div>
  61. </div>>
  62. @endsection
  63. @section('script')
  64. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
  65. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" type="text/javascript"></script>
  66. <script src="/assets/custom/Plugin/jquery-qrcode/jquery.qrcode.min.js" type="text/javascript"></script>
  67. <script src="/assets/global/js/Plugin/webui-popover.js" type="text/javascript"></script>
  68. <script type="text/javascript">
  69. function getInfo(id, type) {
  70. $.post("/admin/export/{{$user->id}}", {_token: '{{csrf_token()}}', id: id, type: type}, function (ret) {
  71. if (ret.status === 'success') {
  72. switch (type) {
  73. case 'code':
  74. swal.fire({
  75. html: '<textarea class="form-control" rows="8" readonly="readonly">' + ret.data + '</textarea>' +
  76. '<a href="' + ret.data + '" class="btn btn-danger btn-block mt-10">打开' + ret.title + '</a>',
  77. showConfirmButton: false
  78. });
  79. break;
  80. case 'qrcode':
  81. swal.fire({
  82. title: '{{trans('home.scan_qrcode')}}',
  83. html: '<div id="qrcode"></div>',
  84. onBeforeOpen: () => {
  85. $("#qrcode").qrcode({text: ret.data});
  86. },
  87. showConfirmButton: false
  88. });
  89. break;
  90. case 'text':
  91. swal.fire({
  92. title: '{{trans('home.setting_info')}}',
  93. html: '<textarea class="form-control" rows="12" readonly="readonly">' + ret.data + '</textarea>',
  94. showConfirmButton: false
  95. });
  96. break;
  97. default:
  98. swal.fire({title: ret.title, text: ret.data});
  99. }
  100. }
  101. });
  102. }
  103. </script>
  104. @endsection