Skip to content

Commit 4a687ab

Browse files
committed
Make Hub Managed instance domain configurable per environment
1 parent 53391bf commit 4a687ab

6 files changed

Lines changed: 6 additions & 2 deletions

File tree

assets/js/const.template.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ const PADDLE_PRICES_URL = '{{ .Site.Params.paddlePricesUrl }}';
1414
const PADDLE_DISCOUNT_ID = '{{ .Site.Params.paddleDiscountId }}';
1515
const PADDLE_DISCOUNT_CODE = '{{ .Site.Params.paddleDiscountCode }}';
1616
const LEGACY_STORE_URL = '{{ .Site.Params.legacyStoreUrl }}';
17+
const HUB_MANAGED_DOMAIN = '{{ .Site.Params.hubManagedDomain }}';
1718
const STRIPE_PK = '{{ .Site.Params.stripePk }}';

assets/js/hubmanaged.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,5 @@ class HubManaged {
134134
}
135135

136136
function subdomainToURL(subdomain) {
137-
return `https://${subdomain}.cryptomator.cloud`;
137+
return `https://${subdomain}.${HUB_MANAGED_DOMAIN}`;
138138
}

config/development/params.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# API
22
apiBaseUrl: http://localhost:3300
33
legacyStoreUrl: http://localhost:8787/api
4+
hubManagedDomain: staging.cryptomator.cloud
45

56
# UMAMI
67
umamiWebsiteId: 57a36f3a-bd97-4d8a-9563-0e8d39ddb20c

config/production/params.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# API
22
apiBaseUrl: https://api.cryptomator.org
33
legacyStoreUrl: https://store.cryptomator.org/api
4+
hubManagedDomain: cryptomator.cloud
45

56
# UMAMI
67
umamiWebsiteId: 8d451e39-ffb2-4697-82c9-9f69eff497f1

config/staging/params.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# API
22
apiBaseUrl: https://api.staging.cryptomator.org
33
legacyStoreUrl: https://store.staging.cryptomator.org/api
4+
hubManagedDomain: staging.cryptomator.cloud
45

56
# UMAMI
67
umamiWebsiteId: 57a36f3a-bd97-4d8a-9563-0e8d39ddb20c

layouts/hub-managed/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ <h2 class="font-h2 mb-6">
9898
<p class="font-p text-sm mb-2">
9999
{{ i18n "hub_managed_step_2_url_description" }}
100100
</p>
101-
<input type="text" class="block input-box w-full mb-8" :value="submitData.subdomain ? subdomainToURL(submitData.subdomain) : 'https://<{{ i18n "hub_managed_step_2_subdomain_placeholder" }}>.cryptomator.cloud'" readonly>
101+
<input type="text" class="block input-box w-full mb-8" :value="submitData.subdomain ? subdomainToURL(submitData.subdomain) : 'https://<{{ i18n "hub_managed_step_2_subdomain_placeholder" }}>.{{ .Site.Params.hubManagedDomain }}'" readonly>
102102
<div class="mt-auto">
103103
<p :class="{'hidden': !feedbackData.errorMessage}" class="text-sm text-red-600 mb-2" x-text="feedbackData.errorMessage"></p>
104104
<button :disabled="feedbackData.inProgress" @click.prevent="hubManaged.validateSubdomain()" class="btn btn-primary w-full md:w-64" data-umami-event="hub-managed-step-2">

0 commit comments

Comments
 (0)