mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 02:26:21 +08:00
refactor(core): adjust core struct (#8218)
packages/frontend/core/src hooks -> components/hooks atoms -> components/atoms layouts -> components/layouts providers -> components/providers mixpanel -> @affine/track ~~shared~~ ~~unexpected-application-state~~
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import type { useI18n } from '@affine/i18n';
|
||||
import { track } from '@affine/track';
|
||||
import type { DocMode } from '@blocksuite/blocks';
|
||||
import { ImportIcon, PlusIcon } from '@blocksuite/icons/rc';
|
||||
|
||||
import type { usePageHelper } from '../components/blocksuite/block-suite-page-list/utils';
|
||||
import { track } from '../mixpanel';
|
||||
import type { CreateWorkspaceDialogService } from '../modules/create-workspace';
|
||||
import { registerAffineCommand } from './registry';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { useI18n } from '@affine/i18n';
|
||||
import { track } from '@affine/track';
|
||||
import { ContactWithUsIcon, NewIcon } from '@blocksuite/icons/rc';
|
||||
import type { createStore } from 'jotai';
|
||||
|
||||
import { openSettingModalAtom } from '../atoms';
|
||||
import { track } from '../mixpanel';
|
||||
import { openSettingModalAtom } from '../components/atoms';
|
||||
import { popupWindow } from '../utils';
|
||||
import { registerAffineCommand } from './registry';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { useI18n } from '@affine/i18n';
|
||||
import { track } from '@affine/track';
|
||||
import { SidebarIcon } from '@blocksuite/icons/rc';
|
||||
import type { createStore } from 'jotai';
|
||||
|
||||
import { appSidebarOpenAtom } from '../components/app-sidebar';
|
||||
import { track } from '../mixpanel';
|
||||
import { registerAffineCommand } from './registry';
|
||||
|
||||
export function registerAffineLayoutCommands({
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { WorkspaceSubPath } from '@affine/core/shared';
|
||||
import type { useI18n } from '@affine/i18n';
|
||||
import { track } from '@affine/track';
|
||||
import { ArrowRightBigIcon } from '@blocksuite/icons/rc';
|
||||
import type { DocCollection } from '@blocksuite/store';
|
||||
import type { createStore } from 'jotai';
|
||||
|
||||
import { openSettingModalAtom, openWorkspaceListModalAtom } from '../atoms';
|
||||
import type { useNavigateHelper } from '../hooks/use-navigate-helper';
|
||||
import { track } from '../mixpanel';
|
||||
import {
|
||||
openSettingModalAtom,
|
||||
openWorkspaceListModalAtom,
|
||||
} from '../components/atoms';
|
||||
import type { useNavigateHelper } from '../components/hooks/use-navigate-helper';
|
||||
import { registerAffineCommand } from './registry';
|
||||
|
||||
export function registerAffineNavigationCommands({
|
||||
@@ -32,7 +34,7 @@ export function registerAffineNavigationCommands({
|
||||
to: 'allDocs',
|
||||
});
|
||||
|
||||
navigationHelper.jumpToSubPath(docCollection.id, WorkspaceSubPath.ALL);
|
||||
navigationHelper.jumpToPage(docCollection.id, 'all');
|
||||
},
|
||||
})
|
||||
);
|
||||
@@ -129,10 +131,7 @@ export function registerAffineNavigationCommands({
|
||||
to: 'trash',
|
||||
});
|
||||
|
||||
navigationHelper.jumpToSubPath(
|
||||
docCollection.id,
|
||||
WorkspaceSubPath.TRASH
|
||||
);
|
||||
navigationHelper.jumpToPage(docCollection.id, 'trash');
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { useI18n } from '@affine/i18n';
|
||||
import { track } from '@affine/track';
|
||||
import { SettingsIcon } from '@blocksuite/icons/rc';
|
||||
import { appSettingAtom } from '@toeverything/infra';
|
||||
import type { createStore } from 'jotai';
|
||||
import type { useTheme } from 'next-themes';
|
||||
|
||||
import type { useLanguageHelper } from '../hooks/affine/use-language-helper';
|
||||
import { track } from '../mixpanel';
|
||||
import type { useLanguageHelper } from '../components/hooks/affine/use-language-helper';
|
||||
import type { EditorSettingService } from '../modules/editor-settting';
|
||||
import { registerAffineCommand } from './registry';
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { notify } from '@affine/component';
|
||||
import { updateReadyAtom } from '@affine/core/hooks/use-app-updater';
|
||||
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';
|
||||
import type { createStore } from 'jotai';
|
||||
|
||||
import { track } from '../mixpanel';
|
||||
import { registerAffineCommand } from './registry';
|
||||
|
||||
export function registerAffineUpdatesCommands({
|
||||
|
||||
Reference in New Issue
Block a user