Force user to not have both --auth and --tag-auth at the same time in the UI #453

This commit is contained in:
simon987 2024-01-30 10:49:44 -05:00
parent 08b6323176
commit aff69fb3eb

View File

@ -16,7 +16,7 @@
<b-form-input v-model="options.auth" @change="update()"></b-form-input> <b-form-input v-model="options.auth" @change="update()"></b-form-input>
<label>{{ $t("webOptions.tagAuth") }}</label> <label>{{ $t("webOptions.tagAuth") }}</label>
<b-form-input v-model="options.tag_auth" @change="update()"></b-form-input> <b-form-input v-model="options.tag_auth" @change="update()" :disabled="Boolean(options.auth)"></b-form-input>
</b-card> </b-card>
<br> <br>
@ -46,11 +46,18 @@ export default {
return { return {
showEsTestAlert: false, showEsTestAlert: false,
esTestOk: false, esTestOk: false,
esTestMessage: "", esTestMessage: ""
} }
}, },
methods: { methods: {
update() { update() {
console.log(this.options)
if (this.options.auth && this.options.tag_auth) {
// If both are set, remove tagAuth
this.options.tag_auth = "";
}
this.$emit("change", this.options); this.$emit("change", this.options);
}, },
} }