Skip to content

Commit 25520ba

Browse files
committed
update @ProtonMail web clients
1 parent 0e096bf commit 25520ba

13 files changed

+101
-460
lines changed

patches/protonmail/constants-4.patch

Lines changed: 0 additions & 24 deletions
This file was deleted.

patches/protonmail/embedded-verification-2.patch

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ index 9bfef3d1f..546b273c8 100644
99
-export * from './verification';
1010
export * from './v5WelcomeModal';
1111
export * from './vpn';
12-
--
1312

1413
diff --git a/packages/components/containers/verification/EmbeddedVerification.tsx b/packages/components/containers/verification/EmbeddedVerification.tsx
1514
deleted file mode 100644

patches/protonmail/embedded-verification-1.patch renamed to patches/protonmail/embedded-verification-3.patch

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
diff --git a/packages/components/containers/index.ts b/packages/components/containers/index.ts
2-
index fd20d8e62..7c3e55c87 100644
2+
index a83ab6ba5..44da559d6 100644
33
--- a/packages/components/containers/index.ts
44
+++ b/packages/components/containers/index.ts
5-
@@ -56,6 +56,5 @@ export * from './sessions';
5+
@@ -60,5 +60,4 @@ export * from './sessions';
66
export * from './support';
77
export * from './themes';
88
export * from './topBanners';
99
-export * from './verification';
10-
export * from './v5WelcomeModal';
1110
export * from './vpn';
1211

1312
diff --git a/packages/components/containers/verification/EmbeddedVerification.tsx b/packages/components/containers/verification/EmbeddedVerification.tsx
1413
deleted file mode 100644
15-
index 242be9084..000000000
14+
index 6425df9ec..000000000
1615
--- a/packages/components/containers/verification/EmbeddedVerification.tsx
1716
+++ /dev/null
18-
@@ -1,102 +0,0 @@
17+
@@ -1,103 +0,0 @@
1918
-import { useEffect, useMemo, useRef, useState } from 'react';
20-
-import { localeCode } from '@proton/shared/lib/i18n';
19+
-
2120
-import { APPS } from '@proton/shared/lib/constants';
22-
-import { HumanVerificationMethodType } from '@proton/shared/lib/interfaces';
2321
-import { getAppUrlFromApiUrl, getAppUrlRelativeToOrigin, stringifySearchParams } from '@proton/shared/lib/helpers/url';
22+
-import { localeCode } from '@proton/shared/lib/i18n';
23+
-import { HumanVerificationMethodType } from '@proton/shared/lib/interfaces';
2424
-
2525
-import { useConfig, useNotifications } from '../../hooks';
2626
-
@@ -121,8 +121,8 @@ index 242be9084..000000000
121121

122122
diff --git a/packages/components/containers/verification/index.ts b/packages/components/containers/verification/index.ts
123123
deleted file mode 100644
124-
index 8da2cc627..000000000
124+
index 16a977e60..000000000
125125
--- a/packages/components/containers/verification/index.ts
126126
+++ /dev/null
127127
@@ -1 +0,0 @@
128-
-export { default as EmbeddedVerification } from './EmbeddedVerification'
128+
-export { default as EmbeddedVerification } from './EmbeddedVerification';

patches/protonmail/link-handler-5.patch

Lines changed: 0 additions & 42 deletions
This file was deleted.

