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
feat: do not check for updates on startup automatically
thecodrrfb86ba33ebf2
diff --git a/apps/web/desktop/autoupdate.js b/apps/web/desktop/autoupdate.jsindex 26f398030..ac6ff45f7 100644--- a/apps/web/desktop/autoupdate.js+++ b/apps/web/desktop/autoupdate.js@@ -23,7 +23,6 @@ async function configureAutoUpdater() {autoUpdater.addListener("update-not-available", (info) => {sendMessageToRenderer(EVENTS.updateNotAvailable, info);});- await autoUpdater.checkForUpdates();}module.exports = { configureAutoUpdater };diff --git a/apps/web/desktop/ipc/actions/checkForUpdate.js b/apps/web/desktop/ipc/actions/checkForUpdate.jsnew file mode 100644index 000000000..b1d10f17c--- /dev/null+++ b/apps/web/desktop/ipc/actions/checkForUpdate.js@@ -0,0 +1,8 @@+const { autoUpdater } = require("electron-updater");++module.exports = {+ type: "checkForUpdate",+ action: () => {+ autoUpdater.checkForUpdates();+ },+};diff --git a/apps/web/src/commands/check-for-update.js b/apps/web/src/commands/check-for-update.jsnew file mode 100644index 000000000..160792af4--- /dev/null+++ b/apps/web/src/commands/check-for-update.js@@ -0,0 +1,5 @@+import { invokeCommand } from "./index";++export default function checkForUpdate() {+ invokeCommand("checkForUpdate");+}diff --git a/apps/web/src/hooks/use-auto-updater.js b/apps/web/src/hooks/use-auto-updater.jsindex 826422372..47d249790 100644--- a/apps/web/src/hooks/use-auto-updater.js+++ b/apps/web/src/hooks/use-auto-updater.js@@ -2,6 +2,7 @@ import { useEffect, useState } from "react";import { ElectronEventManager } from "../commands";import { EVENTS } from "@notesnook/desktop/events";import { isDesktop } from "../utils/platform";+import checkForUpdate from "../commands/check-for-update";export default function useAutoUpdater() {const [status, setStatus] = useState();@@ -42,25 +43,13 @@ export default function useAutoUpdater() {updateDownloadProgress);- if (isDesktop()) checkingForUpdate();+ if (isDesktop()) {+ checkingForUpdate();+ checkForUpdate();+ }+return () => {- ElectronEventManager.unsubscribe(- EVENTS.checkingForUpdate,- checkingForUpdate- );- ElectronEventManager.unsubscribe(- EVENTS.updateNotAvailable,- updateNotAvailable- );- ElectronEventManager.unsubscribe(EVENTS.updateAvailable, updateAvailable);- ElectronEventManager.unsubscribe(- EVENTS.updateDownloadCompleted,- updateDownloadCompleted- );- ElectronEventManager.unsubscribe(- EVENTS.updateDownloadProgress,- updateDownloadProgress- );+ ElectronEventManager.unsubscribeAll();};}, []);diff --git a/apps/web/src/views/auth.js b/apps/web/src/views/auth.jsindex 9042c24d9..304e1a787 100644--- a/apps/web/src/views/auth.js+++ b/apps/web/src/views/auth.js@@ -61,10 +61,7 @@ const authTypes = {text: "Create account",loadingText: "Creating account...",},- secondaryAction: {- text: "I want to try the app first",- onClick: () => navigate("/"),- },+agreementText: (<>By pressing "Create account" button, you agree to our{" "}@@ -184,6 +181,19 @@ function Auth(props) {overflowY="auto"flexDirection={"row"}>+ <Button+ variant="secondary"+ display="flex"+ alignItems="center"+ sx={{ position: "absolute", top: 3, right: 30, cursor: "pointer" }}+ title="Go to app"+ onClick={() => navigate("/")}+ >+ <Icon.ArrowRight size={16} />+ <Text variant="body" ml={1}>+ Go to app+ </Text>+ </Button><BoxflexDirection="column"justifyContent="center"@@ -197,24 +207,15 @@ function Auth(props) {justifyContent="center"alignItems="start">- <Flex- mt={4}- alignItems="center"- sx={{ cursor: "pointer" }}- title="Go back to app"- onClick={() => navigate("/")}+ <Text+ color="static"+ variant="title"+ fontWeight="heading"+ ml={1}+ fontSize={20}>- <Icon.ArrowLeft size={22} color="static" />- <Text- color="static"- variant="title"- fontWeight="heading"- ml={1}- fontSize={20}- >- Notesnook- </Text>- </Flex>+ Notesnook+ </Text><Flex mt={100} flexDirection="column" height={250}><Text