A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
desktop: prevent setting privacy mode on linux
Abdullah Atta6f2127abb8fe
diff --git a/apps/web/desktop/ipc/actions/setPrivacyMode.js b/apps/web/desktop/ipc/actions/setPrivacyMode.jsindex bd9995046..f84031062 100644--- a/apps/web/desktop/ipc/actions/setPrivacyMode.js+++ b/apps/web/desktop/ipc/actions/setPrivacyMode.js@@ -20,13 +20,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { setPrivacyMode } from "../../config/privacyMode";export default (args) => {- if (!globalThis.window) return;+ if (!globalThis.window || !["win32", "darwin"].includes(process.platform))+ return;+const { privacyMode } = args;globalThis.window.setContentProtection(privacyMode);- globalThis.window.setThumbnailClip(- privacyMode- ? { x: 0, y: 0, width: 1, height: 1 }- : { x: 0, y: 0, width: 0, height: 0 }- );++ if (process.platform === "win32") {+ globalThis.window.setThumbnailClip(+ privacyMode+ ? { x: 0, y: 0, width: 1, height: 1 }+ : { x: 0, y: 0, width: 0, height: 0 }+ );+ }+setPrivacyMode(privacyMode);};