aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-09-02 11:47:32 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-09-02 11:47:32 +0200
commita7e2742d9269c098c37cc84b81ca9ef4863ec93a (patch)
tree6c48c5a157c28e303fd091e008857b3cd109ac8e /src
parentAdd "see all options" (diff)
downloadferdium-app-a7e2742d9269c098c37cc84b81ca9ef4863ec93a.tar.gz
ferdium-app-a7e2742d9269c098c37cc84b81ca9ef4863ec93a.tar.zst
ferdium-app-a7e2742d9269c098c37cc84b81ca9ef4863ec93a.zip
Add CTA for pro upgrade
Diffstat (limited to 'src')
-rw-r--r--src/components/settings/account/AccountDashboard.js11
-rw-r--r--src/containers/settings/AccountScreen.js3
-rw-r--r--src/containers/subscription/SubscriptionFormScreen.js7
-rw-r--r--src/i18n/locales/defaultMessages.json69
-rw-r--r--src/i18n/locales/en-US.json1
-rw-r--r--src/i18n/messages/src/components/settings/account/AccountDashboard.json69
-rw-r--r--src/stores/UserStore.js11
7 files changed, 107 insertions, 64 deletions
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js
index c9eb8aeda..900a83a78 100644
--- a/src/components/settings/account/AccountDashboard.js
+++ b/src/components/settings/account/AccountDashboard.js
@@ -31,6 +31,10 @@ const messages = defineMessages({
31 id: 'settings.account.manageSubscription.label', 31 id: 'settings.account.manageSubscription.label',
32 defaultMessage: '!!!Manage your subscription', 32 defaultMessage: '!!!Manage your subscription',
33 }, 33 },
34 upgradeAccountToPro: {
35 id: 'settings.account.upgradeToPro.label',
36 defaultMessage: '!!!Upgrade to Franz Professional',
37 },
34 accountTypeBasic: { 38 accountTypeBasic: {
35 id: 'settings.account.accountType.basic', 39 id: 'settings.account.accountType.basic',
36 defaultMessage: '!!!Basic Account', 40 defaultMessage: '!!!Basic Account',
@@ -100,6 +104,7 @@ export default @observer class AccountDashboard extends Component {
100 isDeleteAccountSuccessful: PropTypes.bool.isRequired, 104 isDeleteAccountSuccessful: PropTypes.bool.isRequired,
101 openEditAccount: PropTypes.func.isRequired, 105 openEditAccount: PropTypes.func.isRequired,
102 openBilling: PropTypes.func.isRequired, 106 openBilling: PropTypes.func.isRequired,
107 upgradeToPro: PropTypes.func.isRequired,
103 openInvoices: PropTypes.func.isRequired, 108 openInvoices: PropTypes.func.isRequired,
104 }; 109 };
105 110
@@ -118,6 +123,7 @@ export default @observer class AccountDashboard extends Component {
118 isDeleteAccountSuccessful, 123 isDeleteAccountSuccessful,
119 openEditAccount, 124 openEditAccount,
120 openBilling, 125 openBilling,
126 upgradeToPro,
121 openInvoices, 127 openInvoices,
122 } = this.props; 128 } = this.props;
123 const { intl } = this.context; 129 const { intl } = this.context;
@@ -229,6 +235,11 @@ export default @observer class AccountDashboard extends Component {
229 )} 235 )}
230 <div className="manage-user-links"> 236 <div className="manage-user-links">
231 <Button 237 <Button
238 label={intl.formatMessage(messages.upgradeAccountToPro)}
239 className="franz-form__button--primary"
240 onClick={upgradeToPro}
241 />
242 <Button
232 label={intl.formatMessage(messages.manageSubscriptionButtonLabel)} 243 label={intl.formatMessage(messages.manageSubscriptionButtonLabel)}
233 className="franz-form__button--inverted" 244 className="franz-form__button--inverted"
234 onClick={openBilling} 245 onClick={openBilling}
diff --git a/src/containers/settings/AccountScreen.js b/src/containers/settings/AccountScreen.js
index 66076504f..f9eae4957 100644
--- a/src/containers/settings/AccountScreen.js
+++ b/src/containers/settings/AccountScreen.js
@@ -26,7 +26,7 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend
26 handleWebsiteLink(route) { 26 handleWebsiteLink(route) {
27 const { actions, stores } = this.props; 27 const { actions, stores } = this.props;
28 28
29 const url = `${WEBSITE}${route}?authToken=${stores.user.authToken}&utm_source=app&utm_medium=account_dashboard`; 29 const url = stores.user.getAuthURL(`${WEBSITE}${route}?utm_source=app&utm_medium=account_dashboard`);
30 30
31 actions.app.openExternalUrl({ url }); 31 actions.app.openExternalUrl({ url });
32 } 32 }
@@ -51,6 +51,7 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend
51 isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting} 51 isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting}
52 isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError} 52 isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError}
53 openEditAccount={() => this.handleWebsiteLink('/user/profile')} 53 openEditAccount={() => this.handleWebsiteLink('/user/profile')}
54 upgradeToPro={() => this.handleWebsiteLink('/inapp/user/licenses')}
54 openBilling={() => this.handleWebsiteLink('/user/billing')} 55 openBilling={() => this.handleWebsiteLink('/user/billing')}
55 openInvoices={() => this.handleWebsiteLink('/user/invoices')} 56 openInvoices={() => this.handleWebsiteLink('/user/invoices')}
56 /> 57 />
diff --git a/src/containers/subscription/SubscriptionFormScreen.js b/src/containers/subscription/SubscriptionFormScreen.js
index 5508c120c..e9e457084 100644
--- a/src/containers/subscription/SubscriptionFormScreen.js
+++ b/src/containers/subscription/SubscriptionFormScreen.js
@@ -20,12 +20,7 @@ export default @inject('stores', 'actions') @observer class SubscriptionFormScre
20 } = stores; 20 } = stores;
21 21
22 let hostedPageURL = !user.data.hadSubscription ? features.features.planSelectionURL : features.features.subscribeURL; 22 let hostedPageURL = !user.data.hadSubscription ? features.features.planSelectionURL : features.features.subscribeURL;
23 const url = new URL(hostedPageURL); 23 hostedPageURL = user.getAuthURL(hostedPageURL);
24 const params = new URLSearchParams(url.search.slice(1));
25
26 params.append('authToken', user.authToken);
27
28 hostedPageURL = `${url.origin}${url.pathname}?${params.toString()}`;
29 24
30 actions.app.openExternalUrl({ url: hostedPageURL }); 25 actions.app.openExternalUrl({ url: hostedPageURL });
31 } 26 }
diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json
index 7691aba84..1a571c904 100644
--- a/src/i18n/locales/defaultMessages.json
+++ b/src/i18n/locales/defaultMessages.json
@@ -1278,185 +1278,198 @@
1278 } 1278 }
1279 }, 1279 },
1280 { 1280 {
1281 "defaultMessage": "!!!Basic Account", 1281 "defaultMessage": "!!!Upgrade to Franz Professional",
1282 "end": { 1282 "end": {
1283 "column": 3, 1283 "column": 3,
1284 "line": 37 1284 "line": 37
1285 }, 1285 },
1286 "file": "src/components/settings/account/AccountDashboard.js", 1286 "file": "src/components/settings/account/AccountDashboard.js",
1287 "id": "settings.account.upgradeToPro.label",
1288 "start": {
1289 "column": 23,
1290 "line": 34
1291 }
1292 },
1293 {
1294 "defaultMessage": "!!!Basic Account",
1295 "end": {
1296 "column": 3,
1297 "line": 41
1298 },
1299 "file": "src/components/settings/account/AccountDashboard.js",
1287 "id": "settings.account.accountType.basic", 1300 "id": "settings.account.accountType.basic",
1288 "start": { 1301 "start": {
1289 "column": 20, 1302 "column": 20,
1290 "line": 34 1303 "line": 38
1291 } 1304 }
1292 }, 1305 },
1293 { 1306 {
1294 "defaultMessage": "!!!Premium Supporter Account", 1307 "defaultMessage": "!!!Premium Supporter Account",
1295 "end": { 1308 "end": {
1296 "column": 3, 1309 "column": 3,
1297 "line": 41 1310 "line": 45
1298 }, 1311 },
1299 "file": "src/components/settings/account/AccountDashboard.js", 1312 "file": "src/components/settings/account/AccountDashboard.js",
1300 "id": "settings.account.accountType.premium", 1313 "id": "settings.account.accountType.premium",
1301 "start": { 1314 "start": {
1302 "column": 22, 1315 "column": 22,
1303 "line": 38 1316 "line": 42
1304 } 1317 }
1305 }, 1318 },
1306 { 1319 {
1307 "defaultMessage": "!!!Edit Account", 1320 "defaultMessage": "!!!Edit Account",
1308 "end": { 1321 "end": {
1309 "column": 3, 1322 "column": 3,
1310 "line": 45 1323 "line": 49
1311 }, 1324 },
1312 "file": "src/components/settings/account/AccountDashboard.js", 1325 "file": "src/components/settings/account/AccountDashboard.js",
1313 "id": "settings.account.account.editButton", 1326 "id": "settings.account.account.editButton",
1314 "start": { 1327 "start": {
1315 "column": 21, 1328 "column": 21,
1316 "line": 42 1329 "line": 46
1317 } 1330 }
1318 }, 1331 },
1319 { 1332 {
1320 "defaultMessage": "!!Invoices", 1333 "defaultMessage": "!!Invoices",
1321 "end": { 1334 "end": {
1322 "column": 3, 1335 "column": 3,
1323 "line": 49 1336 "line": 53
1324 }, 1337 },
1325 "file": "src/components/settings/account/AccountDashboard.js", 1338 "file": "src/components/settings/account/AccountDashboard.js",
1326 "id": "settings.account.headlineInvoices", 1339 "id": "settings.account.headlineInvoices",
1327 "start": { 1340 "start": {
1328 "column": 18, 1341 "column": 18,
1329 "line": 46 1342 "line": 50
1330 } 1343 }
1331 }, 1344 },
1332 { 1345 {
1333 "defaultMessage": "!!!Download", 1346 "defaultMessage": "!!!Download",
1334 "end": { 1347 "end": {
1335 "column": 3, 1348 "column": 3,
1336 "line": 53 1349 "line": 57
1337 }, 1350 },
1338 "file": "src/components/settings/account/AccountDashboard.js", 1351 "file": "src/components/settings/account/AccountDashboard.js",
1339 "id": "settings.account.invoiceDownload", 1352 "id": "settings.account.invoiceDownload",
1340 "start": { 1353 "start": {
1341 "column": 19, 1354 "column": 19,
1342 "line": 50 1355 "line": 54
1343 } 1356 }
1344 }, 1357 },
1345 { 1358 {
1346 "defaultMessage": "!!!Could not load user information", 1359 "defaultMessage": "!!!Could not load user information",
1347 "end": { 1360 "end": {
1348 "column": 3, 1361 "column": 3,
1349 "line": 57 1362 "line": 61
1350 }, 1363 },
1351 "file": "src/components/settings/account/AccountDashboard.js", 1364 "file": "src/components/settings/account/AccountDashboard.js",
1352 "id": "settings.account.userInfoRequestFailed", 1365 "id": "settings.account.userInfoRequestFailed",
1353 "start": { 1366 "start": {
1354 "column": 25, 1367 "column": 25,
1355 "line": 54 1368 "line": 58
1356 } 1369 }
1357 }, 1370 },
1358 { 1371 {
1359 "defaultMessage": "!!!Try again", 1372 "defaultMessage": "!!!Try again",
1360 "end": { 1373 "end": {
1361 "column": 3, 1374 "column": 3,
1362 "line": 61 1375 "line": 65
1363 }, 1376 },
1364 "file": "src/components/settings/account/AccountDashboard.js", 1377 "file": "src/components/settings/account/AccountDashboard.js",
1365 "id": "settings.account.tryReloadUserInfoRequest", 1378 "id": "settings.account.tryReloadUserInfoRequest",
1366 "start": { 1379 "start": {
1367 "column": 28, 1380 "column": 28,
1368 "line": 58 1381 "line": 62
1369 } 1382 }
1370 }, 1383 },
1371 { 1384 {
1372 "defaultMessage": "!!!Delete account", 1385 "defaultMessage": "!!!Delete account",
1373 "end": { 1386 "end": {
1374 "column": 3, 1387 "column": 3,
1375 "line": 65 1388 "line": 69
1376 }, 1389 },
1377 "file": "src/components/settings/account/AccountDashboard.js", 1390 "file": "src/components/settings/account/AccountDashboard.js",
1378 "id": "settings.account.deleteAccount", 1391 "id": "settings.account.deleteAccount",
1379 "start": { 1392 "start": {
1380 "column": 17, 1393 "column": 17,
1381 "line": 62 1394 "line": 66
1382 } 1395 }
1383 }, 1396 },
1384 { 1397 {
1385 "defaultMessage": "!!!If you don't need your Franz account any longer, you can delete your account and all related data here.", 1398 "defaultMessage": "!!!If you don't need your Franz account any longer, you can delete your account and all related data here.",
1386 "end": { 1399 "end": {
1387 "column": 3, 1400 "column": 3,
1388 "line": 69 1401 "line": 73
1389 }, 1402 },
1390 "file": "src/components/settings/account/AccountDashboard.js", 1403 "file": "src/components/settings/account/AccountDashboard.js",
1391 "id": "settings.account.deleteInfo", 1404 "id": "settings.account.deleteInfo",
1392 "start": { 1405 "start": {
1393 "column": 14, 1406 "column": 14,
1394 "line": 66 1407 "line": 70
1395 } 1408 }
1396 }, 1409 },
1397 { 1410 {
1398 "defaultMessage": "!!!You have received an email with a link to confirm your account deletion. Your account and data cannot be restored!", 1411 "defaultMessage": "!!!You have received an email with a link to confirm your account deletion. Your account and data cannot be restored!",
1399 "end": { 1412 "end": {
1400 "column": 3, 1413 "column": 3,
1401 "line": 73 1414 "line": 77
1402 }, 1415 },
1403 "file": "src/components/settings/account/AccountDashboard.js", 1416 "file": "src/components/settings/account/AccountDashboard.js",
1404 "id": "settings.account.deleteEmailSent", 1417 "id": "settings.account.deleteEmailSent",
1405 "start": { 1418 "start": {
1406 "column": 19, 1419 "column": 19,
1407 "line": 70 1420 "line": 74
1408 } 1421 }
1409 }, 1422 },
1410 { 1423 {
1411 "defaultMessage": "!!!Free Trial", 1424 "defaultMessage": "!!!Free Trial",
1412 "end": { 1425 "end": {
1413 "column": 3, 1426 "column": 3,
1414 "line": 77 1427 "line": 81
1415 }, 1428 },
1416 "file": "src/components/settings/account/AccountDashboard.js", 1429 "file": "src/components/settings/account/AccountDashboard.js",
1417 "id": "settings.account.trial", 1430 "id": "settings.account.trial",
1418 "start": { 1431 "start": {
1419 "column": 9, 1432 "column": 9,
1420 "line": 74 1433 "line": 78
1421 } 1434 }
1422 }, 1435 },
1423 { 1436 {
1424 "defaultMessage": "!!!Your Franz License:", 1437 "defaultMessage": "!!!Your Franz License:",
1425 "end": { 1438 "end": {
1426 "column": 3, 1439 "column": 3,
1427 "line": 81 1440 "line": 85
1428 }, 1441 },
1429 "file": "src/components/settings/account/AccountDashboard.js", 1442 "file": "src/components/settings/account/AccountDashboard.js",
1430 "id": "settings.account.yourLicense", 1443 "id": "settings.account.yourLicense",
1431 "start": { 1444 "start": {
1432 "column": 15, 1445 "column": 15,
1433 "line": 78 1446 "line": 82
1434 } 1447 }
1435 }, 1448 },
1436 { 1449 {
1437 "defaultMessage": "!!!Your free trial ends in {duration}.", 1450 "defaultMessage": "!!!Your free trial ends in {duration}.",
1438 "end": { 1451 "end": {
1439 "column": 3, 1452 "column": 3,
1440 "line": 85 1453 "line": 89
1441 }, 1454 },
1442 "file": "src/components/settings/account/AccountDashboard.js", 1455 "file": "src/components/settings/account/AccountDashboard.js",
1443 "id": "settings.account.trialEndsIn", 1456 "id": "settings.account.trialEndsIn",
1444 "start": { 1457 "start": {
1445 "column": 15, 1458 "column": 15,
1446 "line": 82 1459 "line": 86
1447 } 1460 }
1448 }, 1461 },
1449 { 1462 {
1450 "defaultMessage": "!!!Please update your billing info to continue using {license} after your trial period.", 1463 "defaultMessage": "!!!Please update your billing info to continue using {license} after your trial period.",
1451 "end": { 1464 "end": {
1452 "column": 3, 1465 "column": 3,
1453 "line": 89 1466 "line": 93
1454 }, 1467 },
1455 "file": "src/components/settings/account/AccountDashboard.js", 1468 "file": "src/components/settings/account/AccountDashboard.js",
1456 "id": "settings.account.trialUpdateBillingInfo", 1469 "id": "settings.account.trialUpdateBillingInfo",
1457 "start": { 1470 "start": {
1458 "column": 33, 1471 "column": 33,
1459 "line": 86 1472 "line": 90
1460 } 1473 }
1461 } 1474 }
1462 ], 1475 ],
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json
index 02204020f..82a9c0fb4 100644
--- a/src/i18n/locales/en-US.json
+++ b/src/i18n/locales/en-US.json
@@ -180,6 +180,7 @@
180 "settings.account.trialUpdateBillingInfo": "Please update your billing info to continue using {license} after your trial period.", 180 "settings.account.trialUpdateBillingInfo": "Please update your billing info to continue using {license} after your trial period.",
181 "settings.account.tryReloadServices": "Try again", 181 "settings.account.tryReloadServices": "Try again",
182 "settings.account.tryReloadUserInfoRequest": "Try again", 182 "settings.account.tryReloadUserInfoRequest": "Try again",
183 "settings.account.upgradeToPro.label": "Upgrade to Franz Professional",
183 "settings.account.userInfoRequestFailed": "Could not load user information", 184 "settings.account.userInfoRequestFailed": "Could not load user information",
184 "settings.account.yourLicense": "Your Franz License", 185 "settings.account.yourLicense": "Your Franz License",
185 "settings.app.buttonClearAllCache": "Clear cache", 186 "settings.app.buttonClearAllCache": "Clear cache",
diff --git a/src/i18n/messages/src/components/settings/account/AccountDashboard.json b/src/i18n/messages/src/components/settings/account/AccountDashboard.json
index 72cf7e0f3..06d53e41d 100644
--- a/src/i18n/messages/src/components/settings/account/AccountDashboard.json
+++ b/src/i18n/messages/src/components/settings/account/AccountDashboard.json
@@ -52,15 +52,28 @@
52 } 52 }
53 }, 53 },
54 { 54 {
55 "id": "settings.account.upgradeToPro.label",
56 "defaultMessage": "!!!Upgrade to Franz Professional",
57 "file": "src/components/settings/account/AccountDashboard.js",
58 "start": {
59 "line": 34,
60 "column": 23
61 },
62 "end": {
63 "line": 37,
64 "column": 3
65 }
66 },
67 {
55 "id": "settings.account.accountType.basic", 68 "id": "settings.account.accountType.basic",
56 "defaultMessage": "!!!Basic Account", 69 "defaultMessage": "!!!Basic Account",
57 "file": "src/components/settings/account/AccountDashboard.js", 70 "file": "src/components/settings/account/AccountDashboard.js",
58 "start": { 71 "start": {
59 "line": 34, 72 "line": 38,
60 "column": 20 73 "column": 20
61 }, 74 },
62 "end": { 75 "end": {
63 "line": 37, 76 "line": 41,
64 "column": 3 77 "column": 3
65 } 78 }
66 }, 79 },
@@ -69,11 +82,11 @@
69 "defaultMessage": "!!!Premium Supporter Account", 82 "defaultMessage": "!!!Premium Supporter Account",
70 "file": "src/components/settings/account/AccountDashboard.js", 83 "file": "src/components/settings/account/AccountDashboard.js",
71 "start": { 84 "start": {
72 "line": 38, 85 "line": 42,
73 "column": 22 86 "column": 22
74 }, 87 },
75 "end": { 88 "end": {
76 "line": 41, 89 "line": 45,
77 "column": 3 90 "column": 3
78 } 91 }
79 }, 92 },
@@ -82,11 +95,11 @@
82 "defaultMessage": "!!!Edit Account", 95 "defaultMessage": "!!!Edit Account",
83 "file": "src/components/settings/account/AccountDashboard.js", 96 "file": "src/components/settings/account/AccountDashboard.js",
84 "start": { 97 "start": {
85 "line": 42, 98 "line": 46,
86 "column": 21 99 "column": 21
87 }, 100 },
88 "end": { 101 "end": {
89 "line": 45, 102 "line": 49,
90 "column": 3 103 "column": 3
91 } 104 }
92 }, 105 },
@@ -95,11 +108,11 @@
95 "defaultMessage": "!!Invoices", 108 "defaultMessage": "!!Invoices",
96 "file": "src/components/settings/account/AccountDashboard.js", 109 "file": "src/components/settings/account/AccountDashboard.js",
97 "start": { 110 "start": {
98 "line": 46, 111 "line": 50,
99 "column": 18 112 "column": 18
100 }, 113 },
101 "end": { 114 "end": {
102 "line": 49, 115 "line": 53,
103 "column": 3 116 "column": 3
104 } 117 }
105 }, 118 },
@@ -108,11 +121,11 @@
108 "defaultMessage": "!!!Download", 121 "defaultMessage": "!!!Download",
109 "file": "src/components/settings/account/AccountDashboard.js", 122 "file": "src/components/settings/account/AccountDashboard.js",
110 "start": { 123 "start": {
111 "line": 50, 124 "line": 54,
112 "column": 19 125 "column": 19
113 }, 126 },
114 "end": { 127 "end": {
115 "line": 53, 128 "line": 57,
116 "column": 3 129 "column": 3
117 } 130 }
118 }, 131 },
@@ -121,11 +134,11 @@
121 "defaultMessage": "!!!Could not load user information", 134 "defaultMessage": "!!!Could not load user information",
122 "file": "src/components/settings/account/AccountDashboard.js", 135 "file": "src/components/settings/account/AccountDashboard.js",
123 "start": { 136 "start": {
124 "line": 54, 137 "line": 58,
125 "column": 25 138 "column": 25
126 }, 139 },
127 "end": { 140 "end": {
128 "line": 57, 141 "line": 61,
129 "column": 3 142 "column": 3
130 } 143 }
131 }, 144 },
@@ -134,11 +147,11 @@
134 "defaultMessage": "!!!Try again", 147 "defaultMessage": "!!!Try again",
135 "file": "src/components/settings/account/AccountDashboard.js", 148 "file": "src/components/settings/account/AccountDashboard.js",
136 "start": { 149 "start": {
137 "line": 58, 150 "line": 62,
138 "column": 28 151 "column": 28
139 }, 152 },
140 "end": { 153 "end": {
141 "line": 61, 154 "line": 65,
142 "column": 3 155 "column": 3
143 } 156 }
144 }, 157 },
@@ -147,11 +160,11 @@
147 "defaultMessage": "!!!Delete account", 160 "defaultMessage": "!!!Delete account",
148 "file": "src/components/settings/account/AccountDashboard.js", 161 "file": "src/components/settings/account/AccountDashboard.js",
149 "start": { 162 "start": {
150 "line": 62, 163 "line": 66,
151 "column": 17 164 "column": 17
152 }, 165 },
153 "end": { 166 "end": {
154 "line": 65, 167 "line": 69,
155 "column": 3 168 "column": 3
156 } 169 }
157 }, 170 },
@@ -160,11 +173,11 @@
160 "defaultMessage": "!!!If you don't need your Franz account any longer, you can delete your account and all related data here.", 173 "defaultMessage": "!!!If you don't need your Franz account any longer, you can delete your account and all related data here.",
161 "file": "src/components/settings/account/AccountDashboard.js", 174 "file": "src/components/settings/account/AccountDashboard.js",
162 "start": { 175 "start": {
163 "line": 66, 176 "line": 70,
164 "column": 14 177 "column": 14
165 }, 178 },
166 "end": { 179 "end": {
167 "line": 69, 180 "line": 73,
168 "column": 3 181 "column": 3
169 } 182 }
170 }, 183 },
@@ -173,11 +186,11 @@
173 "defaultMessage": "!!!You have received an email with a link to confirm your account deletion. Your account and data cannot be restored!", 186 "defaultMessage": "!!!You have received an email with a link to confirm your account deletion. Your account and data cannot be restored!",
174 "file": "src/components/settings/account/AccountDashboard.js", 187 "file": "src/components/settings/account/AccountDashboard.js",
175 "start": { 188 "start": {
176 "line": 70, 189 "line": 74,
177 "column": 19 190 "column": 19
178 }, 191 },
179 "end": { 192 "end": {
180 "line": 73, 193 "line": 77,
181 "column": 3 194 "column": 3
182 } 195 }
183 }, 196 },
@@ -186,11 +199,11 @@
186 "defaultMessage": "!!!Free Trial", 199 "defaultMessage": "!!!Free Trial",
187 "file": "src/components/settings/account/AccountDashboard.js", 200 "file": "src/components/settings/account/AccountDashboard.js",
188 "start": { 201 "start": {
189 "line": 74, 202 "line": 78,
190 "column": 9 203 "column": 9
191 }, 204 },
192 "end": { 205 "end": {
193 "line": 77, 206 "line": 81,
194 "column": 3 207 "column": 3
195 } 208 }
196 }, 209 },
@@ -199,11 +212,11 @@
199 "defaultMessage": "!!!Your Franz License:", 212 "defaultMessage": "!!!Your Franz License:",
200 "file": "src/components/settings/account/AccountDashboard.js", 213 "file": "src/components/settings/account/AccountDashboard.js",
201 "start": { 214 "start": {
202 "line": 78, 215 "line": 82,
203 "column": 15 216 "column": 15
204 }, 217 },
205 "end": { 218 "end": {
206 "line": 81, 219 "line": 85,
207 "column": 3 220 "column": 3
208 } 221 }
209 }, 222 },
@@ -212,11 +225,11 @@
212 "defaultMessage": "!!!Your free trial ends in {duration}.", 225 "defaultMessage": "!!!Your free trial ends in {duration}.",
213 "file": "src/components/settings/account/AccountDashboard.js", 226 "file": "src/components/settings/account/AccountDashboard.js",
214 "start": { 227 "start": {
215 "line": 82, 228 "line": 86,
216 "column": 15 229 "column": 15
217 }, 230 },
218 "end": { 231 "end": {
219 "line": 85, 232 "line": 89,
220 "column": 3 233 "column": 3
221 } 234 }
222 }, 235 },
@@ -225,11 +238,11 @@
225 "defaultMessage": "!!!Please update your billing info to continue using {license} after your trial period.", 238 "defaultMessage": "!!!Please update your billing info to continue using {license} after your trial period.",
226 "file": "src/components/settings/account/AccountDashboard.js", 239 "file": "src/components/settings/account/AccountDashboard.js",
227 "start": { 240 "start": {
228 "line": 86, 241 "line": 90,
229 "column": 33 242 "column": 33
230 }, 243 },
231 "end": { 244 "end": {
232 "line": 89, 245 "line": 93,
233 "column": 3 246 "column": 3
234 } 247 }
235 } 248 }
diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js
index 5d0037b3c..e23106462 100644
--- a/src/stores/UserStore.js
+++ b/src/stores/UserStore.js
@@ -4,7 +4,7 @@ import jwt from 'jsonwebtoken';
4import localStorage from 'mobx-localstorage'; 4import localStorage from 'mobx-localstorage';
5import ms from 'ms'; 5import ms from 'ms';
6 6
7import { isDevMode } from '../environment'; 7import { isDevMode, WEBSITE } from '../environment';
8import Store from './lib/Store'; 8import Store from './lib/Store';
9import Request from './lib/Request'; 9import Request from './lib/Request';
10import CachedRequest from './lib/CachedRequest'; 10import CachedRequest from './lib/CachedRequest';
@@ -381,6 +381,15 @@ export default class UserStore extends Store {
381 } 381 }
382 } 382 }
383 383
384 getAuthURL(url) {
385 const parsedUrl = new URL(url);
386 const params = new URLSearchParams(parsedUrl.search.slice(1));
387
388 params.append('authToken', this.authToken);
389
390 return `${parsedUrl.origin}${parsedUrl.pathname}?${params.toString()}`;
391 }
392
384 async _migrateUserLocale() { 393 async _migrateUserLocale() {
385 await this.getUserInfoRequest._promise; 394 await this.getUserInfoRequest._promise;
386 395