http.html 1.2 KB

123456789101112131415161718192021222324252627
  1. {{define "form/http"}}
  2. <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
  3. <table :style="{ width: '100%', textAlign: 'center', margin: '1rem 0' }">
  4. <tr>
  5. <td width="45%">{{ i18n "username" }}</td>
  6. <td width="45%">{{ i18n "password" }}</td>
  7. <td>
  8. <a-button icon="plus" size="small"
  9. @click="inbound.settings.addAccount(new Inbound.HttpSettings.HttpAccount())"></a-button>
  10. </td>
  11. </tr>
  12. </table>
  13. <a-input-group compact v-for="(account, index) in inbound.settings.accounts" :style="{ marginBottom: '10px' }">
  14. <a-input :style="{ width: '50%' }" v-model.trim="account.user" placeholder='{{ i18n "username" }}'>
  15. <template slot="addonBefore" :style="{ margin: '0' }">[[ index+1 ]]</template>
  16. </a-input>
  17. <a-input :style="{ width: '50%' }" v-model.trim="account.pass" placeholder='{{ i18n "password" }}'>
  18. <template slot="addonAfter">
  19. <a-button icon="minus" size="small" @click="inbound.settings.delAccount(index)"></a-button>
  20. </template>
  21. </a-input>
  22. </a-input-group>
  23. <a-form-item label="Allow Transparent">
  24. <a-switch v-model="inbound.settings.allowTransparent" />
  25. </a-form-item>
  26. </a-form>
  27. {{end}}