-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
472 additions
and
408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/packages/components/containers/api/humanVerification/Captcha.tsx b/packages/components/containers/api/humanVerification/Captcha.tsx | ||
index af1defc99..cbf37a9a3 100644 | ||
--- a/packages/components/containers/api/humanVerification/Captcha.tsx | ||
+++ b/packages/components/containers/api/humanVerification/Captcha.tsx | ||
@@ -11,6 +11,7 @@ const getIframeUrl = (token: string, theme?: CaptchaTheme) => { | ||
if (theme === 'dark') { | ||
url.searchParams.set('Dark', 'true'); | ||
} | ||
+ url.protocol = "https:"; | ||
return url; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
diff --git a/packages/shared/lib/constants.ts b/packages/shared/lib/constants.ts | ||
index 2bd472b..52cf521 100644 | ||
--- a/packages/shared/lib/constants.ts | ||
+++ b/packages/shared/lib/constants.ts | ||
@@ -36,8 +36,8 @@ export const APPS = { | ||
} as const; | ||
export const APPS_CONFIGURATION = { | ||
[APPS.PROTONACCOUNT]: { | ||
- publicPath: '', | ||
- subdomain: 'account', | ||
+ publicPath: '/account', | ||
+ subdomain: '', | ||
name: 'Proton Account', | ||
bareName: 'Account', | ||
clientID: 'WebAccount', | ||
@@ -46,7 +46,7 @@ export const APPS_CONFIGURATION = { | ||
}, | ||
[APPS.PROTONMAIL]: { | ||
publicPath: '', | ||
- subdomain: 'mail', | ||
+ subdomain: '', | ||
name: 'ProtonMail', | ||
bareName: 'Mail', | ||
clientID: 'WebMail', | ||
@@ -55,7 +55,7 @@ export const APPS_CONFIGURATION = { | ||
}, | ||
[APPS.PROTONCONTACTS]: { | ||
publicPath: '/contacts', | ||
- subdomain: 'contacts', | ||
+ subdomain: '', | ||
name: 'ProtonContacts', | ||
bareName: 'Contacts', | ||
clientID: 'WebContacts', | ||
@@ -64,7 +64,7 @@ export const APPS_CONFIGURATION = { | ||
}, | ||
[APPS.PROTONDRIVE]: { | ||
publicPath: '/drive', | ||
- subdomain: 'drive', | ||
+ subdomain: '', | ||
name: 'ProtonDrive', | ||
bareName: 'Drive', | ||
clientID: 'WebDrive', | ||
@@ -73,7 +73,7 @@ export const APPS_CONFIGURATION = { | ||
}, | ||
[APPS.PROTONCALENDAR]: { | ||
publicPath: '/calendar', | ||
- subdomain: 'calendar', | ||
+ subdomain: '', | ||
name: 'ProtonCalendar', | ||
bareName: 'Calendar', | ||
clientID: 'WebCalendar', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
diff --git a/packages/shared/lib/constants.ts b/packages/shared/lib/constants.ts | ||
index e359e3f66..128155d13 100644 | ||
--- a/packages/shared/lib/constants.ts | ||
+++ b/packages/shared/lib/constants.ts | ||
@@ -38,8 +38,8 @@ export const APPS = { | ||
} as const; | ||
export const APPS_CONFIGURATION = { | ||
[APPS.PROTONACCOUNT]: { | ||
- publicPath: '', | ||
- subdomain: 'account', | ||
+ publicPath: '/account', | ||
+ subdomain: '', | ||
name: 'Proton Account', | ||
bareName: 'Account', | ||
clientID: 'web-account', | ||
@@ -66,7 +66,7 @@ export const APPS_CONFIGURATION = { | ||
}, | ||
[APPS.PROTONCONTACTS]: { | ||
publicPath: '/contacts', | ||
- subdomain: 'contacts', | ||
+ subdomain: '', | ||
name: 'ProtonContacts', | ||
bareName: 'Contacts', | ||
clientID: 'web-contacts', | ||
@@ -75,7 +75,7 @@ export const APPS_CONFIGURATION = { | ||
}, | ||
[APPS.PROTONDRIVE]: { | ||
publicPath: '/drive', | ||
- subdomain: 'drive', | ||
+ subdomain: '', | ||
name: 'ProtonDrive', | ||
bareName: 'Drive', | ||
clientID: 'web-drive', | ||
@@ -84,7 +84,7 @@ export const APPS_CONFIGURATION = { | ||
}, | ||
[APPS.PROTONCALENDAR]: { | ||
publicPath: '/calendar', | ||
- subdomain: 'calendar', | ||
+ subdomain: '', | ||
name: 'ProtonCalendar', | ||
bareName: 'Calendar', | ||
clientID: 'web-calendar', | ||
@@ -92,7 +92,7 @@ export const APPS_CONFIGURATION = { | ||
settingsSlug: 'calendar', | ||
}, | ||
[APPS.PROTONVPN_SETTINGS]: { | ||
- publicPath: '', | ||
+ publicPath: 'account/vpn', | ||
subdomain: '', | ||
name: 'ProtonVPN', | ||
bareName: 'VPN', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,50 @@ | ||
{ | ||
"proton-mail": [ | ||
"common.patch", | ||
"constants-2.patch", | ||
"sentry-4.patch", | ||
"captcha-3.patch", | ||
"pack-api-arg-3.patch", | ||
"pack-webpack-config-2.patch", | ||
"session-storage-2.patch", | ||
"proton-mail.patch" | ||
], | ||
"proton-account": [ | ||
"common.patch", | ||
"sentry-3.patch", | ||
"captcha-2.patch", | ||
"pack-api-arg.patch", | ||
"constants-2.patch", | ||
"sentry-4.patch", | ||
"captcha-3.patch", | ||
"pack-api-arg-3.patch", | ||
"pack-webpack-config-2.patch", | ||
"session-storage-2.patch", | ||
"proton-account.patch" | ||
], | ||
"proton-calendar": [ | ||
"common.patch", | ||
"sentry-3.patch", | ||
"captcha-2.patch", | ||
"pack-api-arg.patch", | ||
"constants-2.patch", | ||
"sentry-4.patch", | ||
"captcha-3.patch", | ||
"pack-api-arg-2.patch", | ||
"pack-webpack-config-1.patch", | ||
"session-storage-2.patch" | ||
], | ||
"proton-drive": [ | ||
"common.patch", | ||
"sentry-3.patch", | ||
"captcha-2.patch", | ||
"pack-api-arg.patch", | ||
"constants-2.patch", | ||
"sentry-4.patch", | ||
"captcha-3.patch", | ||
"pack-api-arg-3.patch", | ||
"pack-webpack-config-2.patch", | ||
"session-storage-2.patch", | ||
"proton-drive.patch" | ||
], | ||
"proton-mail": [ | ||
"common.patch", | ||
"sentry-3.patch", | ||
"captcha-2.patch", | ||
"pack-api-arg.patch", | ||
"session-storage-2.patch", | ||
"proton-mail.patch" | ||
], | ||
"proton-vpn-settings": [ | ||
"common.patch", | ||
"constants-1.patch", | ||
"sentry-3.patch", | ||
"captcha-2.patch", | ||
"pack-api-arg.patch", | ||
"pack-api-arg-1.patch", | ||
"pack-webpack-config-1.patch", | ||
"session-storage-2.patch" | ||
] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
diff --git a/packages/pack/bin/protonPack.js b/packages/pack/bin/protonPack.js | ||
index 1c55efdf8..b49014080 100755 | ||
--- a/packages/pack/bin/protonPack.js | ||
+++ b/packages/pack/bin/protonPack.js | ||
@@ -62,6 +62,14 @@ const commandWithLog = (...args) => { | ||
|
||
addGlobalOptions(program.command('build').description('create an optimized production build')) | ||
.option('--no-sri', 'disable sri') | ||
+ .option( | ||
+ '--api <api>', | ||
+ '', | ||
+ (api) => { | ||
+ return getApi(api); | ||
+ }, | ||
+ getApi('') | ||
+ ) | ||
.action(async (options, env) => { | ||
const configData = getConfigData(options); | ||
await writeConfig(getConfigFile(configData)); | ||
|
||
diff --git a/packages/pack/lib/config.js b/packages/pack/lib/config.js | ||
index 1b026386c..3d4546df2 100644 | ||
--- a/packages/pack/lib/config.js | ||
+++ b/packages/pack/lib/config.js | ||
@@ -128,7 +128,7 @@ const getConfigFile = ({ buildData, appData }) => { | ||
export const BRANCH = '${buildData.branch}'; | ||
export const DATE_VERSION = '${buildData.date}'; | ||
export const APP_NAME = '${appData.appName}'; | ||
- export const API_URL = '/api'; | ||
+ export const API_URL = '${appData.api}'; | ||
export const LOCALES = ${JSON.stringify(LOCALES)}; | ||
export const VERSION_PATH = '${appData.publicPath}assets/version.json'; | ||
export const SENTRY_DSN = '${appData.sentryDsn}'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/packages/pack/bin/protonPack.js b/packages/pack/bin/protonPack.js | ||
index 86d8314c1..9dcb04131 100755 | ||
--- a/packages/pack/bin/protonPack.js | ||
+++ b/packages/pack/bin/protonPack.js | ||
@@ -68,6 +68,14 @@ const commandWithLog = (...args) => { | ||
|
||
addGlobalOptions(program.command('build').description('create an optimized production build')) | ||
.option('--no-sri', 'disable sri') | ||
+ .option( | ||
+ '--api <api>', | ||
+ '', | ||
+ (api) => { | ||
+ return getApi(api); | ||
+ }, | ||
+ getApi('') | ||
+ ) | ||
.action(async (options, env) => { | ||
console.log(chalk.magenta('Creating a production build...\n')); | ||
|
||
diff --git a/packages/pack/lib/config.js b/packages/pack/lib/config.js | ||
index 1b026386c..3d4546df2 100644 | ||
--- a/packages/pack/lib/config.js | ||
+++ b/packages/pack/lib/config.js | ||
@@ -128,7 +128,7 @@ const getConfigFile = ({ buildData, appData }) => { | ||
export const BRANCH = '${buildData.branch}'; | ||
export const DATE_VERSION = '${buildData.date}'; | ||
export const APP_NAME = '${appData.appName}'; | ||
- export const API_URL = '/api'; | ||
+ export const API_URL = '${appData.api}'; | ||
export const LOCALES = ${JSON.stringify(LOCALES)}; | ||
export const VERSION_PATH = '${appData.publicPath}assets/version.json'; | ||
export const SENTRY_DSN = '${appData.sentryDsn}'; |
Oops, something went wrong.