From 342f2e7ca231db3ec6a535a70b0c637b61be38e4 Mon Sep 17 00:00:00 2001 From: Andrew Kostka Date: Tue, 3 Dec 2024 13:52:07 +0100 Subject: [PATCH] Update copy for wiki creation page (#930) --- .env.development.local | 1 + .env.development.mock | 1 + .env.development.prod | 1 + .env.development.test | 1 + src/components/Cards/CreateWiki.vue | 50 ++++++++++++++++++----------- src/components/Pages/CreateWiki.vue | 2 +- 6 files changed, 36 insertions(+), 20 deletions(-) diff --git a/.env.development.local b/.env.development.local index f193b8c9..08d2bbb8 100644 --- a/.env.development.local +++ b/.env.development.local @@ -4,3 +4,4 @@ VUE_APP_API_MOCK=0 VUE_APP_RECAPTCHA_SITE_KEY="6LeHzbMUAAAAABjNp0vILaWr5ZeYHmteF7rGuZNV" # todo replace with test key VUE_APP_BUILD_FOR_DOCKER_IMAGE=0 VUE_APP_CNAME_RECORD=sites-1.dyna.wbaas.localhost +VUE_APP_SUBDOMAIN_SUFFIX=".wbaas.localhost" diff --git a/.env.development.mock b/.env.development.mock index bf8669dc..a7f2dd73 100644 --- a/.env.development.mock +++ b/.env.development.mock @@ -4,3 +4,4 @@ VUE_APP_API_MOCK=1 VUE_APP_RECAPTCHA_SITE_KEY="6LeHzbMUAAAAABjNp0vILaWr5ZeYHmteF7rGuZNV" VUE_APP_BUILD_FOR_DOCKER_IMAGE=0 VUE_APP_CNAME_RECORD=sites-1.dyna.wbaas.localhost +VUE_APP_SUBDOMAIN_SUFFIX=".wbaas.localhost" diff --git a/.env.development.prod b/.env.development.prod index f51e4aa3..c67741d9 100644 --- a/.env.development.prod +++ b/.env.development.prod @@ -4,3 +4,4 @@ VUE_APP_API_MOCK=0 VUE_APP_RECAPTCHA_SITE_KEY="6LeHzbMUAAAAABjNp0vILaWr5ZeYHmteF7rGuZNV" VUE_APP_BUILD_FOR_DOCKER_IMAGE=0 VUE_APP_CNAME_RECORD=sites-1.dyna.wbstack.com +VUE_APP_SUBDOMAIN_SUFFIX=".wikibase.cloud" diff --git a/.env.development.test b/.env.development.test index d7ab00b5..0b641226 100644 --- a/.env.development.test +++ b/.env.development.test @@ -4,3 +4,4 @@ VUE_APP_API_MOCK=0 VUE_APP_RECAPTCHA_SITE_KEY="6LeHzbMUAAAAABjNp0vILaWr5ZeYHmteF7rGuZNV" # todo replace with test key VUE_APP_BUILD_FOR_DOCKER_IMAGE=0 VUE_APP_CNAME_RECORD=sites-1.dyna.wbaas.localhost +VUE_APP_SUBDOMAIN_SUFFIX=".wbaas.localhost" diff --git a/src/components/Cards/CreateWiki.vue b/src/components/Cards/CreateWiki.vue index f3d347f1..b3516e47 100644 --- a/src/components/Cards/CreateWiki.vue +++ b/src/components/Cards/CreateWiki.vue @@ -6,7 +6,7 @@ -

Site Name +

Site name @@ -156,7 +154,11 @@ export default { error: [], inFlight: false, SUBDOMAIN_SUFFIX: config.SUBDOMAIN_SUFFIX, - CNAME_RECORD: config.CNAME_RECORD + CNAME_RECORD: config.CNAME_RECORD, + errorMessages: { + domainTaken: 'The domain has already been taken.', + domainFormat: 'The subdomain must be at least five characters long and may contain only lowercase Latin letters (a-z), digits (0-9) and hyphens (-).' + } } }, created () { @@ -220,7 +222,11 @@ export default { } if (errors.domain) { this.hasError = true - this.error.siteaddress = errors.domain[0] + if (errors.domain[0] === 'The domain has already been taken.') { + this.error.siteaddress = this.errorMessages.domainTaken + } else { + this.error.siteaddress = this.errorMessages.domainFormat + } } if (errors.username) { this.hasError = true @@ -262,5 +268,11 @@ export default { } - diff --git a/src/components/Pages/CreateWiki.vue b/src/components/Pages/CreateWiki.vue index ce93e04c..fcf585f8 100644 --- a/src/components/Pages/CreateWiki.vue +++ b/src/components/Pages/CreateWiki.vue @@ -3,7 +3,7 @@ - +