mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-08 12:45:55 +08:00
refactor(electron): nestjsfy
This commit is contained in:
@@ -24,7 +24,7 @@ export function setupEvents(frameworkProvider: FrameworkProvider) {
|
||||
.catch(console.error);
|
||||
});
|
||||
|
||||
events?.applicationMenu.openInSettingModal(({ activeTab, scrollAnchor }) => {
|
||||
events?.menu.onOpenInSettingModal(({ activeTab, scrollAnchor }) => {
|
||||
using currentWorkspace = getCurrentWorkspace(frameworkProvider);
|
||||
if (!currentWorkspace) {
|
||||
return;
|
||||
@@ -39,7 +39,7 @@ export function setupEvents(frameworkProvider: FrameworkProvider) {
|
||||
});
|
||||
});
|
||||
|
||||
events?.applicationMenu.onNewPageAction(type => {
|
||||
events?.menu.onNewPageAction(type => {
|
||||
apis?.ui
|
||||
.isActiveTab()
|
||||
.then(isActive => {
|
||||
@@ -61,7 +61,7 @@ export function setupEvents(frameworkProvider: FrameworkProvider) {
|
||||
});
|
||||
});
|
||||
|
||||
events?.applicationMenu.onOpenJournal(() => {
|
||||
events?.menu.onOpenJournal(() => {
|
||||
using currentWorkspace = getCurrentWorkspace(frameworkProvider);
|
||||
if (!currentWorkspace) {
|
||||
return;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import './setup';
|
||||
|
||||
import { appConfigProxy } from '@affine/core/components/hooks/use-app-config-storage';
|
||||
import { Telemetry } from '@affine/core/components/telemetry';
|
||||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
@@ -8,12 +7,6 @@ import { createRoot } from 'react-dom/client';
|
||||
import { App } from './app';
|
||||
|
||||
function main() {
|
||||
// load persistent config for electron
|
||||
// TODO(@Peng): should be sync, but it's not necessary for now
|
||||
appConfigProxy
|
||||
.getSync()
|
||||
.catch(() => console.error('failed to load app config'));
|
||||
|
||||
mountApp();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user