vmess.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {{define "form/vmess"}}
  2. <a-form layout="inline">
  3. <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.vmesses.slice(0,1)" v-if="!isEdit">
  4. <a-collapse-panel header="{{ i18n "pages.inbounds.client" }}">
  5. <a-form layout="inline">
  6. <a-form-item>
  7. <span slot="label">
  8. Email
  9. <a-tooltip>
  10. <template slot="title">
  11. The Email Must Be Completely Unique
  12. </template>
  13. <a-icon type="sync" @click="getNewEmail(client)"></a-icon>
  14. </a-tooltip>
  15. </span>
  16. <a-input v-model.trim="client.email" style="width: 150px;"></a-input>
  17. </a-form-item>
  18. </a-form>
  19. <a-form-item label="ID">
  20. <a-input v-model.trim="client.id" style="width: 300px;"></a-input>
  21. </a-form-item>
  22. <a-form-item label='{{ i18n "additional" }} ID'>
  23. <a-input type="number" v-model.number="client.alterId" style="width: 70px;"></a-input>
  24. </a-form-item>
  25. <a-form-item>
  26. <span slot="label">
  27. IP Count Limit
  28. <a-tooltip>
  29. <template slot="title">
  30. Disable inbound if more than entered count (0 for disable limit ip)
  31. </template>
  32. <a-icon type="question-circle" theme="filled"></a-icon>
  33. </a-tooltip>
  34. </span>
  35. <a-input type="number" v-model.number="client.limitIp" min="0" style="width: 70px;"></a-input>
  36. </a-form-item>
  37. <a-form-item v-if="client.email && client.limitIp > 0 && isEdit">
  38. <span slot="label">
  39. IP Log
  40. <a-tooltip>
  41. <template slot="title">
  42. IPs history Log (before enabling inbound after it has been disabled by IP limit, you should clear the log)
  43. </template>
  44. <a-icon type="question-circle" theme="filled"></a-icon>
  45. </a-tooltip>
  46. <a-tooltip>
  47. <template slot="title">
  48. Clear The Log
  49. </template>
  50. <span style="color: #FF4D4F">
  51. <a-icon type="delete" @click="clearDBClientIps(client.email,$event)"></a-icon>
  52. </span>
  53. </a-tooltip>
  54. </span>
  55. <a-form layout="block">
  56. <a-textarea readonly @click="getDBClientIps(client.email,$event)" placeholder="Click To Get IPs" :auto-size="{ minRows: 2, maxRows: 10 }">
  57. </a-textarea>
  58. </a-form>
  59. </a-form-item>
  60. <a-form-item>
  61. <span slot="label">
  62. <span >{{ i18n "pages.inbounds.totalFlow" }}</span>(GB)
  63. <a-tooltip>
  64. <template slot="title">
  65. 0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
  66. </template>
  67. <a-icon type="question-circle" theme="filled"></a-icon>
  68. </a-tooltip>
  69. </span>
  70. <a-input-number v-model="client._totalGB" :min="0"></a-input-number>
  71. </a-form-item>
  72. <a-form-item>
  73. <span slot="label">
  74. <span >{{ i18n "pages.inbounds.expireDate" }}</span>
  75. <a-tooltip>
  76. <template slot="title">
  77. <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
  78. </template>
  79. <a-icon type="question-circle" theme="filled"></a-icon>
  80. </a-tooltip>
  81. </span>
  82. <a-date-picker :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm"
  83. v-model="client._expiryTime" style="width: 170px;"></a-date-picker>
  84. </a-form-item>
  85. </a-collapse-panel>
  86. </a-collapse>
  87. <a-collapse v-else>
  88. <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.vmesses.length">
  89. <table width="100%">
  90. <tr class="client-table-header">
  91. <th v-for="col in Object.keys(inbound.settings.vmesses[0]).slice(0, 3)">[[ col ]]</th>
  92. </tr>
  93. <tr v-for="(client, index) in inbound.settings.vmesses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
  94. <td v-for="col in Object.values(client).slice(0, 3)">[[ col ]]</td>
  95. </tr>
  96. </table>
  97. </a-collapse-panel>
  98. </a-collapse>
  99. <a-form layout="inline">
  100. <a-form-item label='{{ i18n "pages.inbounds.disableInsecureEncryption" }}'>
  101. <a-switch v-model.number="inbound.settings.disableInsecure"></a-switch>
  102. </a-form-item>
  103. </a-form>
  104. {{end}}