Skip to content

Commit e800513

Browse files
committed
Merge branch 'develop' into feature/resources-for-navigation
2 parents 454b27d + 87f8a90 commit e800513

File tree

77 files changed

+732
-378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+732
-378
lines changed

assets/css/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ ul.list-primary li::marker {
140140
}
141141

142142
.input-box {
143-
@apply rounded-sm border-gray-300 focus:ring-0 focus:border-secondary;
143+
@apply rounded-sm border border-gray-300 focus:ring-0 focus:border-secondary px-3 py-2;
144144
}
145145

146146
.pre-box {

assets/js/404.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
document.addEventListener('DOMContentLoaded', function () { plausible('404', { props: { path: document.location.pathname } }); });
21
umami.track('404', { path: document.location.pathname });

assets/js/androidkey.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
// requires store.js
43
// requires newsletter.js
54

65
class AndroidLicense {
@@ -22,10 +21,18 @@ class AndroidLicense {
2221
}
2322

2423
loadPrice() {
25-
this._paddle.then(paddle => {
26-
paddle.Product.Prices(PADDLE_ANDROID_PRODUCT_ID, prices => {
27-
this._checkoutData.price = prices.price.gross;
28-
});
24+
$.ajax({
25+
url: PADDLE_PRICES_URL,
26+
dataType: 'jsonp',
27+
data: {
28+
product_ids: PADDLE_ANDROID_PRODUCT_ID
29+
},
30+
}).done(data => {
31+
this._checkoutData.price = {
32+
amount: data.response.products[0].price.gross,
33+
listAmount: data.response.products[0].list_price.gross,
34+
currency: data.response.products[0].currency
35+
};
2936
});
3037
}
3138

assets/js/base.js

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }
2-
31
$('a').each(function() {
42
const $a = $(this);
53
if ($a[0].host !== window.location.host && !$a.attr('data-umami-event')) {
@@ -26,25 +24,39 @@ $('a').each(function() {
2624
}
2725
})();
2826

27+
function determineGlobalData(locale, globalData) {
28+
determineGitHubStargazersCount(locale, globalData);
29+
determineMastodonFollowersCount(locale, globalData);
30+
}
31+
2932
function determineGitHubStargazersCount(locale, globalData) {
3033
$.getJSON('https://api.cryptomator.org/desktop/repo.json', data => {
3134
globalData.githubStargazers = formatNumber(data.stargazers_count, locale);
3235
}).fail(() => {
3336
console.error('Error fetching repository data.');
3437
});
35-
function formatNumber(num, locale) {
36-
let formatted = num;
37-
if (num >= 1000 && num < 1000000) {
38-
formatted = (num / 1000).toFixed(1);
39-
formatted = formatted.endsWith('.0') ? formatted.slice(0, -2) + 'k' : formatted + 'k';
40-
} else if (num >= 1000000) {
41-
formatted = (num / 1000000).toFixed(1);
42-
formatted = formatted.endsWith('.0') ? formatted.slice(0, -2) + 'M' : formatted + 'M';
43-
}
44-
if (locale === 'de') {
45-
return formatted.replace('.', ',');
46-
} else {
47-
return formatted;
48-
}
38+
}
39+
40+
function determineMastodonFollowersCount(locale, globalData) {
41+
$.getJSON('https://api.cryptomator.org/social/mastodon.json', data => {
42+
globalData.mastodonFollowers = formatNumber(data.followers_count, locale);
43+
}).fail(() => {
44+
console.error('Error fetching Mastodon data.');
45+
});
46+
}
47+
48+
function formatNumber(num, locale) {
49+
let formatted = num;
50+
if (num >= 1000 && num < 1000000) {
51+
formatted = (num / 1000).toFixed(1);
52+
formatted = formatted.endsWith('.0') ? formatted.slice(0, -2) + 'k' : formatted + 'k';
53+
} else if (num >= 1000000) {
54+
formatted = (num / 1000000).toFixed(1);
55+
formatted = formatted.endsWith('.0') ? formatted.slice(0, -2) + 'M' : formatted + 'M';
56+
}
57+
if (locale === 'de') {
58+
return formatted.replace('.', ',');
59+
} else {
60+
return formatted;
4961
}
5062
}

assets/js/cardpayments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
// requires store.js
3+
const STRIPE_PHP_URL = BASE_API_URL + '/stripe/prepare_payment.php';
44

55
class OneTimePayment {
66

assets/js/store.dev.js renamed to assets/js/const.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22

3+
const BASE_API_URL = 'http://localhost';
34
const PADDLE_ENABLE_SANDBOX = true;
45
const PADDLE_VENDOR_ID = 1385;
56
const PADDLE_DESKTOP_PRODUCT_IDS = [54582, 54583, 54584];
@@ -10,4 +11,3 @@ const PADDLE_PRICES_URL = 'https://sandbox-checkout.paddle.com/api/2.0/prices';
1011
const STORE_API_URL = 'http://localhost:8787/api';
1112
const STRIPE_PK = 'pk_test_JhF3MoFQGw2Is0DB3BSv345P';
1213
const STRIPE_PLANS = {'EUR': 'plan_GgVY2JfD49bc02', 'USD': 'plan_GgVZwj545E0uH3'};
13-
const STRIPE_PHP_URL = 'http://localhost/stripe/prepare_payment.php';

assets/js/store.prod.js renamed to assets/js/const.prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22

3+
const BASE_API_URL = 'https://api.cryptomator.org';
34
const PADDLE_ENABLE_SANDBOX = false;
45
const PADDLE_VENDOR_ID = 39223;
56
const PADDLE_DESKTOP_PRODUCT_IDS = [840163, 840164, 840165];
@@ -10,4 +11,3 @@ const PADDLE_PRICES_URL = 'https://checkout.paddle.com/api/2.0/prices';
1011
const STORE_API_URL = 'https://store.cryptomator.org/api';
1112
const STRIPE_PK = 'pk_live_eSasX216vGvC26GdbVwA011V';
1213
const STRIPE_PLANS = {'EUR': 'plan_GgW4ovr7c6upzx', 'USD': 'plan_GejOEdJtfL3kdH'};
13-
const STRIPE_PHP_URL = 'https://api.cryptomator.org/stripe/prepare_payment.php';

assets/js/customerportal.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
"use strict";
22

3-
const REQUEST_CUSTOMER_PORTAL_URL = 'https://api.cryptomator.org/stripe/request_customer_portal.php';
4-
5-
// const REQUEST_CUSTOMER_PORTAL_URL = 'http://localhost/stripe/request_customer_portal.php';
3+
const REQUEST_CUSTOMER_PORTAL_URL = BASE_API_URL + '/stripe/request_customer_portal.php';
64

75
class CustomerPortal {
86

assets/js/desktopkey.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
// requires store.js
43
// requires newsletter.js
54

65
class DesktopLicense {
@@ -33,6 +32,7 @@ class DesktopLicense {
3332
return {
3433
productId: product.product_id,
3534
amount: product.price.gross,
35+
listAmount: product.list_price.gross,
3636
currency: product.currency
3737
}
3838
});

assets/js/hubdemo.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
// requires store.js
43
const REQUEST_HUB_DEMO_URL = STORE_API_URL + '/hub/request-demo';
54

65
class HubDemo {

0 commit comments

Comments
 (0)