π¬ A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots π
TypeScript browser-extensionchrome-extensiondocumentationfirefox-extensionguide-generatorlocal-firstmanifest-v3privacy-firstproductivityreactscreenshotstep-by-step-guidetutorialtypescriptworkflowwxt
fix(desktop): report failed update checks and word start at login for macOS
Luis Ortizf36d92bdac87
diff --git a/apps/desktop/src/main/updater.ts b/apps/desktop/src/main/updater.tsindex 0f7438f..f223222 100644--- a/apps/desktop/src/main/updater.ts+++ b/apps/desktop/src/main/updater.ts@@ -5,9 +5,11 @@ import { mainI18n } from './i18n';const { autoUpdater } = electronUpdater;let wired = false;+let manual = false;export function checkForUpdates(opts: { notifyWhenUpToDate: boolean }): void {if (!app.isPackaged) return;+ manual = opts.notifyWhenUpToDate;if (!wired) {wired = true;@@ -24,11 +26,13 @@ export function checkForUpdates(opts: { notifyWhenUpToDate: boolean }): void {if (response === 0) autoUpdater.quitAndInstall();});autoUpdater.on('error', (err) => {- if (opts.notifyWhenUpToDate) {+ if (manual) {+ console.error('update check failed', err);dialog.showMessageBox({type: 'error',title: mainI18n.t('desktop.updateFailed'),- message: String(err?.message ?? err),+ message: mainI18n.t('desktop.updateFailed'),+ detail: mainI18n.t('desktop.updateFailedMessage'),});}});@@ -37,7 +41,7 @@ export function checkForUpdates(opts: { notifyWhenUpToDate: boolean }): void {autoUpdater.checkForUpdates().then((result) => {- if (opts.notifyWhenUpToDate && !result?.updateInfo) {+ if (opts.notifyWhenUpToDate && result?.isUpdateAvailable === false) {dialog.showMessageBox({type: 'info',title: mainI18n.t('desktop.upToDate'),diff --git a/apps/desktop/src/renderer/settings/GeneralSettings.tsx b/apps/desktop/src/renderer/settings/GeneralSettings.tsxindex f034a6b..ec3d4f4 100644--- a/apps/desktop/src/renderer/settings/GeneralSettings.tsx+++ b/apps/desktop/src/renderer/settings/GeneralSettings.tsx@@ -6,6 +6,8 @@ import { AppLanguage } from './AppLanguage';import { Card } from './Card';import { Row } from './Row';+const LOGIN_HINT = navigator.userAgent.includes('Mac') ? 'desktop_startAtLoginHintMac' : 'desktop_startAtLoginHint';+export function GeneralSettings() {const [version, setVersion] = useState('');const [atLogin, setAtLogin] = useState(false);@@ -24,7 +26,7 @@ export function GeneralSettings() {</Card><Card icon={Power} title={i18n.t('desktop_cardStartup')}>- <Row label={i18n.t('desktop_startAtLogin')} hint={i18n.t('desktop_startAtLoginHint')}>+ <Row label={i18n.t('desktop_startAtLogin')} hint={i18n.t(LOGIN_HINT)}><Switchchecked={atLogin}label={i18n.t('desktop_startAtLogin')}