mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-26 02:35:58 +08:00
@@ -25,14 +25,18 @@ export function setupEvents(frameworkProvider: FrameworkProvider) {
|
||||
.catch(console.error);
|
||||
});
|
||||
|
||||
events?.applicationMenu.openInSettingModal(activeTab => {
|
||||
events?.applicationMenu.openInSettingModal(({ activeTab, scrollAnchor }) => {
|
||||
using currentWorkspace = getCurrentWorkspace(frameworkProvider);
|
||||
if (!currentWorkspace) {
|
||||
return;
|
||||
}
|
||||
const { workspace } = currentWorkspace;
|
||||
workspace.scope.get(WorkspaceDialogService).open('setting', {
|
||||
const workspaceDialogService = workspace.scope.get(WorkspaceDialogService);
|
||||
// close all other dialogs first
|
||||
workspaceDialogService.closeAll();
|
||||
workspaceDialogService.open('setting', {
|
||||
activeTab: activeTab as unknown as SettingTab,
|
||||
scrollAnchor,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -6,7 +6,10 @@ import {
|
||||
configureDesktopApiModule,
|
||||
DesktopApiService,
|
||||
} from '@affine/core/modules/desktop-api';
|
||||
import { configureSpellCheckSettingModule } from '@affine/core/modules/editor-setting';
|
||||
import {
|
||||
configureSpellCheckSettingModule,
|
||||
configureTraySettingModule,
|
||||
} from '@affine/core/modules/editor-setting';
|
||||
import { configureFindInPageModule } from '@affine/core/modules/find-in-page';
|
||||
import { configureElectronStateStorageImpls } from '@affine/core/modules/storage';
|
||||
import {
|
||||
@@ -27,6 +30,7 @@ export function setupModules() {
|
||||
configureFindInPageModule(framework);
|
||||
configureDesktopApiModule(framework);
|
||||
configureSpellCheckSettingModule(framework);
|
||||
configureTraySettingModule(framework);
|
||||
configureDesktopBackupModule(framework);
|
||||
|
||||
framework.impl(PopupWindowProvider, p => {
|
||||
|
||||
Reference in New Issue
Block a user