mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
@@ -5,7 +5,7 @@ import { appSettingAtom } from '@toeverything/infra';
|
||||
import type { createStore } from 'jotai';
|
||||
import type { useTheme } from 'next-themes';
|
||||
|
||||
import type { EditorSettingService } from '../modules/editor-settting';
|
||||
import type { EditorSettingService } from '../modules/editor-setting';
|
||||
import { registerAffineCommand } from './registry';
|
||||
|
||||
export function registerAffineSettingsCommands({
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { notify } from '@affine/component';
|
||||
import { updateReadyAtom } from '@affine/core/components/hooks/use-app-updater';
|
||||
import { apis } from '@affine/electron-api';
|
||||
import type { useI18n } from '@affine/i18n';
|
||||
import { track } from '@affine/track';
|
||||
import { ResetIcon } from '@blocksuite/icons/rc';
|
||||
@@ -11,9 +10,11 @@ import { registerAffineCommand } from './registry';
|
||||
export function registerAffineUpdatesCommands({
|
||||
t,
|
||||
store,
|
||||
quitAndInstall,
|
||||
}: {
|
||||
t: ReturnType<typeof useI18n>;
|
||||
store: ReturnType<typeof createStore>;
|
||||
quitAndInstall: () => Promise<void>;
|
||||
}) {
|
||||
const unsubs: Array<() => void> = [];
|
||||
|
||||
@@ -27,7 +28,7 @@ export function registerAffineUpdatesCommands({
|
||||
run() {
|
||||
track.$.cmdk.updates.quitAndInstall();
|
||||
|
||||
apis?.updater.quitAndInstall().catch(err => {
|
||||
quitAndInstall().catch(err => {
|
||||
notify.error({
|
||||
title: 'Failed to restart to upgrade',
|
||||
message: 'Please restart the app manually to upgrade.',
|
||||
|
||||
Reference in New Issue
Block a user