vmess.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. {{define "form/vmess"}}
  2. <a-form layout="inline">
  3. <a-collapse activeKey="0" v-for="(vmess, index) in inbound.settings.vmesses"
  4. :key="`vmess-${index}`">
  5. <a-collapse-panel :class="getHeaderStyle(vmess.email)" :header="getHeaderText(vmess.email)">
  6. <a-tag v-if="isExpiry(index) || ((getUpStats(vmess.email) + getDownStats(vmess.email)) > vmess.totalGB && vmess.totalGB != 0)" color="red" style="margin-bottom: 10px;display: block;text-align: center;">Account is (Expired|Traffic Ended) And Disabled</a-tag>
  7. <a-form layout="inline">
  8. <a-form-item>
  9. <span slot="label">
  10. Email
  11. <a-tooltip>
  12. <template slot="title">
  13. The email must be completely unique
  14. </template>
  15. <!--Renew Svg Icon-->
  16. <svg
  17. @click="getNewEmail(vmess)"
  18. xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="anticon anticon-question-circle" viewBox="0 0 16 16"> <path d="M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z"/> <path fill-rule="evenodd" d="M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"/> </svg>
  19. </a-tooltip>
  20. </span>
  21. <a-input v-model.trim="vmess.email"></a-input>
  22. </a-form-item>
  23. </a-form>
  24. <a-form-item label="id">
  25. <a-input v-model.trim="vmess.id"></a-input>
  26. </a-form-item>
  27. <a-form-item label='{{ i18n "additional" }} ID'>
  28. <a-input type="number" v-model.number="vmess.alterId"></a-input>
  29. </a-form-item>
  30. <a-form-item>
  31. <span slot="label">
  32. <span >{{ i18n "pages.inbounds.totalFlow" }}</span>(GB)
  33. <a-tooltip>
  34. <template slot="title">
  35. 0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
  36. </template>
  37. <a-icon type="question-circle" theme="filled"></a-icon>
  38. </a-tooltip>
  39. </span>
  40. <a-input-number v-model="vmess._totalGB" :min="0"></a-input-number>
  41. </a-form-item>
  42. <a-form-item>
  43. <span slot="label">
  44. <span >{{ i18n "pages.inbounds.expireDate" }}</span>
  45. <a-tooltip>
  46. <template slot="title">
  47. <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
  48. </template>
  49. <a-icon type="question-circle" theme="filled"></a-icon>
  50. </a-tooltip>
  51. </span>
  52. <a-date-picker :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm"
  53. v-model="vmess._expiryTime" style="width: 300px;"></a-date-picker>
  54. </a-form-item>
  55. <a-form layout="inline">
  56. <a-tooltip v-if="vmess._totalGB > 0">
  57. <template slot="title">
  58. reset traffic
  59. </template>
  60. <span style="color: #FF4D4F">
  61. <a-icon type="delete" @click="resetClientTraffic(vmess,$event)"></a-icon>
  62. </span>
  63. </a-tooltip>
  64. <a-tag color="blue">[[ sizeFormat(getUpStats(vmess.email)) ]] / [[ sizeFormat(getDownStats(vmess.email)) ]]</a-tag>
  65. <a-tag v-if="vmess._totalGB > 0" color="red">used : [[ sizeFormat(getUpStats(vmess.email) + getDownStats(vmess.email)) ]]</a-tag>
  66. <a-tag>
  67. <!--Add Svg Icon-->
  68. <svg
  69. @click="addClient(inbound.protocol,vmess, inbound.settings.vmesses)"
  70. xmlns="http://www.w3.org/2000/svg"
  71. viewBox="0 0 22 22"
  72. width="22"
  73. height="22"
  74. class="mt-2 cursor-pointer"
  75. >
  76. <path fill="none" d="M0 0h24v24H0z" />
  77. <path
  78. fill="green"
  79. d="M11 11V7h2v4h4v2h-4v4h-2v-4H7v-2h4zm1 11C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16z"
  80. />
  81. </svg>
  82. </a-tag>
  83. <a-tag v-show="inbound.settings.vmesses.length > 1">
  84. <!--Remove Svg Icon-->
  85. <svg
  86. @click="removeClient(index, inbound.settings.vmesses)"
  87. xmlns="http://www.w3.org/2000/svg"
  88. viewBox="0 0 22 22"
  89. width="22"
  90. height="22"
  91. class="mt-2 cursor-pointer"
  92. >
  93. <path fill="none" d="M0 0h24v24H0z" />
  94. <path
  95. fill="#EC4899"
  96. d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm0-9.414l2.828-2.829 1.415 1.415L13.414 12l2.829 2.828-1.415 1.415L12 13.414l-2.828 2.829-1.415-1.415L10.586 12 7.757 9.172l1.415-1.415L12 10.586z"
  97. />
  98. </svg>
  99. </a-tag>
  100. </a-form>
  101. </a-collapse-panel>
  102. </a-collapse>
  103. </a-form>
  104. </a-form>
  105. <a-form layout="inline">
  106. <a-form-item label='{{ i18n "pages.inbounds.disableInsecureEncryption" }}'>
  107. <a-switch v-model.number="inbound.settings.disableInsecure"></a-switch>
  108. </a-form-item>
  109. </a-form>
  110. {{end}}