Skip to content

Commit

Permalink
update @ProtonMail web clients
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimiry committed Mar 1, 2023
1 parent 08e5aad commit 6dbcac1
Show file tree
Hide file tree
Showing 7 changed files with 202 additions and 166 deletions.
140 changes: 0 additions & 140 deletions patches/protonmail/common-1.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ index 9aaa78a28..f3d24b47c 100644
};

diff --git a/packages/components/components/link/SettingsLink.tsx b/packages/components/components/link/SettingsLink.tsx
index ebce00d20..96498d8c8 100644
index 5081c4003..cde37c0cb 100644
--- a/packages/components/components/link/SettingsLink.tsx
+++ b/packages/components/components/link/SettingsLink.tsx
@@ -37,7 +37,7 @@ const SettingsLink = ({ path, app, children, ...rest }: Props, ref: Ref<HTMLAnch
@@ -48,7 +48,7 @@ const SettingsLink = ({ path, app, children, ...rest }: Props, ref: Ref<HTMLAnch
ref={ref}
toApp={APPS.PROTONACCOUNT}
// If going to settings for the same app
- target={isGoingToSameSettings ? '_self' : '_blank'}
+ target={isGoingToSameSettings || app === APPS.PROTONVPN_SETTINGS ? '_self' : '_blank'}
- target={canOpenInSameTab(APP_NAME, settingsApp, toSettingsForApp) ? '_self' : '_blank'}
+ target={canOpenInSameTab(APP_NAME, settingsApp, toSettingsForApp) || app === APPS.PROTONVPN_SETTINGS ? '_self' : '_blank'}
{...rest}
>
{children}
Expand Down
24 changes: 24 additions & 0 deletions patches/protonmail/constants-8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/packages/shared/lib/constants.ts b/packages/shared/lib/constants.ts
index d035e6c88..96af3775b 100644
--- a/packages/shared/lib/constants.ts
+++ b/packages/shared/lib/constants.ts
@@ -69,7 +69,7 @@ interface AppConfiguration {

export const APPS_CONFIGURATION: { [key in APP_NAMES]: AppConfiguration } = {
[APPS.PROTONACCOUNT]: {
- publicPath: '',
+ publicPath: '/account',
subdomain: 'account',
name: 'Proton Account',
bareName: 'Account',
@@ -141,8 +141,8 @@ export const APPS_CONFIGURATION: { [key in APP_NAMES]: AppConfiguration } = {
settingsSlug: '',
},
[APPS.PROTONVPN_SETTINGS]: {
- publicPath: '',
- subdomain: '',
+ publicPath: 'account/vpn',
+ subdomain: 'account',
name: VPN_APP_NAME,
bareName: VPN_SHORT_APP_NAME,
clientID: 'web-vpn-settings',
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/packages/shared/lib/constants.ts b/packages/shared/lib/constants.ts
index a5c634a9f..c1cbd799a 100644
index 632e91b83..fd463a184 100644
--- a/packages/shared/lib/constants.ts
+++ b/packages/shared/lib/constants.ts
@@ -57,7 +57,7 @@ export const APPS = {
@@ -61,7 +61,7 @@ export const APPS = {

export const APPS_CONFIGURATION = {
[APPS.PROTONACCOUNT]: {
Expand All @@ -11,7 +11,7 @@ index a5c634a9f..c1cbd799a 100644
subdomain: 'account',
name: 'Proton Account',
bareName: 'Account',
@@ -129,8 +129,8 @@ export const APPS_CONFIGURATION = {
@@ -133,8 +133,8 @@ export const APPS_CONFIGURATION = {
settingsSlug: '',
},
[APPS.PROTONVPN_SETTINGS]: {
Expand Down
28 changes: 14 additions & 14 deletions patches/protonmail/meta.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"proton-mail": [
"common-1.patch",
"common-3.patch",
"url-3.patch",
"constants-7.patch",
"sentry-9.patch",
"constants-8.patch",
"sentry-10.patch",
"pack-api-arg-4.patch",
"pack-webpack-6.patch",
"session-storage-5.patch",
Expand All @@ -12,10 +12,10 @@
"proton-mail.patch"
],
"proton-account": [
"common-2.patch",
"common-3.patch",
"url-3.patch",
"constants-7.patch",
"sentry-9.patch",
"constants-8.patch",
"sentry-10.patch",
"pack-api-arg-4.patch",
"pack-webpack-6.patch",
"session-storage-5.patch",
Expand All @@ -24,20 +24,20 @@
"proton-account.patch"
],
"proton-calendar": [
"common-1.patch",
"common-3.patch",
"url-3.patch",
"constants-7.patch",
"sentry-9.patch",
"constants-8.patch",
"sentry-10.patch",
"pack-api-arg-4.patch",
"pack-webpack-6.patch",
"session-storage-5.patch",
"link-handler-7.patch",
"embedded-verification-3.patch"
],
"proton-drive": [
"common-1.patch",
"common-3.patch",
"url-3.patch",
"constants-7.patch",
"constants-9.patch",
"sentry-9.patch",
"pack-api-arg-4.patch",
"pack-webpack-6.patch",
Expand All @@ -47,10 +47,10 @@
"proton-drive.patch"
],
"proton-vpn-settings": [
"common-1.patch",
"common-3.patch",
"url-3.patch",
"constants-7.patch",
"sentry-9.patch",
"constants-8.patch",
"sentry-10.patch",
"pack-api-arg-4.patch",
"pack-webpack-6.patch",
"session-storage-5.patch",
Expand Down
Loading

0 comments on commit 6dbcac1

Please sign in to comment.