patches/protonmail/meta.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
11
{
22
"proton-mail": [
33
"common.patch",
4-
"url-2.patch",
5-
"constants-4.patch",
4+
"url-3.patch",
5+
"constants-5.patch",
66
"sentry-8.patch",
7-
"pack-api-arg-3.patch",
8-
"pack-webpack-5.patch",
9-
"session-storage-3.patch",
10-
"link-handler-5.patch",
11-
"embedded-verification-1.patch",
7+
"pack-api-arg-4.patch",
8+
"pack-webpack-6.patch",
9+
"session-storage-4.patch",
10+
"link-handler-6.patch",
11+
"embedded-verification-3.patch",
1212
"proton-mail.patch"
1313
],
1414
"proton-account": [
1515
"common.patch",
1616
"url-3.patch",
1717
"constants-5.patch",
1818
"sentry-8.patch",
19-
"pack-api-arg-3.patch",
20-
"pack-webpack-5.patch",
19+
"pack-api-arg-4.patch",
20+
"pack-webpack-6.patch",
2121
"session-storage-4.patch",
2222
"link-handler-6.patch",
23-
"embedded-verification-2.patch",
23+
"embedded-verification-3.patch",
2424
"proton-account.patch"
2525
],
2626
"proton-calendar": [
2727
"common.patch",
28-
"url-2.patch",
29-
"constants-4.patch",
28+
"url-3.patch",
29+
"constants-5.patch",
3030
"sentry-8.patch",
3131
"pack-api-arg-3.patch",
3232
"pack-webpack-5.patch",
33-
"session-storage-3.patch",
34-
"link-handler-5.patch",
35-
"embedded-verification-1.patch"
33+
"session-storage-4.patch",
34+
"link-handler-6.patch",
35+
"embedded-verification-2.patch"
3636
],
3737
"proton-drive": [
3838
"common.patch",
39-
"url-2.patch",
40-
"constants-4.patch",
39+
"url-3.patch",
40+
"constants-5.patch",
4141
"sentry-8.patch",
4242
"pack-api-arg-3.patch",
43-
"pack-webpack-4.patch",
44-
"session-storage-3.patch",
45-
"link-handler-5.patch",
46-
"embedded-verification-1.patch",
43+
"pack-webpack-5.patch",
44+
"session-storage-4.patch",
45+
"link-handler-6.patch",
46+
"embedded-verification-2.patch",
4747
"proton-drive.patch"
4848
],
4949
"proton-vpn-settings": [
5050
"common.patch",
51-
"url-2.patch",
52-
"constants-4.patch",
51+
"url-3.patch",
52+
"constants-5.patch",
5353
"sentry-8.patch",
54-
"pack-api-arg-3.patch",
55-
"pack-webpack-5.patch",
56-
"session-storage-3.patch",
57-
"link-handler-5.patch",
58-
"embedded-verification-1.patch"
54+
"pack-api-arg-4.patch",
55+
"pack-webpack-6.patch",
56+
"session-storage-4.patch",
57+
"link-handler-6.patch",
58+
"embedded-verification-3.patch"
5959
]
6060
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/packages/pack/lib/config.js b/packages/pack/lib/config.js
2+
index b6484f719..a8ebc7fc0 100644
3+
--- a/packages/pack/lib/config.js
4+
+++ b/packages/pack/lib/config.js
5+
@@ -129,7 +129,7 @@ const getConfigFile = ({ buildData, appData }) => {
6+
export const BRANCH = '${buildData.branch}';
7+
export const DATE_VERSION = '${buildData.date}';
8+
export const APP_NAME = '${appData.appName}';
9+
- export const API_URL = '${(!appData.apiProxy && appData.api) || '/api'}';
10+
+ export const API_URL = '${appData.api}';
11+
export const LOCALES = ${JSON.stringify(LOCALES)};
12+
export const VERSION_PATH = '${appData.publicPath}assets/version.json';
13+
export const SENTRY_DSN = '${appData.sentryDsn}';

patches/protonmail/pack-webpack-4.patch

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
diff --git a/packages/pack/webpack.config.js b/packages/pack/webpack.config.js
2+
index 9fdd56f70..3a7300257 100644
3+
--- a/packages/pack/webpack.config.js
4+
+++ b/packages/pack/webpack.config.js
5+
@@ -15,7 +15,7 @@ const getConfig = (env) => {
6+
api: env.api,
7+
appMode: env.appMode || 'standalone',
8+
featureFlags: env.featureFlags || '',
9+
- writeSRI: env.writeSri !== 'false',
10+
+ writeSRI: false,
11+
browserslist: isProduction
12+
? `> 0.5%, not IE 11, Firefox ESR, Safari 11`
13+
: 'last 1 chrome version, last 1 firefox version, last 1 safari version',
14+
@@ -33,7 +33,20 @@ const getConfig = (env) => {
15+
logical: env.logical || false,
16+
};
17+
18+
- return {
19+
+ return (() => {
20+
+ const file = path.resolve("./proton.config.js");
21+
+ if (require("fs").existsSync(file)) {
22+
+ console.log(
23+
+ /*reset:*/"\x1b[0m" +
24+
+ /*yellow:*/"\x1b[33m" +
25+
+ ">>>" +
26+
+ /*reset:*/"\x1b[0m", +
27+
+ `Found ${file}, extend the config`,
28+
+ )
29+
+ return require(file);
30+
+ }
31+
+ return (value) => value;
32+
+ })()({
33+
target: `browserslist:${options.browserslist}`,
34+
mode: options.isProduction ? 'production' : 'development',
35+
bail: options.isProduction,
36+
@@ -120,7 +133,7 @@ const getConfig = (env) => {
37+
},
38+
}),
39+
},
40+
- };
41+
+ });
42+
};
43+
44+
module.exports = getConfig;

patches/protonmail/proton-mail.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,12 @@ index e2baface5..8b4317d5a 100644
203203
export default useApi;
204204

205205
diff --git a/packages/components/hooks/useAuthentication.ts b/packages/components/hooks/useAuthentication.ts
206-
index feb92a8af..d802ae8ae 100644
206+
index 2bab0ad85..51fc1fd18 100644
207207
--- a/packages/components/hooks/useAuthentication.ts
208208
+++ b/packages/components/hooks/useAuthentication.ts
209209
@@ -3,9 +3,9 @@ import { useContext } from 'react';
210-
import AuthenticationContext from '../containers/authentication/authenticationContext';
211210
import { PrivateAuthenticationStore } from '../containers/app/interface';
211+
import AuthenticationContext from '../containers/authentication/authenticationContext';
212212

213213
-const useAuthentication = () => {
214214
+const useAuthentication = () => { /* <electron-mail-mark> */

0 commit comments

Comments
 (0)