Skip to content

Commit 6bd60bc

Browse files
committed
Merge branch 'develop'
# Conflicts: # i18n/de.yaml # i18n/en.yaml # layouts/index.html
2 parents 10760eb + 53e099f commit 6bd60bc

26 files changed

Lines changed: 700 additions & 61 deletions

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_DESKTOP_SALE_PRICE_ID = '{{ .Site.Params.paddleDesktopSalePriceId }}';
1515
const PADDLE_ANDROID_SALE_PRICE_ID = '{{ .Site.Params.paddleAndroidSalePriceId }}';
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
}

assets/js/hubsubscription.js

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,21 @@ class HubSubscription {
1212
constructor(form, subscriptionData, searchParams) {
1313
this._form = form;
1414
this._subscriptionData = subscriptionData;
15-
this._subscriptionData.hubId = searchParams.get('hub_id');
16-
let encodedReturnUrl = searchParams.get('return_url');
17-
if (encodedReturnUrl) {
18-
this._subscriptionData.returnUrl = decodeURIComponent(encodedReturnUrl);
15+
let fragmentParams = new URLSearchParams(location.hash.substring(1));
16+
this._subscriptionData.oldLicense = fragmentParams.get('oldLicense');
17+
if (this._subscriptionData.oldLicense) {
18+
try {
19+
let base64 = this._subscriptionData.oldLicense.split('.')[1].replace(/-/g, '+').replace(/_/g, '/');
20+
this._subscriptionData.hubId = JSON.parse(atob(base64)).jti;
21+
} catch (e) {
22+
console.error('Failed to parse hub token:', e);
23+
this._subscriptionData.oldLicense = null;
24+
}
25+
}
26+
this._subscriptionData.hubId = this._subscriptionData.hubId ?? searchParams.get('hub_id');
27+
let returnUrl = fragmentParams.get('returnUrl') ?? searchParams.get('return_url');
28+
if (returnUrl) {
29+
this._subscriptionData.returnUrl = returnUrl;
1930
}
2031
this._subscriptionData.session = searchParams.get('session');
2132
if (this._subscriptionData.hubId && this._subscriptionData.hubId.length > 0 && this._subscriptionData.returnUrl && this._subscriptionData.returnUrl.length > 0) {
@@ -57,7 +68,7 @@ class HubSubscription {
5768
}
5869

5970
onLoadSubscriptionSucceeded(data) {
60-
this._subscriptionData.verificationToken = data.token;
71+
this._subscriptionData.oldLicense = data.token;
6172
this._subscriptionData.details = data.subscription;
6273
if (data.subscription.quantity) {
6374
this._subscriptionData.quantity = data.subscription.quantity;
@@ -313,7 +324,7 @@ class HubSubscription {
313324

314325
onPostSucceeded(data) {
315326
this._subscriptionData.state = 'EXISTING_CUSTOMER';
316-
this._subscriptionData.verificationToken = data.token;
327+
this._subscriptionData.oldLicense = data.token;
317328
this._subscriptionData.details = data.subscription;
318329
this._subscriptionData.session = data.session;
319330
var searchParams = new URLSearchParams(window.location.search)
@@ -480,7 +491,7 @@ class HubSubscription {
480491
}
481492

482493
onPutSucceeded(data, shouldOpenReturnUrl) {
483-
this._subscriptionData.verificationToken = data.token;
494+
this._subscriptionData.oldLicense = data.token;
484495
this._subscriptionData.details = data.subscription;
485496
this._subscriptionData.errorMessage = '';
486497
this._subscriptionData.inProgress = false;
@@ -505,7 +516,7 @@ class HubSubscription {
505516
url: REFRESH_LICENSE_URL,
506517
type: 'POST',
507518
data: {
508-
token: this._subscriptionData.verificationToken,
519+
token: this._subscriptionData.oldLicense,
509520
captcha: this._subscriptionData.captcha
510521
}
511522
}).done(token => {

config/_default/params.yaml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,46 @@ anniversaryBanner:
1010

1111
releases:
1212
exe:
13-
version: 1.18.1
14-
filename: Cryptomator-1.18.1-x64.exe
15-
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.1/Cryptomator-1.18.1-x64.exe
16-
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.1/Cryptomator-1.18.1-x64.exe.asc
17-
checksum: b156a911563e1c9477954efaaaf3b9be0ca5545d5c6ad9f434ceee9fe0da739f
13+
version: 1.19.0
14+
filename: Cryptomator-1.19.0-x64.exe
15+
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/Cryptomator-1.19.0-x64.exe
16+
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/Cryptomator-1.19.0-x64.exe.asc
17+
checksum: 5cd1701a56ee197325a24611908b00064fa4552903ab34756189ddf687007428
1818
requiredOS: Windows 10, Version 1803
1919
msi:
20-
version: 1.18.1
21-
filename: Cryptomator-1.18.1-x64.msi
22-
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.1/Cryptomator-1.18.1-x64.msi
23-
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.1/Cryptomator-1.18.1-x64.msi.asc
24-
checksum: 491fdba6a5e45e47fb7ac6f437b8f749b95ee6f58997b854ac7072a7ff45310e
20+
version: 1.19.0
21+
filename: Cryptomator-1.19.0-x64.msi
22+
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/Cryptomator-1.19.0-x64.msi
23+
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/Cryptomator-1.19.0-x64.msi.asc
24+
checksum: 48f0906ffdcd89c802299a49fdfbe63d367c308dc34879efd3d14c634111cea5
2525
requiredOS: Windows 10, Version 1803
2626
dmg:
27-
version: 1.18.0
28-
filename: Cryptomator-1.18.0.dmg
29-
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.0/Cryptomator-1.18.0-x64.dmg
30-
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.0/Cryptomator-1.18.0-x64.dmg.asc
31-
checksum: b8b28bf17ad03864dd0ce3f5894ae1384f3b10d6423f580fabda4ad11ab1b79a
27+
version: 1.19.0
28+
filename: Cryptomator-1.19.0.dmg
29+
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/Cryptomator-1.19.0-x64.dmg
30+
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/Cryptomator-1.19.0-x64.dmg.asc
31+
checksum: 3ba6011fe50574ee356c0e0f1a869afdd48f3e8059a679175ae8cb87c965475d
3232
requiredOS: macOS 11
3333
dmg-arm64:
34-
version: 1.18.0
35-
filename: Cryptomator-1.18.0-arm64.dmg
36-
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.0/Cryptomator-1.18.0-arm64.dmg
37-
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.0/Cryptomator-1.18.0-arm64.dmg.asc
38-
checksum: 1416c189da2890a234452a23d6d566e7eba4d79babf18423edc656344c676d13
34+
version: 1.19.0
35+
filename: Cryptomator-1.19.0-arm64.dmg
36+
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/Cryptomator-1.19.0-arm64.dmg
37+
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/Cryptomator-1.19.0-arm64.dmg.asc
38+
checksum: f4cc20ba7b8befa8deed0f6fc495e39843228e8dbe48c7314e8fa0b06ad6a162
3939
requiredOS: macOS 11
4040
appimage:
41-
version: 1.18.0
42-
filename: cryptomator-1.18.0-x86_64.AppImage
43-
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.0/cryptomator-1.18.0-x86_64.AppImage
44-
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.0/cryptomator-1.18.0-x86_64.AppImage.asc
45-
checksum: a75365252bf511875a1beccbd684b82d94166841dc6437f05c2ebb261350e780
41+
version: 1.19.0
42+
filename: cryptomator-1.19.0-x86_64.AppImage
43+
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/cryptomator-1.19.0-x86_64.AppImage
44+
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/cryptomator-1.19.0-x86_64.AppImage.asc
45+
checksum: 42bb500d5257f34a2ee220ada58ab49c28861492dd22183fb77c692ba39f11e6
4646
requiredOS: ""
4747
appimage-aarch64:
48-
version: 1.18.0
49-
filename: cryptomator-1.18.0-aarch64.AppImage
50-
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.0/cryptomator-1.18.0-aarch64.AppImage
51-
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.18.0/cryptomator-1.18.0-aarch64.AppImage.asc
52-
checksum: 12e66beaa6cf27a8931e384808cb316859db5322530de6690ea7f6ee6485b482
48+
version: 1.19.0
49+
filename: cryptomator-1.19.0-aarch64.AppImage
50+
downloadUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/cryptomator-1.19.0-aarch64.AppImage
51+
signatureUrl: https://github.com/cryptomator/cryptomator/releases/download/1.19.0/cryptomator-1.19.0-aarch64.AppImage.asc
52+
checksum: 3198965add9b6f01952572a0a5be46602f117ac4a3a7d638b3bb057b50f637e7
5353
requiredOS: ""
5454
android:
5555
version: 1.11.1

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

0 commit comments

Comments
 (0)