mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
@@ -142,12 +142,6 @@ window.addEventListener('unload', () => {
|
||||
.catch(console.error);
|
||||
});
|
||||
|
||||
events?.applicationMenu.openAboutPageInSettingModal(() =>
|
||||
frameworkProvider.get(WorkspaceDialogService).open('setting', {
|
||||
activeTab: 'about',
|
||||
})
|
||||
);
|
||||
|
||||
function getCurrentWorkspace() {
|
||||
const currentWorkspaceId = frameworkProvider
|
||||
.get(GlobalContextService)
|
||||
@@ -167,6 +161,18 @@ function getCurrentWorkspace() {
|
||||
};
|
||||
}
|
||||
|
||||
events?.applicationMenu.openAboutPageInSettingModal(() => {
|
||||
const currentWorkspace = getCurrentWorkspace();
|
||||
if (!currentWorkspace) {
|
||||
return;
|
||||
}
|
||||
const { workspace, dispose } = currentWorkspace;
|
||||
workspace.scope.get(WorkspaceDialogService).open('setting', {
|
||||
activeTab: 'about',
|
||||
});
|
||||
dispose();
|
||||
});
|
||||
|
||||
events?.applicationMenu.onNewPageAction(type => {
|
||||
const currentWorkspace = getCurrentWorkspace();
|
||||
if (!currentWorkspace) {
|
||||
|
||||
Reference in New Issue
Block a user