diff --git a/src/components/misc/api-config.vue b/src/components/misc/api-config.vue index debf99b5e..af91e408f 100644 --- a/src/components/misc/api-config.vue +++ b/src/components/misc/api-config.vue @@ -89,6 +89,7 @@ export default { async setApiUrl() { if (this.apiUrl === '') { // Don't try to check and set an empty url + this.errorMsg = this.$t('apiConfig.urlRequired') return } @@ -97,7 +98,7 @@ export default { if (url === '') { // If the config setter function could not figure out a url - return + throw new Error('URL cannot be empty.') } // Set it + save it to local storage to save us the hoops diff --git a/src/i18n/lang/en.json b/src/i18n/lang/en.json index 3c8bef9a4..d31cb7f46 100644 --- a/src/i18n/lang/en.json +++ b/src/i18n/lang/en.json @@ -787,7 +787,8 @@ "change": "change", "signInOn": "Sign in to your Vikunja account on {0}", "error": "Could not find or use Vikunja installation at \"{domain}\". Please try a different url.", - "success": "Using Vikunja installation at \"{domain}\"." + "success": "Using Vikunja installation at \"{domain}\".", + "urlRequired": "A url is required." }, "loadingError": { "failed": "Loading failed, please {0}. If the error persists, please {1}.",