vless.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. {{define "form/vless"}}
  2. <a-form layout="inline" style="padding: 10px 0px;">
  3. <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.vlesses.slice(0,1)" v-if="!isEdit">
  4. <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
  5. {{template "form/client"}}
  6. </a-collapse-panel>
  7. </a-collapse>
  8. <a-collapse v-else>
  9. <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.vlesses.length">
  10. <table width="100%">
  11. <tr class="client-table-header">
  12. <th>{{ i18n "pages.inbounds.email" }}</th>
  13. <th>Flow</th>
  14. <th>ID</th>
  15. </tr>
  16. <tr v-for="(client, index) in inbound.settings.vlesses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
  17. <td>[[ client.email ]]</td>
  18. <td>[[ client.flow ]]</td>
  19. <td>[[ client.id ]]</td>
  20. </tr>
  21. </table>
  22. </a-collapse-panel>
  23. </a-collapse>
  24. </a-form>
  25. <template v-if="inbound.isTcp">
  26. <a-form layout="inline">
  27. <a-form-item label="Fallbacks">
  28. <a-row>
  29. <a-button type="primary" size="small" @click="inbound.settings.addFallback()">
  30. +
  31. </a-button>
  32. </a-row>
  33. </a-form-item>
  34. </a-form>
  35. <!-- vless fallbacks -->
  36. <a-form v-for="(fallback, index) in inbound.settings.fallbacks" layout="inline">
  37. <a-divider style="margin:0;">
  38. fallback[[ index + 1 ]]
  39. <a-icon type="delete" @click="() => inbound.settings.delFallback(index)"
  40. style="color: rgb(255, 77, 79);cursor: pointer;"/>
  41. </a-divider>
  42. <table width="100%">
  43. <tr>
  44. <td style="width: 20%;">Name</td>
  45. <td>
  46. <a-form-item>
  47. <a-input v-model="fallback.name" style="width: 250px"></a-input>
  48. </a-form-item>
  49. </td>
  50. </tr>
  51. <tr>
  52. <td>Alpn</td>
  53. <td>
  54. <a-form-item>
  55. <a-input v-model="fallback.alpn" style="width: 250px"></a-input>
  56. </a-form-item>
  57. </td>
  58. </tr>
  59. <tr>
  60. <td>Path</td>
  61. <td>
  62. <a-form-item>
  63. <a-input v-model="fallback.path" style="width: 250px"></a-input>
  64. </a-form-item>
  65. </td>
  66. </tr>
  67. <tr>
  68. <td>Dest</td>
  69. <td>
  70. <a-form-item>
  71. <a-input v-model="fallback.dest" style="width: 250px"></a-input>
  72. </a-form-item>
  73. </td>
  74. </tr>
  75. <tr>
  76. <td>xVer</td>
  77. <td>
  78. <a-form-item>
  79. <a-input-number v-model="fallback.xver" :min="0" :max="2"></a-input-number>
  80. </a-form-item>
  81. </td>
  82. </tr>
  83. </table>
  84. </a-form>
  85. <a-divider style="margin:0;"></a-divider>
  86. </template>
  87. {{end}}