Открыть боковую панель
Медведев Антон Павлович
universo-react
Коммиты
4f4d057a
Не подтверждена
Коммит
4f4d057a
создал
Янв 16, 2024
по автору
JimmFly
Просмотр файлов
refactor(core): replace WorkspaceSubPath in env package with the one in core package (#5537)
владелец
238d1ad4
Изменения
16
Скрыть пробелы
Построчно
Рядом
packages/common/env/src/workspace.ts
Просмотр файла @
4f4d057a
export
enum
WorkspaceSubPath
{
ALL
=
'
all
'
,
Collection
=
'
collection
'
,
SETTING
=
'
setting
'
,
TRASH
=
'
trash
'
,
SHARED
=
'
shared
'
,
}
export
enum
WorkspaceFlavour
{
export
enum
WorkspaceFlavour
{
/**
/**
* New AFFiNE Cloud Workspace using Nest.js Server.
* New AFFiNE Cloud Workspace using Nest.js Server.
...
...
packages/frontend/core/src/commands/affine-navigation.tsx
Просмотр файла @
4f4d057a
import
{
WorkspaceSubPath
}
from
'
@affine/core/shared
'
;
import
type
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
type
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
ArrowRightBigIcon
}
from
'
@blocksuite/icons
'
;
import
{
ArrowRightBigIcon
}
from
'
@blocksuite/icons
'
;
import
type
{
Workspace
}
from
'
@blocksuite/store
'
;
import
type
{
Workspace
}
from
'
@blocksuite/store
'
;
...
@@ -10,7 +11,6 @@ import {
...
@@ -10,7 +11,6 @@ import {
type
PageModeOption
,
type
PageModeOption
,
}
from
'
../atoms
'
;
}
from
'
../atoms
'
;
import
type
{
useNavigateHelper
}
from
'
../hooks/use-navigate-helper
'
;
import
type
{
useNavigateHelper
}
from
'
../hooks/use-navigate-helper
'
;
import
{
WorkspaceSubPath
}
from
'
../shared
'
;
export
function
registerAffineNavigationCommands
({
export
function
registerAffineNavigationCommands
({
t
,
t
,
...
...
packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/delete-leave-workspace/index.tsx
Просмотр файла @
4f4d057a
...
@@ -7,7 +7,7 @@ import {
...
@@ -7,7 +7,7 @@ import {
workspaceListAtom
,
workspaceListAtom
,
workspaceManagerAtom
,
workspaceManagerAtom
,
}
from
'
@affine/core/modules/workspace
'
;
}
from
'
@affine/core/modules/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
env/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
core/shared
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
ArrowRightSmallIcon
}
from
'
@blocksuite/icons
'
;
import
{
ArrowRightSmallIcon
}
from
'
@blocksuite/icons
'
;
import
{
useAtomValue
,
useSetAtom
}
from
'
jotai
'
;
import
{
useAtomValue
,
useSetAtom
}
from
'
jotai
'
;
...
...
packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/enable-cloud.tsx
Просмотр файла @
4f4d057a
...
@@ -3,8 +3,9 @@ import { Button } from '@affine/component/ui/button';
...
@@ -3,8 +3,9 @@ import { Button } from '@affine/component/ui/button';
import
{
useAsyncCallback
}
from
'
@affine/core/hooks/affine-async-hooks
'
;
import
{
useAsyncCallback
}
from
'
@affine/core/hooks/affine-async-hooks
'
;
import
{
useWorkspaceInfo
}
from
'
@affine/core/hooks/use-workspace-info
'
;
import
{
useWorkspaceInfo
}
from
'
@affine/core/hooks/use-workspace-info
'
;
import
{
workspaceManagerAtom
}
from
'
@affine/core/modules/workspace
'
;
import
{
workspaceManagerAtom
}
from
'
@affine/core/modules/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/core/shared
'
;
import
{
UNTITLED_WORKSPACE_NAME
}
from
'
@affine/env/constant
'
;
import
{
UNTITLED_WORKSPACE_NAME
}
from
'
@affine/env/constant
'
;
import
{
WorkspaceFlavour
,
WorkspaceSubPath
}
from
'
@affine/env/workspace
'
;
import
{
WorkspaceFlavour
}
from
'
@affine/env/workspace
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
type
{
Workspace
}
from
'
@affine/workspace
'
;
import
type
{
Workspace
}
from
'
@affine/workspace
'
;
import
{
useAtomValue
,
useSetAtom
}
from
'
jotai
'
;
import
{
useAtomValue
,
useSetAtom
}
from
'
jotai
'
;
...
...
packages/frontend/core/src/components/blocksuite/block-suite-page-list/utils.tsx
Просмотр файла @
4f4d057a
...
@@ -2,7 +2,7 @@ import { toast } from '@affine/component';
...
@@ -2,7 +2,7 @@ import { toast } from '@affine/component';
import
{
useAsyncCallback
}
from
'
@affine/core/hooks/affine-async-hooks
'
;
import
{
useAsyncCallback
}
from
'
@affine/core/hooks/affine-async-hooks
'
;
import
{
usePageMetaHelper
}
from
'
@affine/core/hooks/use-block-suite-page-meta
'
;
import
{
usePageMetaHelper
}
from
'
@affine/core/hooks/use-block-suite-page-meta
'
;
import
{
useBlockSuiteWorkspaceHelper
}
from
'
@affine/core/hooks/use-block-suite-workspace-helper
'
;
import
{
useBlockSuiteWorkspaceHelper
}
from
'
@affine/core/hooks/use-block-suite-workspace-helper
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
env/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
core/shared
'
;
import
{
initEmptyPage
}
from
'
@toeverything/infra/blocksuite
'
;
import
{
initEmptyPage
}
from
'
@toeverything/infra/blocksuite
'
;
import
{
useAtomValue
,
useSetAtom
}
from
'
jotai
'
;
import
{
useAtomValue
,
useSetAtom
}
from
'
jotai
'
;
import
{
useCallback
,
useMemo
}
from
'
react
'
;
import
{
useCallback
,
useMemo
}
from
'
react
'
;
...
...
packages/frontend/core/src/components/pure/cmdk/data.tsx
Просмотр файла @
4f4d057a
...
@@ -7,6 +7,7 @@ import {
...
@@ -7,6 +7,7 @@ import {
currentWorkspaceAtom
,
currentWorkspaceAtom
,
waitForCurrentWorkspaceAtom
,
waitForCurrentWorkspaceAtom
,
}
from
'
@affine/core/modules/workspace
'
;
}
from
'
@affine/core/modules/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/core/shared
'
;
import
type
{
Collection
}
from
'
@affine/env/filter
'
;
import
type
{
Collection
}
from
'
@affine/env/filter
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
EdgelessIcon
,
PageIcon
,
ViewLayersIcon
}
from
'
@blocksuite/icons
'
;
import
{
EdgelessIcon
,
PageIcon
,
ViewLayersIcon
}
from
'
@blocksuite/icons
'
;
...
@@ -31,7 +32,6 @@ import {
...
@@ -31,7 +32,6 @@ import {
import
{
collectionsCRUDAtom
}
from
'
../../../atoms/collections
'
;
import
{
collectionsCRUDAtom
}
from
'
../../../atoms/collections
'
;
import
{
currentPageIdAtom
}
from
'
../../../atoms/mode
'
;
import
{
currentPageIdAtom
}
from
'
../../../atoms/mode
'
;
import
{
useNavigateHelper
}
from
'
../../../hooks/use-navigate-helper
'
;
import
{
useNavigateHelper
}
from
'
../../../hooks/use-navigate-helper
'
;
import
{
WorkspaceSubPath
}
from
'
../../../shared
'
;
import
{
usePageHelper
}
from
'
../../blocksuite/block-suite-page-list/utils
'
;
import
{
usePageHelper
}
from
'
../../blocksuite/block-suite-page-list/utils
'
;
import
type
{
CMDKCommand
,
CommandContext
}
from
'
./types
'
;
import
type
{
CMDKCommand
,
CommandContext
}
from
'
./types
'
;
...
...
packages/frontend/core/src/components/pure/trash-page-footer/index.tsx
Просмотр файла @
4f4d057a
...
@@ -3,7 +3,7 @@ import { ConfirmModal } from '@affine/component/ui/modal';
...
@@ -3,7 +3,7 @@ import { ConfirmModal } from '@affine/component/ui/modal';
import
{
Tooltip
}
from
'
@affine/component/ui/tooltip
'
;
import
{
Tooltip
}
from
'
@affine/component/ui/tooltip
'
;
import
{
useBlockSuitePageMeta
}
from
'
@affine/core/hooks/use-block-suite-page-meta
'
;
import
{
useBlockSuitePageMeta
}
from
'
@affine/core/hooks/use-block-suite-page-meta
'
;
import
{
waitForCurrentWorkspaceAtom
}
from
'
@affine/core/modules/workspace
'
;
import
{
waitForCurrentWorkspaceAtom
}
from
'
@affine/core/modules/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
env/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
core/shared
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
assertExists
}
from
'
@blocksuite/global/utils
'
;
import
{
assertExists
}
from
'
@blocksuite/global/utils
'
;
import
{
DeleteIcon
,
ResetIcon
}
from
'
@blocksuite/icons
'
;
import
{
DeleteIcon
,
ResetIcon
}
from
'
@blocksuite/icons
'
;
...
...
packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/workspace-list/index.tsx
Просмотр файла @
4f4d057a
...
@@ -9,7 +9,8 @@ import {
...
@@ -9,7 +9,8 @@ import {
currentWorkspaceAtom
,
currentWorkspaceAtom
,
workspaceListAtom
,
workspaceListAtom
,
}
from
'
@affine/core/modules/workspace
'
;
}
from
'
@affine/core/modules/workspace
'
;
import
{
WorkspaceFlavour
,
WorkspaceSubPath
}
from
'
@affine/env/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/core/shared
'
;
import
{
WorkspaceFlavour
}
from
'
@affine/env/workspace
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
type
{
WorkspaceMetadata
}
from
'
@affine/workspace
'
;
import
type
{
WorkspaceMetadata
}
from
'
@affine/workspace
'
;
import
type
{
DragEndEvent
}
from
'
@dnd-kit/core
'
;
import
type
{
DragEndEvent
}
from
'
@dnd-kit/core
'
;
...
...
packages/frontend/core/src/components/root-app-sidebar/index.tsx
Просмотр файла @
4f4d057a
...
@@ -14,8 +14,8 @@ import {
...
@@ -14,8 +14,8 @@ import {
import
{
Menu
}
from
'
@affine/component/ui/menu
'
;
import
{
Menu
}
from
'
@affine/component/ui/menu
'
;
import
{
collectionsCRUDAtom
}
from
'
@affine/core/atoms/collections
'
;
import
{
collectionsCRUDAtom
}
from
'
@affine/core/atoms/collections
'
;
import
{
useAsyncCallback
}
from
'
@affine/core/hooks/affine-async-hooks
'
;
import
{
useAsyncCallback
}
from
'
@affine/core/hooks/affine-async-hooks
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/core/shared
'
;
import
{
apis
,
events
}
from
'
@affine/electron-api
'
;
import
{
apis
,
events
}
from
'
@affine/electron-api
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/env/workspace
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
type
{
Workspace
}
from
'
@affine/workspace
'
;
import
type
{
Workspace
}
from
'
@affine/workspace
'
;
import
{
FolderIcon
,
SettingsIcon
}
from
'
@blocksuite/icons
'
;
import
{
FolderIcon
,
SettingsIcon
}
from
'
@blocksuite/icons
'
;
...
...
packages/frontend/core/src/components/top-tip.tsx
Просмотр файла @
4f4d057a
...
@@ -2,6 +2,7 @@ import { BrowserWarning } from '@affine/component/affine-banner';
...
@@ -2,6 +2,7 @@ import { BrowserWarning } from '@affine/component/affine-banner';
import
{
LocalDemoTips
}
from
'
@affine/component/affine-banner
'
;
import
{
LocalDemoTips
}
from
'
@affine/component/affine-banner
'
;
import
{
useAsyncCallback
}
from
'
@affine/core/hooks/affine-async-hooks
'
;
import
{
useAsyncCallback
}
from
'
@affine/core/hooks/affine-async-hooks
'
;
import
{
workspaceManagerAtom
}
from
'
@affine/core/modules/workspace
'
;
import
{
workspaceManagerAtom
}
from
'
@affine/core/modules/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/core/shared
'
;
import
{
WorkspaceFlavour
}
from
'
@affine/env/workspace
'
;
import
{
WorkspaceFlavour
}
from
'
@affine/env/workspace
'
;
import
{
Trans
}
from
'
@affine/i18n
'
;
import
{
Trans
}
from
'
@affine/i18n
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
...
@@ -12,7 +13,6 @@ import { useCallback, useState } from 'react';
...
@@ -12,7 +13,6 @@ import { useCallback, useState } from 'react';
import
{
authAtom
}
from
'
../atoms
'
;
import
{
authAtom
}
from
'
../atoms
'
;
import
{
useCurrentLoginStatus
}
from
'
../hooks/affine/use-current-login-status
'
;
import
{
useCurrentLoginStatus
}
from
'
../hooks/affine/use-current-login-status
'
;
import
{
useNavigateHelper
}
from
'
../hooks/use-navigate-helper
'
;
import
{
useNavigateHelper
}
from
'
../hooks/use-navigate-helper
'
;
import
{
WorkspaceSubPath
}
from
'
../shared
'
;
import
{
EnableAffineCloudModal
}
from
'
./affine/enable-affine-cloud-modal
'
;
import
{
EnableAffineCloudModal
}
from
'
./affine/enable-affine-cloud-modal
'
;
const
minimumChromeVersion
=
106
;
const
minimumChromeVersion
=
106
;
...
...
packages/frontend/core/src/components/workspace-upgrade/upgrade.tsx
Просмотр файла @
4f4d057a
...
@@ -7,7 +7,7 @@ import {
...
@@ -7,7 +7,7 @@ import {
waitForCurrentWorkspaceAtom
,
waitForCurrentWorkspaceAtom
,
workspaceManagerAtom
,
workspaceManagerAtom
,
}
from
'
@affine/core/modules/workspace
'
;
}
from
'
@affine/core/modules/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
env/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
core/shared
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
useAFFiNEI18N
}
from
'
@affine/i18n/hooks
'
;
import
{
useAtomValue
}
from
'
jotai
'
;
import
{
useAtomValue
}
from
'
jotai
'
;
import
{
useState
}
from
'
react
'
;
import
{
useState
}
from
'
react
'
;
...
...
packages/frontend/core/src/hooks/use-navigate-helper.ts
Просмотр файла @
4f4d057a
import
type
{
WorkspaceSubPath
}
from
'
@affine/
env/workspace
'
;
import
type
{
WorkspaceSubPath
}
from
'
@affine/
core/shared
'
;
import
{
useCallback
,
useMemo
}
from
'
react
'
;
import
{
useCallback
,
useMemo
}
from
'
react
'
;
import
{
import
{
type
NavigateOptions
,
type
NavigateOptions
,
...
...
packages/frontend/core/src/pages/index.tsx
Просмотр файла @
4f4d057a
import
{
Menu
}
from
'
@affine/component/ui/menu
'
;
import
{
Menu
}
from
'
@affine/component/ui/menu
'
;
import
{
WorkspaceFallback
}
from
'
@affine/component/workspace
'
;
import
{
WorkspaceFallback
}
from
'
@affine/component/workspace
'
;
import
{
workspaceListAtom
}
from
'
@affine/core/modules/workspace
'
;
import
{
workspaceListAtom
}
from
'
@affine/core/modules/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/core/shared
'
;
import
{
useAtomValue
}
from
'
jotai
'
;
import
{
useAtomValue
}
from
'
jotai
'
;
import
{
lazy
,
useEffect
,
useLayoutEffect
,
useState
}
from
'
react
'
;
import
{
lazy
,
useEffect
,
useLayoutEffect
,
useState
}
from
'
react
'
;
import
{
type
LoaderFunction
,
redirect
}
from
'
react-router-dom
'
;
import
{
type
LoaderFunction
,
redirect
}
from
'
react-router-dom
'
;
...
@@ -9,7 +10,6 @@ import { createFirstAppData } from '../bootstrap/first-app-data';
...
@@ -9,7 +10,6 @@ import { createFirstAppData } from '../bootstrap/first-app-data';
import
{
UserWithWorkspaceList
}
from
'
../components/pure/workspace-slider-bar/user-with-workspace-list
'
;
import
{
UserWithWorkspaceList
}
from
'
../components/pure/workspace-slider-bar/user-with-workspace-list
'
;
import
{
appConfigStorage
}
from
'
../hooks/use-app-config-storage
'
;
import
{
appConfigStorage
}
from
'
../hooks/use-app-config-storage
'
;
import
{
useNavigateHelper
}
from
'
../hooks/use-navigate-helper
'
;
import
{
useNavigateHelper
}
from
'
../hooks/use-navigate-helper
'
;
import
{
WorkspaceSubPath
}
from
'
../shared
'
;
const
AllWorkspaceModals
=
lazy
(()
=>
const
AllWorkspaceModals
=
lazy
(()
=>
import
(
'
../providers/modal-provider
'
).
then
(({
AllWorkspaceModals
})
=>
({
import
(
'
../providers/modal-provider
'
).
then
(({
AllWorkspaceModals
})
=>
({
...
...
packages/frontend/core/src/pages/invite.tsx
Просмотр файла @
4f4d057a
import
{
AcceptInvitePage
}
from
'
@affine/component/member-components
'
;
import
{
AcceptInvitePage
}
from
'
@affine/component/member-components
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
env/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
core/shared
'
;
import
{
import
{
acceptInviteByInviteIdMutation
,
acceptInviteByInviteIdMutation
,
type
GetInviteInfoQuery
,
type
GetInviteInfoQuery
,
...
...
packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx
Просмотр файла @
4f4d057a
...
@@ -3,7 +3,7 @@ import { ResizePanel } from '@affine/component/resize-panel';
...
@@ -3,7 +3,7 @@ import { ResizePanel } from '@affine/component/resize-panel';
import
{
useBlockSuitePageMeta
}
from
'
@affine/core/hooks/use-block-suite-page-meta
'
;
import
{
useBlockSuitePageMeta
}
from
'
@affine/core/hooks/use-block-suite-page-meta
'
;
import
{
useWorkspaceStatus
}
from
'
@affine/core/hooks/use-workspace-status
'
;
import
{
useWorkspaceStatus
}
from
'
@affine/core/hooks/use-workspace-status
'
;
import
{
waitForCurrentWorkspaceAtom
}
from
'
@affine/core/modules/workspace
'
;
import
{
waitForCurrentWorkspaceAtom
}
from
'
@affine/core/modules/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
env/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/
core/shared
'
;
import
{
globalBlockSuiteSchema
,
SyncEngineStep
}
from
'
@affine/workspace
'
;
import
{
globalBlockSuiteSchema
,
SyncEngineStep
}
from
'
@affine/workspace
'
;
import
type
{
AffineEditorContainer
}
from
'
@blocksuite/presets
'
;
import
type
{
AffineEditorContainer
}
from
'
@blocksuite/presets
'
;
import
type
{
Page
,
Workspace
}
from
'
@blocksuite/store
'
;
import
type
{
Page
,
Workspace
}
from
'
@blocksuite/store
'
;
...
...
packages/frontend/core/src/providers/modal-provider.tsx
Просмотр файла @
4f4d057a
...
@@ -3,7 +3,8 @@ import {
...
@@ -3,7 +3,8 @@ import {
waitForCurrentWorkspaceAtom
,
waitForCurrentWorkspaceAtom
,
workspaceListAtom
,
workspaceListAtom
,
}
from
'
@affine/core/modules/workspace
'
;
}
from
'
@affine/core/modules/workspace
'
;
import
{
WorkspaceFlavour
,
WorkspaceSubPath
}
from
'
@affine/env/workspace
'
;
import
{
WorkspaceSubPath
}
from
'
@affine/core/shared
'
;
import
{
WorkspaceFlavour
}
from
'
@affine/env/workspace
'
;
import
{
assertExists
}
from
'
@blocksuite/global/utils
'
;
import
{
assertExists
}
from
'
@blocksuite/global/utils
'
;
import
{
useAtom
,
useAtomValue
}
from
'
jotai
'
;
import
{
useAtom
,
useAtomValue
}
from
'
jotai
'
;
import
type
{
ReactElement
}
from
'
react
'
;
import
type
{
ReactElement
}
from
'
react
'
;
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать