export.blade.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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="{{route('admin.node.edit', $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"
  41. onclick="getInfo('{{$node->id}}','code')"><i class="icon fa-code"></i>
  42. </button>
  43. <button class="btn btn-sm btn-outline-info"
  44. onclick="getInfo('{{$node->id}}','qrcode')"><i class="icon fa-qrcode"></i>
  45. </button>
  46. <button class="btn btn-sm btn-outline-info"
  47. onclick="getInfo('{{$node->id}}','text')"><i class="icon fa-list"></i>
  48. </button>
  49. </div>
  50. </td>
  51. </tr>
  52. @endforeach
  53. </tbody>
  54. </table>
  55. </div>
  56. <div class="panel-footer">
  57. <div class="row">
  58. <div class="col-sm-4">
  59. 共 <code>{{$nodeList->total()}}</code> 个账号
  60. </div>
  61. <nav class="Page navigation float-right">
  62. {{$nodeList->links()}}
  63. </nav>
  64. </div>
  65. </div>
  66. </div>
  67. </div>>
  68. @endsection
  69. @section('script')
  70. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
  71. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" type="text/javascript"></script>
  72. <script src="/assets/custom/Plugin/jquery-qrcode/jquery.qrcode.min.js" type="text/javascript"></script>
  73. <script src="/assets/global/js/Plugin/webui-popover.js" type="text/javascript"></script>
  74. <script type="text/javascript">
  75. function getInfo(id, type) {
  76. $.post("{{route('admin.user.exportProxy', $user->id)}}", {_token: '{{csrf_token()}}', id: id, type: type},
  77. function(ret) {
  78. if (ret.status === 'success') {
  79. switch (type) {
  80. case 'code':
  81. swal.fire({
  82. html: '<textarea class="form-control" rows="8" readonly="readonly">' + ret.data +
  83. '</textarea>' +
  84. '<a href="' + ret.data + '" class="btn btn-danger btn-block mt-10">打开' +
  85. ret.title + '</a>',
  86. showConfirmButton: false,
  87. });
  88. break;
  89. case 'qrcode':
  90. swal.fire({
  91. title: '{{trans('home.scan_qrcode')}}',
  92. html: '<div id="qrcode"></div>',
  93. onBeforeOpen: () => {
  94. $('#qrcode').qrcode({text: ret.data});
  95. },
  96. showConfirmButton: false,
  97. });
  98. break;
  99. case 'text':
  100. swal.fire({
  101. title: '{{trans('home.setting_info')}}',
  102. html: '<textarea class="form-control" rows="12" readonly="readonly">' + ret.data +
  103. '</textarea>',
  104. showConfirmButton: false,
  105. });
  106. break;
  107. default:
  108. swal.fire({title: ret.title, text: ret.data});
  109. }
  110. }
  111. });
  112. }
  113. </script>
  114. @endsection