vmess.html 5.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. {{define "form/vmess"}}
  2. <a-form layout="inline">
  3. <label>{{ i18n "clients"}}</label>
  4. <a-collapse activeKey="0" v-for="(vmess, index) in inbound.settings.vmesses"
  5. :key="`vmess-${index}`">
  6. <a-collapse-panel :class="getHeaderStyle(vmess.email)" :header="getHeaderText(vmess.email)">
  7. <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>
  8. <a-form layout="inline">
  9. <a-form-item>
  10. <span slot="label">
  11. Email
  12. <a-tooltip>
  13. <template slot="title">
  14. The Email Must Be Completely Unique
  15. </template>
  16. <!--Renew Svg Icon-->
  17. <svg
  18. @click="getNewEmail(vmess)"
  19. 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>
  20. </a-tooltip>
  21. </span>
  22. <a-input v-model.trim="vmess.email"></a-input>
  23. </a-form-item>
  24. </a-form>
  25. <a-form-item label="ID">
  26. <a-input v-model.trim="vmess.id"></a-input>
  27. </a-form-item>
  28. <a-form-item label='{{ i18n "additional" }} ID'>
  29. <a-input type="number" v-model.number="vmess.alterId"></a-input>
  30. </a-form-item>
  31. <a-form-item>
  32. <span slot="label">
  33. <span >{{ i18n "pages.inbounds.totalFlow" }}</span>(GB)
  34. <a-tooltip>
  35. <template slot="title">
  36. 0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
  37. </template>
  38. <a-icon type="question-circle" theme="filled"></a-icon>
  39. </a-tooltip>
  40. </span>
  41. <a-input-number v-model="vmess._totalGB" :min="0"></a-input-number>
  42. </a-form-item>
  43. <a-form-item>
  44. <span slot="label">
  45. <span >{{ i18n "pages.inbounds.expireDate" }}</span>
  46. <a-tooltip>
  47. <template slot="title">
  48. <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
  49. </template>
  50. <a-icon type="question-circle" theme="filled"></a-icon>
  51. </a-tooltip>
  52. </span>
  53. <a-date-picker :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm"
  54. v-model="vmess._expiryTime" style="width: 300px;"></a-date-picker>
  55. </a-form-item>
  56. <a-form layout="inline">
  57. <a-tooltip v-if="vmess._totalGB > 0">
  58. <template slot="title">
  59. {{ i18n "pages.inbounds.resetTraffic" }}
  60. </template>
  61. <span style="color: #FF4D4F">
  62. <a-icon type="delete" @click="resetClientTraffic(vmess,$event)"></a-icon>
  63. </span>
  64. </a-tooltip>
  65. <a-tag color="blue">[[ sizeFormat(getUpStats(vmess.email)) ]] / [[ sizeFormat(getDownStats(vmess.email)) ]]</a-tag>
  66. <a-tag v-if="vmess._totalGB > 0" color="red">used : [[ sizeFormat(getUpStats(vmess.email) + getDownStats(vmess.email)) ]]</a-tag>
  67. <a-tag v-show="inbound.settings.vmesses.length > 1" @click="removeClient(index, inbound.settings.vmesses)">
  68. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" width="22" height="22" class="mt-2 cursor-pointer">
  69. <path fill="none" d="M0 0h24v24H0z" />
  70. <path fill="#EC4899"
  71. 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"
  72. />
  73. </svg>
  74. </a-tag>
  75. </a-form>
  76. </a-collapse-panel>
  77. </a-collapse>
  78. <a-tag @click="addClient(inbound.protocol, inbound.settings.vmesses)">
  79. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" class="ml-2 cursor-pointer">
  80. <path fill="none" d="M0 0h24v24H0z" />
  81. <path fill="green"
  82. 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"
  83. />
  84. </svg>
  85. </a-tag>
  86. <a-form layout="inline">
  87. <a-form-item label='{{ i18n "pages.inbounds.disableInsecureEncryption" }}'>
  88. <a-switch v-model.number="inbound.settings.disableInsecure"></a-switch>
  89. </a-form-item>
  90. </a-form>
  91. {{end}}