diff --git a/frontend/src/components/forms/FormDialog.vue b/frontend/src/components/forms/FormDialog.vue index 490aa9e..34c940e 100644 --- a/frontend/src/components/forms/FormDialog.vue +++ b/frontend/src/components/forms/FormDialog.vue @@ -5,6 +5,13 @@ + + {{ errorText }} + + close + + + ({ dialog: false, - valid: true + valid: true, + hasError: false, + errorText: '' }), props: { @@ -48,6 +57,20 @@ export default { if (this.$refs.form.validate()) { this.$emit('confirm') } + }, + + showError(text) { + let actually = () => { + this.hasError = true + this.errorText = text + } + + if (this.hasError) { + this.hasError = false + window.setTimeout(actually, 100) + } else { + actually() + } } }, diff --git a/frontend/src/components/forms/Login.vue b/frontend/src/components/forms/Login.vue index 3ced5fc..c1fd89d 100644 --- a/frontend/src/components/forms/Login.vue +++ b/frontend/src/components/forms/Login.vue @@ -1,5 +1,5 @@