Update validation types

This commit is contained in:
Matthias 2024-01-31 17:50:14 +01:00
parent 38d3c3acb6
commit 0dc24b6763

View File

@ -20,7 +20,7 @@
v-model="auth.url" v-model="auth.url"
required required
trim trim
:state="urlState === '' ? null : urlState" :state="urlState"
@keydown.enter="handleOk" @keydown.enter="handleOk"
></b-form-input> ></b-form-input>
<b-alert <b-alert
@ -43,7 +43,7 @@
v-model="auth.username" v-model="auth.username"
required required
placeholder="Freqtrader" placeholder="Freqtrader"
:state="nameState === '' ? null : nameState" :state="nameState"
@keydown.enter="handleOk" @keydown.enter="handleOk"
></b-form-input> ></b-form-input>
</b-form-group> </b-form-group>
@ -58,7 +58,7 @@
v-model="auth.password" v-model="auth.password"
required required
type="password" type="password"
:state="pwdState === '' ? null : pwdState" :state="pwdState"
@keydown.enter="handleOk" @keydown.enter="handleOk"
></b-form-input> ></b-form-input>
</b-form-group> </b-form-group>
@ -102,9 +102,9 @@ const router = useRouter();
const route = useRoute(); const route = useRoute();
const botStore = useBotStore(); const botStore = useBotStore();
const nameState = ref<boolean | ''>(''); const nameState = ref<boolean>();
const pwdState = ref<boolean | ''>(''); const pwdState = ref<boolean>();
const urlState = ref<boolean | ''>(''); const urlState = ref<boolean>();
const errorMessage = ref<string>(''); const errorMessage = ref<string>('');
const errorMessageCORS = ref<boolean>(false); const errorMessageCORS = ref<boolean>(false);
const formRef = ref<HTMLFormElement>(); const formRef = ref<HTMLFormElement>();
@ -138,9 +138,9 @@ const resetLogin = () => {
auth.value.url = defaultURL; auth.value.url = defaultURL;
auth.value.username = ''; auth.value.username = '';
auth.value.password = ''; auth.value.password = '';
nameState.value = ''; nameState.value = undefined;
pwdState.value = ''; pwdState.value = undefined;
urlState.value = ''; urlState.value = undefined;
errorMessage.value = ''; errorMessage.value = '';
botEdit.value = false; botEdit.value = false;
}; };