Skip to content

Commit

Permalink
update @ProtonMail web clients
Browse files Browse the repository at this point in the history
Ensuring "encrypted search" unavailability:
  * Enabling @ProtonMail's "encrypted search" feature in the app doesn't make sense since the app goes with in-memory only browser storages (including "indexedDb" storage). So the app will start with a clean in-browser storages on every start.
  * The app comes with its own full-text search capabilities, see "local store" point in https://github.com/vladimiry/ElectronMail/wiki/FAQ. The app also supports the code-based search which allows unlimited messages scanning capabilities, see #257.
  • Loading branch information
vladimiry committed May 12, 2021
1 parent 2593dce commit 390c4d9
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
8 changes: 4 additions & 4 deletions patches/protonmail/proton-account.patch
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ index 9d333b8..2921f49 100644

export default Setup;
diff --git a/src/app/content/MainContainer.tsx b/src/app/content/MainContainer.tsx
index cb50e5e..ca76f0f 100644
index 73380a9..75922b7 100644
--- a/src/app/content/MainContainer.tsx
+++ b/src/app/content/MainContainer.tsx
@@ -62,7 +62,7 @@ const MainContainer = () => {
}
}, []);
@@ -43,7 +43,7 @@ const MainContainer = () => {
setExpand(false);
}, [location.pathname, location.hash]);

- const app = getAppFromPathnameSafe(location.pathname);
+ const app = getAppFromPathnameSafe(window.location.pathname);
Expand Down
28 changes: 28 additions & 0 deletions patches/protonmail/proton-mail.patch
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,31 @@ index 3f222f7..98e9cfe 100644
{showToolbar && (
<Toolbar
labelID={labelID}

diff --git a/src/app/components/header/AdvancedSearchDropdown.tsx b/src/app/components/header/AdvancedSearchDropdown.tsx
index 0ac0bc5..bea1c9b 100644
--- a/src/app/components/header/AdvancedSearchDropdown.tsx
+++ b/src/app/components/header/AdvancedSearchDropdown.tsx
@@ -330,7 +330,7 @@ const AdvancedSearchDropdown = ({ keyword: fullInput = '', isNarrow, handleCachi
);

// Switches
- const showEncryptedSearch = !isMobile() && !!esFeature && !!esFeature.Value && !!isPaid(user);
+ const showEncryptedSearch = false;
const showAdvancedSearch = !showEncryptedSearch || showMore;
const showProgress = indexKeyExists(user.ID) && esEnabled && (isBuilding || isRefreshing);
const showSubTitleSection = wasIndexingDone(user.ID) && esEnabled && !isRefreshing && isDBLimited;

diff --git a/src/app/containers/EncryptedSearchProvider.tsx b/src/app/containers/EncryptedSearchProvider.tsx
index 7ba1277..ac4fd64 100644
--- a/src/app/containers/EncryptedSearchProvider.tsx
+++ b/src/app/containers/EncryptedSearchProvider.tsx
@@ -527,7 +527,7 @@ const EncryptedSearchProvider = ({ children }: Props) => {
const t1 = performance.now();
const { dbExists, esEnabled, isCacheReady } = esDBStatus;

- if (!dbExists || !esEnabled) {
+ if (true) {
return false;
}

8 changes: 4 additions & 4 deletions src/shared/proton-apps-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const PROVIDER_REPO_MAP = {
repoRelativeDistDir: "./dist",
baseDirName: "",
repo: "https://github.com/ProtonMail/proton-mail.git",
commit: "da1bc2669f7d38b7c79b5e60f9cb3cb56067148c",
commit: "4854d1a853720164a4761b907ffc0cde8be8f600",
protonPack: {
appConfig: {clientId: "WebMail"},
webpackIndexEntryItems: [
Expand Down Expand Up @@ -50,14 +50,14 @@ export const PROVIDER_REPO_MAP = {
repoRelativeDistDir: "./dist",
baseDirName: "account",
repo: "https://github.com/ProtonMail/proton-account.git",
commit: "293da1b9a091ae074489d6152be051a176c4cddd",
commit: "8ffe7f8a1afd53b7c4773f1ff34ce222b54515e1",
protonPack: {appConfig: {clientId: "WebAccount"}}
},
[PROVIDER_REPO_NAMES[2]]: {
repoRelativeDistDir: "./dist",
baseDirName: "calendar",
repo: "https://github.com/ProtonMail/proton-calendar.git",
commit: "396be94cea2036db15a34f6c192f5d902f5e480d",
commit: "64e6414e40dcc7afe9f08fbdcfc9679fd013c6d3",
protonPack: {
appConfig: {clientId: "WebCalendar"},
webpackIndexEntryItems: [
Expand All @@ -71,7 +71,7 @@ export const PROVIDER_REPO_MAP = {
repoRelativeDistDir: "./dist",
baseDirName: "drive",
repo: "https://github.com/ProtonMail/proton-drive.git",
commit: "05e04a979c35f09f294c9b85a9c79e5ddff04d0c",
commit: "1cf15887431fa4d3f1763a36f44f9b21b39b3694",
protonPack: {appConfig: {clientId: "WebDrive"}},
},
} as const;
Expand Down

0 comments on commit 390c4d9

Please sign in to comment.