From 92d5f8f7c9cb0608aea955fc0da510e827a95617 Mon Sep 17 00:00:00 2001 From: han Date: Mon, 9 Jan 2023 13:50:27 +0800 Subject: [PATCH] chore: components file name unify --- .../src/components/contact-modal/{icons.tsx => Icons.tsx} | 0 packages/app/src/components/contact-modal/index.tsx | 2 +- .../components/edgeless-toolbar/{icons.tsx => Icons.tsx} | 0 packages/app/src/components/edgeless-toolbar/index.tsx | 2 +- .../editor-mode-switch/{icons.tsx => Icons.tsx} | 0 packages/app/src/components/editor-mode-switch/index.tsx | 4 ++-- .../header/{editor-header.tsx => EditorHeader.tsx} | 4 ++-- .../app/src/components/header/{header.tsx => Header.tsx} | 6 +++--- .../header/{page-list-header.tsx => PageListHeader.tsx} | 4 ++-- .../{quick-search-button.tsx => QuickSearchButton.tsx} | 2 +- .../{editor-option-menu.tsx => EditorOptionMenu.tsx} | 2 +- .../header-right-items/{sync-user.tsx => SyncUser.tsx} | 2 +- .../{trash-button-group.tsx => TrashButtonGroup.tsx} | 2 +- .../theme-mode-switch/{icons.tsx => Icons.tsx} | 0 .../header/header-right-items/theme-mode-switch/index.tsx | 4 ++-- packages/app/src/components/header/index.tsx | 6 +++--- .../src/components/help-island/{icons.tsx => Icons.tsx} | 0 packages/app/src/components/help-island/index.tsx | 6 +++--- .../src/components/loading/{loading.tsx => Loading.tsx} | 0 .../loading/{page-loading.tsx => PageLoading.tsx} | 2 +- packages/app/src/components/loading/index.tsx | 4 ++-- .../src/components/login-modal/{icons.tsx => Icons.tsx} | 0 .../app/src/components/login-modal/LoginOptionButton.tsx | 4 ++-- .../components/page-list/{date-cell.tsx => DateCell.tsx} | 0 .../app/src/components/page-list/{empty.tsx => Empty.tsx} | 0 .../page-list/{operation-cell.tsx => OperationCell.tsx} | 2 +- packages/app/src/components/page-list/index.tsx | 8 ++++---- .../components/quick-search/{footer.tsx => Footer.tsx} | 2 +- .../src/components/quick-search/{input.tsx => Input.tsx} | 0 .../quick-search/{noResultSVG.tsx => NoResultSVG.tsx} | 0 .../components/quick-search/{results.tsx => Results.tsx} | 4 ++-- packages/app/src/components/quick-search/index.tsx | 8 ++++---- .../components/shortcuts-modal/{icons.tsx => Icons.tsx} | 0 packages/app/src/components/shortcuts-modal/index.tsx | 2 +- .../{workspace-setting.tsx => WorkspaceSetting.tsx} | 0 .../general/{general.tsx => General.tsx} | 0 .../general/delete/{delete.tsx => Delete.tsx} | 0 .../components/workspace-setting/general/delete/index.ts | 2 +- .../app/src/components/workspace-setting/general/index.ts | 2 +- .../general/leave/{leave.tsx => Leave.tsx} | 0 .../components/workspace-setting/general/leave/index.ts | 2 +- packages/app/src/components/workspace-setting/index.ts | 2 +- .../WorkspaceSelector/SelectorPopperContent.tsx | 2 +- .../{workspace-create.tsx => WorkspaceCreate.tsx} | 0 .../CreateWorkspaceItem/workspace-create/index.ts | 2 +- .../WorkspaceSelector/WorkspaceItem/LoginItem.tsx | 4 ++-- .../WorkspaceSelector/WorkspaceSelector.tsx | 2 +- .../workspace-slider-bar/icons/{icons.tsx => Icons.tsx} | 0 .../app/src/components/workspace-slider-bar/index.tsx | 2 +- packages/app/src/pages/_app.tsx | 8 ++++---- .../{confirm-provider.tsx => ConfirmProvider.tsx} | 0 ...{global-modal-provider.tsx => GlobalModalProvider.tsx} | 0 .../providers/{themeProvider.tsx => ThemeProvider.tsx} | 0 .../{dynamic-blocksuite.tsx => DynamicBlocksuite.tsx} | 0 .../app-state-provider/{provider.tsx => Provider.tsx} | 2 +- 55 files changed, 56 insertions(+), 56 deletions(-) rename packages/app/src/components/contact-modal/{icons.tsx => Icons.tsx} (100%) rename packages/app/src/components/edgeless-toolbar/{icons.tsx => Icons.tsx} (100%) rename packages/app/src/components/editor-mode-switch/{icons.tsx => Icons.tsx} (100%) rename packages/app/src/components/header/{editor-header.tsx => EditorHeader.tsx} (96%) rename packages/app/src/components/header/{header.tsx => Header.tsx} (90%) rename packages/app/src/components/header/{page-list-header.tsx => PageListHeader.tsx} (85%) rename packages/app/src/components/header/{quick-search-button.tsx => QuickSearchButton.tsx} (92%) rename packages/app/src/components/header/header-right-items/{editor-option-menu.tsx => EditorOptionMenu.tsx} (98%) rename packages/app/src/components/header/header-right-items/{sync-user.tsx => SyncUser.tsx} (90%) rename packages/app/src/components/header/header-right-items/{trash-button-group.tsx => TrashButtonGroup.tsx} (96%) rename packages/app/src/components/header/header-right-items/theme-mode-switch/{icons.tsx => Icons.tsx} (100%) rename packages/app/src/components/help-island/{icons.tsx => Icons.tsx} (100%) rename packages/app/src/components/loading/{loading.tsx => Loading.tsx} (100%) rename packages/app/src/components/loading/{page-loading.tsx => PageLoading.tsx} (95%) rename packages/app/src/components/login-modal/{icons.tsx => Icons.tsx} (100%) rename packages/app/src/components/page-list/{date-cell.tsx => DateCell.tsx} (100%) rename packages/app/src/components/page-list/{empty.tsx => Empty.tsx} (100%) rename packages/app/src/components/page-list/{operation-cell.tsx => OperationCell.tsx} (98%) rename packages/app/src/components/quick-search/{footer.tsx => Footer.tsx} (94%) rename packages/app/src/components/quick-search/{input.tsx => Input.tsx} (100%) rename packages/app/src/components/quick-search/{noResultSVG.tsx => NoResultSVG.tsx} (100%) rename packages/app/src/components/quick-search/{results.tsx => Results.tsx} (97%) rename packages/app/src/components/shortcuts-modal/{icons.tsx => Icons.tsx} (100%) rename packages/app/src/components/workspace-setting/{workspace-setting.tsx => WorkspaceSetting.tsx} (100%) rename packages/app/src/components/workspace-setting/general/{general.tsx => General.tsx} (100%) rename packages/app/src/components/workspace-setting/general/delete/{delete.tsx => Delete.tsx} (100%) rename packages/app/src/components/workspace-setting/general/leave/{leave.tsx => Leave.tsx} (100%) rename packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/CreateWorkspaceItem/workspace-create/{workspace-create.tsx => WorkspaceCreate.tsx} (100%) rename packages/app/src/components/workspace-slider-bar/icons/{icons.tsx => Icons.tsx} (100%) rename packages/app/src/providers/{confirm-provider.tsx => ConfirmProvider.tsx} (100%) rename packages/app/src/providers/{global-modal-provider.tsx => GlobalModalProvider.tsx} (100%) rename packages/app/src/providers/{themeProvider.tsx => ThemeProvider.tsx} (100%) rename packages/app/src/providers/app-state-provider/{dynamic-blocksuite.tsx => DynamicBlocksuite.tsx} (100%) rename packages/app/src/providers/app-state-provider/{provider.tsx => Provider.tsx} (98%) diff --git a/packages/app/src/components/contact-modal/icons.tsx b/packages/app/src/components/contact-modal/Icons.tsx similarity index 100% rename from packages/app/src/components/contact-modal/icons.tsx rename to packages/app/src/components/contact-modal/Icons.tsx diff --git a/packages/app/src/components/contact-modal/index.tsx b/packages/app/src/components/contact-modal/index.tsx index 921b34ba65..0cb97f1176 100644 --- a/packages/app/src/components/contact-modal/index.tsx +++ b/packages/app/src/components/contact-modal/index.tsx @@ -8,7 +8,7 @@ import { TelegramIcon, RedditIcon, LinkIcon, -} from './icons'; +} from './Icons'; import logo from './affine-text-logo.png'; import { StyledBigLink, diff --git a/packages/app/src/components/edgeless-toolbar/icons.tsx b/packages/app/src/components/edgeless-toolbar/Icons.tsx similarity index 100% rename from packages/app/src/components/edgeless-toolbar/icons.tsx rename to packages/app/src/components/edgeless-toolbar/Icons.tsx diff --git a/packages/app/src/components/edgeless-toolbar/index.tsx b/packages/app/src/components/edgeless-toolbar/index.tsx index c44f6396ca..c6f880146d 100644 --- a/packages/app/src/components/edgeless-toolbar/index.tsx +++ b/packages/app/src/components/edgeless-toolbar/index.tsx @@ -13,7 +13,7 @@ import { ConnectorIcon, UndoIcon, RedoIcon, -} from './icons'; +} from './Icons'; import { Tooltip } from '@/ui/tooltip'; import Slide from '@mui/material/Slide'; import useCurrentPageMeta from '@/hooks/use-current-page-meta'; diff --git a/packages/app/src/components/editor-mode-switch/icons.tsx b/packages/app/src/components/editor-mode-switch/Icons.tsx similarity index 100% rename from packages/app/src/components/editor-mode-switch/icons.tsx rename to packages/app/src/components/editor-mode-switch/Icons.tsx diff --git a/packages/app/src/components/editor-mode-switch/index.tsx b/packages/app/src/components/editor-mode-switch/index.tsx index 86a54d8606..2e8ccfdcf2 100644 --- a/packages/app/src/components/editor-mode-switch/index.tsx +++ b/packages/app/src/components/editor-mode-switch/index.tsx @@ -11,8 +11,8 @@ import type { AnimateRadioProps, AnimateRadioItemProps, } from './type'; -import { useTheme } from '@/providers/themeProvider'; -import { EdgelessIcon, PaperIcon } from './icons'; +import { useTheme } from '@/providers/ThemeProvider'; +import { EdgelessIcon, PaperIcon } from './Icons'; import useCurrentPageMeta from '@/hooks/use-current-page-meta'; import { usePageHelper } from '@/hooks/use-page-helper'; import { useTranslation } from 'react-i18next'; diff --git a/packages/app/src/components/header/editor-header.tsx b/packages/app/src/components/header/EditorHeader.tsx similarity index 96% rename from packages/app/src/components/header/editor-header.tsx rename to packages/app/src/components/header/EditorHeader.tsx index 7f433de467..b343179496 100644 --- a/packages/app/src/components/header/editor-header.tsx +++ b/packages/app/src/components/header/EditorHeader.tsx @@ -8,8 +8,8 @@ import { import { Content } from '@/ui/layout'; import { useAppState } from '@/providers/app-state-provider/context'; import EditorModeSwitch from '@/components/editor-mode-switch'; -import QuickSearchButton from './quick-search-button'; -import Header from './header'; +import QuickSearchButton from './QuickSearchButton'; +import Header from './Header'; import usePropsUpdated from '@/hooks/use-props-updated'; import useCurrentPageMeta from '@/hooks/use-current-page-meta'; diff --git a/packages/app/src/components/header/header.tsx b/packages/app/src/components/header/Header.tsx similarity index 90% rename from packages/app/src/components/header/header.tsx rename to packages/app/src/components/header/Header.tsx index 919d89d7be..9db8149d5e 100644 --- a/packages/app/src/components/header/header.tsx +++ b/packages/app/src/components/header/Header.tsx @@ -8,10 +8,10 @@ import { } from './styles'; import CloseIcon from '@mui/icons-material/Close'; import { getWarningMessage, shouldShowWarning } from './utils'; -import EditorOptionMenu from './header-right-items/editor-option-menu'; -import TrashButtonGroup from './header-right-items/trash-button-group'; +import EditorOptionMenu from './header-right-items/EditorOptionMenu'; +import TrashButtonGroup from './header-right-items/TrashButtonGroup'; import ThemeModeSwitch from './header-right-items/theme-mode-switch'; -import SyncUser from './header-right-items/sync-user'; +import SyncUser from './header-right-items/SyncUser'; const BrowserWarning = ({ show, diff --git a/packages/app/src/components/header/page-list-header.tsx b/packages/app/src/components/header/PageListHeader.tsx similarity index 85% rename from packages/app/src/components/header/page-list-header.tsx rename to packages/app/src/components/header/PageListHeader.tsx index 452061fbd4..43a1c976b9 100644 --- a/packages/app/src/components/header/page-list-header.tsx +++ b/packages/app/src/components/header/PageListHeader.tsx @@ -1,7 +1,7 @@ import { PropsWithChildren, ReactNode } from 'react'; -import Header from './header'; +import Header from './Header'; import { StyledPageListTittleWrapper } from './styles'; -import QuickSearchButton from './quick-search-button'; +import QuickSearchButton from './QuickSearchButton'; export type PageListHeaderProps = PropsWithChildren<{ icon?: ReactNode; diff --git a/packages/app/src/components/header/quick-search-button.tsx b/packages/app/src/components/header/QuickSearchButton.tsx similarity index 92% rename from packages/app/src/components/header/quick-search-button.tsx rename to packages/app/src/components/header/QuickSearchButton.tsx index e45e78fed4..0c1732adb1 100644 --- a/packages/app/src/components/header/quick-search-button.tsx +++ b/packages/app/src/components/header/QuickSearchButton.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { IconButton, IconButtonProps } from '@/ui/button'; import { Tooltip } from '@/ui/tooltip'; import { ArrowDownIcon } from '@blocksuite/icons'; -import { useModal } from '@/providers/global-modal-provider'; +import { useModal } from '@/providers/GlobalModalProvider'; import { useTranslation } from 'react-i18next'; export const QuickSearchButton = ({ onClick, diff --git a/packages/app/src/components/header/header-right-items/editor-option-menu.tsx b/packages/app/src/components/header/header-right-items/EditorOptionMenu.tsx similarity index 98% rename from packages/app/src/components/header/header-right-items/editor-option-menu.tsx rename to packages/app/src/components/header/header-right-items/EditorOptionMenu.tsx index cfd2813de5..db3e1751f4 100644 --- a/packages/app/src/components/header/header-right-items/editor-option-menu.tsx +++ b/packages/app/src/components/header/header-right-items/EditorOptionMenu.tsx @@ -13,7 +13,7 @@ import { } from '@blocksuite/icons'; import { useAppState } from '@/providers/app-state-provider'; import { usePageHelper } from '@/hooks/use-page-helper'; -import { useConfirm } from '@/providers/confirm-provider'; +import { useConfirm } from '@/providers/ConfirmProvider'; import useCurrentPageMeta from '@/hooks/use-current-page-meta'; import { toast } from '@/ui/toast'; import { useTranslation } from 'react-i18next'; diff --git a/packages/app/src/components/header/header-right-items/sync-user.tsx b/packages/app/src/components/header/header-right-items/SyncUser.tsx similarity index 90% rename from packages/app/src/components/header/header-right-items/sync-user.tsx rename to packages/app/src/components/header/header-right-items/SyncUser.tsx index 3d7fba5299..86c85926bf 100644 --- a/packages/app/src/components/header/header-right-items/sync-user.tsx +++ b/packages/app/src/components/header/header-right-items/SyncUser.tsx @@ -1,5 +1,5 @@ import { CloudUnsyncedIcon, CloudInsyncIcon } from '@blocksuite/icons'; -import { useModal } from '@/providers/global-modal-provider'; +import { useModal } from '@/providers/GlobalModalProvider'; import { useAppState } from '@/providers/app-state-provider/context'; import { IconButton } from '@/ui/button'; diff --git a/packages/app/src/components/header/header-right-items/trash-button-group.tsx b/packages/app/src/components/header/header-right-items/TrashButtonGroup.tsx similarity index 96% rename from packages/app/src/components/header/header-right-items/trash-button-group.tsx rename to packages/app/src/components/header/header-right-items/TrashButtonGroup.tsx index 02345e9680..df12327131 100644 --- a/packages/app/src/components/header/header-right-items/trash-button-group.tsx +++ b/packages/app/src/components/header/header-right-items/TrashButtonGroup.tsx @@ -1,7 +1,7 @@ import { Button } from '@/ui/button'; import { usePageHelper } from '@/hooks/use-page-helper'; import { useAppState } from '@/providers/app-state-provider'; -import { useConfirm } from '@/providers/confirm-provider'; +import { useConfirm } from '@/providers/ConfirmProvider'; import { useRouter } from 'next/router'; import useCurrentPageMeta from '@/hooks/use-current-page-meta'; diff --git a/packages/app/src/components/header/header-right-items/theme-mode-switch/icons.tsx b/packages/app/src/components/header/header-right-items/theme-mode-switch/Icons.tsx similarity index 100% rename from packages/app/src/components/header/header-right-items/theme-mode-switch/icons.tsx rename to packages/app/src/components/header/header-right-items/theme-mode-switch/Icons.tsx diff --git a/packages/app/src/components/header/header-right-items/theme-mode-switch/index.tsx b/packages/app/src/components/header/header-right-items/theme-mode-switch/index.tsx index 20f6c86bdb..c1d842e23f 100644 --- a/packages/app/src/components/header/header-right-items/theme-mode-switch/index.tsx +++ b/packages/app/src/components/header/header-right-items/theme-mode-switch/index.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; -import { useTheme } from '@/providers/themeProvider'; -import { MoonIcon, SunIcon } from './icons'; +import { useTheme } from '@/providers/ThemeProvider'; +import { MoonIcon, SunIcon } from './Icons'; import { StyledThemeModeSwitch, StyledSwitchItem } from './style'; export const ThemeModeSwitch = () => { diff --git a/packages/app/src/components/header/index.tsx b/packages/app/src/components/header/index.tsx index d31b8f7abb..8af7382af6 100644 --- a/packages/app/src/components/header/index.tsx +++ b/packages/app/src/components/header/index.tsx @@ -1,3 +1,3 @@ -export * from './header'; -export * from './editor-header'; -export * from './page-list-header'; +export * from './Header'; +export * from './EditorHeader'; +export * from './PageListHeader'; diff --git a/packages/app/src/components/help-island/icons.tsx b/packages/app/src/components/help-island/Icons.tsx similarity index 100% rename from packages/app/src/components/help-island/icons.tsx rename to packages/app/src/components/help-island/Icons.tsx diff --git a/packages/app/src/components/help-island/index.tsx b/packages/app/src/components/help-island/index.tsx index 64ef678d8c..b904cefb5c 100644 --- a/packages/app/src/components/help-island/index.tsx +++ b/packages/app/src/components/help-island/index.tsx @@ -5,12 +5,12 @@ import { StyledIslandWrapper, StyledTransformIcon, } from './style'; -import { CloseIcon, ContactIcon, HelpIcon, KeyboardIcon } from './icons'; +import { CloseIcon, ContactIcon, HelpIcon, KeyboardIcon } from './Icons'; import Grow from '@mui/material/Grow'; import { Tooltip } from '@/ui/tooltip'; import { useTranslation } from 'react-i18next'; -import { useModal } from '@/providers/global-modal-provider'; -import { useTheme } from '@/providers/themeProvider'; +import { useModal } from '@/providers/GlobalModalProvider'; +import { useTheme } from '@/providers/ThemeProvider'; import useCurrentPageMeta from '@/hooks/use-current-page-meta'; export type IslandItemNames = 'contact' | 'shortcuts'; export const HelpIsland = ({ diff --git a/packages/app/src/components/loading/loading.tsx b/packages/app/src/components/loading/Loading.tsx similarity index 100% rename from packages/app/src/components/loading/loading.tsx rename to packages/app/src/components/loading/Loading.tsx diff --git a/packages/app/src/components/loading/page-loading.tsx b/packages/app/src/components/loading/PageLoading.tsx similarity index 95% rename from packages/app/src/components/loading/page-loading.tsx rename to packages/app/src/components/loading/PageLoading.tsx index e4a802fa62..025eba7687 100644 --- a/packages/app/src/components/loading/page-loading.tsx +++ b/packages/app/src/components/loading/PageLoading.tsx @@ -1,5 +1,5 @@ import { styled } from '@/styles'; -import Loading from './loading'; +import Loading from './Loading'; // Used for the full page loading const StyledLoadingContainer = styled('div')(() => { diff --git a/packages/app/src/components/loading/index.tsx b/packages/app/src/components/loading/index.tsx index d435470de9..49aaacec80 100644 --- a/packages/app/src/components/loading/index.tsx +++ b/packages/app/src/components/loading/index.tsx @@ -1,3 +1,3 @@ -import Loading from './loading'; -export * from './page-loading'; +import Loading from './Loading'; +export * from './PageLoading'; export default Loading; diff --git a/packages/app/src/components/login-modal/icons.tsx b/packages/app/src/components/login-modal/Icons.tsx similarity index 100% rename from packages/app/src/components/login-modal/icons.tsx rename to packages/app/src/components/login-modal/Icons.tsx diff --git a/packages/app/src/components/login-modal/LoginOptionButton.tsx b/packages/app/src/components/login-modal/LoginOptionButton.tsx index e04d8fecc7..48c19b0fb5 100644 --- a/packages/app/src/components/login-modal/LoginOptionButton.tsx +++ b/packages/app/src/components/login-modal/LoginOptionButton.tsx @@ -1,8 +1,8 @@ import { getDataCenter } from '@affine/datacenter'; import { styled } from '@/styles'; import { Button } from '@/ui/button'; -import { useModal } from '@/providers/global-modal-provider'; -import { GoogleIcon, StayLogOutIcon } from './icons'; +import { useModal } from '@/providers/GlobalModalProvider'; +import { GoogleIcon, StayLogOutIcon } from './Icons'; export const GoogleLoginButton = () => { const { triggerLoginModal } = useModal(); diff --git a/packages/app/src/components/page-list/date-cell.tsx b/packages/app/src/components/page-list/DateCell.tsx similarity index 100% rename from packages/app/src/components/page-list/date-cell.tsx rename to packages/app/src/components/page-list/DateCell.tsx diff --git a/packages/app/src/components/page-list/empty.tsx b/packages/app/src/components/page-list/Empty.tsx similarity index 100% rename from packages/app/src/components/page-list/empty.tsx rename to packages/app/src/components/page-list/Empty.tsx diff --git a/packages/app/src/components/page-list/operation-cell.tsx b/packages/app/src/components/page-list/OperationCell.tsx similarity index 98% rename from packages/app/src/components/page-list/operation-cell.tsx rename to packages/app/src/components/page-list/OperationCell.tsx index 1b4ec7434a..d72b99b518 100644 --- a/packages/app/src/components/page-list/operation-cell.tsx +++ b/packages/app/src/components/page-list/OperationCell.tsx @@ -1,4 +1,4 @@ -import { useConfirm } from '@/providers/confirm-provider'; +import { useConfirm } from '@/providers/ConfirmProvider'; import { PageMeta } from '@/providers/app-state-provider'; import { Menu, MenuItem } from '@/ui/menu'; import { Wrapper } from '@/ui/layout'; diff --git a/packages/app/src/components/page-list/index.tsx b/packages/app/src/components/page-list/index.tsx index 604d71000f..2d5f13ed58 100644 --- a/packages/app/src/components/page-list/index.tsx +++ b/packages/app/src/components/page-list/index.tsx @@ -12,18 +12,18 @@ import { StyledTitleWrapper, } from './styles'; import { Table, TableBody, TableCell, TableHead, TableRow } from '@/ui/table'; -import { OperationCell, TrashOperationCell } from './operation-cell'; -import Empty from './empty'; +import { OperationCell, TrashOperationCell } from './OperationCell'; +import Empty from './Empty'; import { Content } from '@/ui/layout'; import React from 'react'; -import DateCell from '@/components/page-list/date-cell'; +import DateCell from '@/components/page-list/DateCell'; import { IconButton } from '@/ui/button'; import { Tooltip } from '@/ui/tooltip'; import { useRouter } from 'next/router'; import { useAppState } from '@/providers/app-state-provider/context'; import { toast } from '@/ui/toast'; import { usePageHelper } from '@/hooks/use-page-helper'; -import { useTheme } from '@/providers/themeProvider'; +import { useTheme } from '@/providers/ThemeProvider'; import { useTranslation } from 'react-i18next'; const FavoriteTag = ({ pageMeta: { favorite, id }, diff --git a/packages/app/src/components/quick-search/footer.tsx b/packages/app/src/components/quick-search/Footer.tsx similarity index 94% rename from packages/app/src/components/quick-search/footer.tsx rename to packages/app/src/components/quick-search/Footer.tsx index 48914cda73..59680216f8 100644 --- a/packages/app/src/components/quick-search/footer.tsx +++ b/packages/app/src/components/quick-search/Footer.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { AddIcon } from '@blocksuite/icons'; import { StyledModalFooterContent } from './style'; -import { useModal } from '@/providers/global-modal-provider'; +import { useModal } from '@/providers/GlobalModalProvider'; import { Command } from 'cmdk'; import { usePageHelper } from '@/hooks/use-page-helper'; import { useTranslation } from 'react-i18next'; diff --git a/packages/app/src/components/quick-search/input.tsx b/packages/app/src/components/quick-search/Input.tsx similarity index 100% rename from packages/app/src/components/quick-search/input.tsx rename to packages/app/src/components/quick-search/Input.tsx diff --git a/packages/app/src/components/quick-search/noResultSVG.tsx b/packages/app/src/components/quick-search/NoResultSVG.tsx similarity index 100% rename from packages/app/src/components/quick-search/noResultSVG.tsx rename to packages/app/src/components/quick-search/NoResultSVG.tsx diff --git a/packages/app/src/components/quick-search/results.tsx b/packages/app/src/components/quick-search/Results.tsx similarity index 97% rename from packages/app/src/components/quick-search/results.tsx rename to packages/app/src/components/quick-search/Results.tsx index eeb9fc2d44..fc22e97136 100644 --- a/packages/app/src/components/quick-search/results.tsx +++ b/packages/app/src/components/quick-search/Results.tsx @@ -1,12 +1,12 @@ import { Command } from 'cmdk'; import { StyledListItem, StyledNotFound } from './style'; -import { useModal } from '@/providers/global-modal-provider'; +import { useModal } from '@/providers/GlobalModalProvider'; import { PaperIcon, EdgelessIcon } from '@blocksuite/icons'; import { Dispatch, SetStateAction, useEffect, useState } from 'react'; import { useAppState } from '@/providers/app-state-provider'; import { useRouter } from 'next/router'; import { useSwitchToConfig } from './config'; -import { NoResultSVG } from './noResultSVG'; +import { NoResultSVG } from './NoResultSVG'; import { useTranslation } from 'react-i18next'; import usePageHelper from '@/hooks/use-page-helper'; import usePageMetaList from '@/hooks/use-page-meta-list'; diff --git a/packages/app/src/components/quick-search/index.tsx b/packages/app/src/components/quick-search/index.tsx index 7475d97567..b08f69196e 100644 --- a/packages/app/src/components/quick-search/index.tsx +++ b/packages/app/src/components/quick-search/index.tsx @@ -6,12 +6,12 @@ import { StyledModalDivider, StyledShortcut, } from './style'; -import { Input } from './input'; -import { Results } from './results'; -import { Footer } from './footer'; +import { Input } from './Input'; +import { Results } from './Results'; +import { Footer } from './Footer'; import { Command } from 'cmdk'; import { useEffect, useState } from 'react'; -import { useModal } from '@/providers/global-modal-provider'; +import { useModal } from '@/providers/GlobalModalProvider'; import { getUaHelper } from '@/utils'; import { useAppState } from '@/providers/app-state-provider'; type TransitionsModalProps = { diff --git a/packages/app/src/components/shortcuts-modal/icons.tsx b/packages/app/src/components/shortcuts-modal/Icons.tsx similarity index 100% rename from packages/app/src/components/shortcuts-modal/icons.tsx rename to packages/app/src/components/shortcuts-modal/Icons.tsx diff --git a/packages/app/src/components/shortcuts-modal/index.tsx b/packages/app/src/components/shortcuts-modal/index.tsx index 4f28b0ecec..980f281d78 100644 --- a/packages/app/src/components/shortcuts-modal/index.tsx +++ b/packages/app/src/components/shortcuts-modal/index.tsx @@ -1,5 +1,5 @@ import { createPortal } from 'react-dom'; -import { KeyboardIcon } from './icons'; +import { KeyboardIcon } from './Icons'; import { StyledListItem, StyledModalHeader, diff --git a/packages/app/src/components/workspace-setting/workspace-setting.tsx b/packages/app/src/components/workspace-setting/WorkspaceSetting.tsx similarity index 100% rename from packages/app/src/components/workspace-setting/workspace-setting.tsx rename to packages/app/src/components/workspace-setting/WorkspaceSetting.tsx diff --git a/packages/app/src/components/workspace-setting/general/general.tsx b/packages/app/src/components/workspace-setting/general/General.tsx similarity index 100% rename from packages/app/src/components/workspace-setting/general/general.tsx rename to packages/app/src/components/workspace-setting/general/General.tsx diff --git a/packages/app/src/components/workspace-setting/general/delete/delete.tsx b/packages/app/src/components/workspace-setting/general/delete/Delete.tsx similarity index 100% rename from packages/app/src/components/workspace-setting/general/delete/delete.tsx rename to packages/app/src/components/workspace-setting/general/delete/Delete.tsx diff --git a/packages/app/src/components/workspace-setting/general/delete/index.ts b/packages/app/src/components/workspace-setting/general/delete/index.ts index 2a41f028d2..69b5324048 100644 --- a/packages/app/src/components/workspace-setting/general/delete/index.ts +++ b/packages/app/src/components/workspace-setting/general/delete/index.ts @@ -1 +1 @@ -export * from './delete'; +export * from './Delete'; diff --git a/packages/app/src/components/workspace-setting/general/index.ts b/packages/app/src/components/workspace-setting/general/index.ts index 12bc2fe54d..0ab02c523e 100644 --- a/packages/app/src/components/workspace-setting/general/index.ts +++ b/packages/app/src/components/workspace-setting/general/index.ts @@ -1 +1 @@ -export * from './general'; +export * from './General'; diff --git a/packages/app/src/components/workspace-setting/general/leave/leave.tsx b/packages/app/src/components/workspace-setting/general/leave/Leave.tsx similarity index 100% rename from packages/app/src/components/workspace-setting/general/leave/leave.tsx rename to packages/app/src/components/workspace-setting/general/leave/Leave.tsx diff --git a/packages/app/src/components/workspace-setting/general/leave/index.ts b/packages/app/src/components/workspace-setting/general/leave/index.ts index ae98410fad..c3bfa43ca5 100644 --- a/packages/app/src/components/workspace-setting/general/leave/index.ts +++ b/packages/app/src/components/workspace-setting/general/leave/index.ts @@ -1 +1 @@ -export * from './leave'; +export * from './Leave'; diff --git a/packages/app/src/components/workspace-setting/index.ts b/packages/app/src/components/workspace-setting/index.ts index eda9c6aebd..db995db5e4 100644 --- a/packages/app/src/components/workspace-setting/index.ts +++ b/packages/app/src/components/workspace-setting/index.ts @@ -1 +1 @@ -export * from './workspace-setting'; +export * from './WorkspaceSetting'; diff --git a/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/SelectorPopperContent.tsx b/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/SelectorPopperContent.tsx index 8e101307bb..a07f847277 100644 --- a/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/SelectorPopperContent.tsx +++ b/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/SelectorPopperContent.tsx @@ -13,7 +13,7 @@ import { import { WorkspaceSetting } from '@/components/workspace-setting'; import { useCallback, useEffect, useState } from 'react'; import { getDataCenter, WorkspaceType } from '@affine/datacenter'; -import { useModal } from '@/providers/global-modal-provider'; +import { useModal } from '@/providers/GlobalModalProvider'; export type WorkspaceDetails = Record< string, diff --git a/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/CreateWorkspaceItem/workspace-create/workspace-create.tsx b/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/CreateWorkspaceItem/workspace-create/WorkspaceCreate.tsx similarity index 100% rename from packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/CreateWorkspaceItem/workspace-create/workspace-create.tsx rename to packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/CreateWorkspaceItem/workspace-create/WorkspaceCreate.tsx diff --git a/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/CreateWorkspaceItem/workspace-create/index.ts b/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/CreateWorkspaceItem/workspace-create/index.ts index 38645e20c1..85746bc70d 100644 --- a/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/CreateWorkspaceItem/workspace-create/index.ts +++ b/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/CreateWorkspaceItem/workspace-create/index.ts @@ -1 +1 @@ -export * from './workspace-create'; +export * from './WorkspaceCreate'; diff --git a/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/LoginItem.tsx b/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/LoginItem.tsx index 66b093e64c..d7771f1ac8 100644 --- a/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/LoginItem.tsx +++ b/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceItem/LoginItem.tsx @@ -1,6 +1,6 @@ -import { useModal } from '@/providers/global-modal-provider'; +import { useModal } from '@/providers/GlobalModalProvider'; import { styled } from '@/styles'; -import { AffineIcon } from '../../icons/icons'; +import { AffineIcon } from '../../icons/Icons'; import { WorkspaceItemAvatar, LoginItemWrapper, diff --git a/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceSelector.tsx b/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceSelector.tsx index 4e0299888f..7ecb47d721 100644 --- a/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceSelector.tsx +++ b/packages/app/src/components/workspace-slider-bar/WorkspaceSelector/WorkspaceSelector.tsx @@ -4,7 +4,7 @@ import { SelectorPopperContent } from './SelectorPopperContent'; import { useState } from 'react'; import { useAppState } from '@/providers/app-state-provider'; import { WorkspaceType } from '@affine/datacenter'; -import { AffineIcon } from '../icons/icons'; +import { AffineIcon } from '../icons/Icons'; export const WorkspaceSelector = () => { const [isShow, setIsShow] = useState(false); diff --git a/packages/app/src/components/workspace-slider-bar/icons/icons.tsx b/packages/app/src/components/workspace-slider-bar/icons/Icons.tsx similarity index 100% rename from packages/app/src/components/workspace-slider-bar/icons/icons.tsx rename to packages/app/src/components/workspace-slider-bar/icons/Icons.tsx diff --git a/packages/app/src/components/workspace-slider-bar/index.tsx b/packages/app/src/components/workspace-slider-bar/index.tsx index 61e81cb3ed..533ea42927 100644 --- a/packages/app/src/components/workspace-slider-bar/index.tsx +++ b/packages/app/src/components/workspace-slider-bar/index.tsx @@ -24,7 +24,7 @@ import { } from '@blocksuite/icons'; import Link from 'next/link'; import { Tooltip } from '@/ui/tooltip'; -import { useModal } from '@/providers/global-modal-provider'; +import { useModal } from '@/providers/GlobalModalProvider'; import { useAppState } from '@/providers/app-state-provider/context'; import { IconButton } from '@/ui/button'; import useLocalStorage from '@/hooks/use-local-storage'; diff --git a/packages/app/src/pages/_app.tsx b/packages/app/src/pages/_app.tsx index c7cbd78d4b..179cae802d 100644 --- a/packages/app/src/pages/_app.tsx +++ b/packages/app/src/pages/_app.tsx @@ -10,9 +10,9 @@ import '../utils/print-build-info'; import ProviderComposer from '@/components/provider-composer'; import type { PropsWithChildren, ReactElement, ReactNode } from 'react'; import type { NextPage } from 'next'; -import { AppStateProvider } from '@/providers/app-state-provider/provider'; -import ConfirmProvider from '@/providers/confirm-provider'; -import { ModalProvider } from '@/providers/global-modal-provider'; +import { AppStateProvider } from '@/providers/app-state-provider/Provider'; +import ConfirmProvider from '@/providers/ConfirmProvider'; +import { ModalProvider } from '@/providers/GlobalModalProvider'; import { useRouter } from 'next/router'; import { useEffect } from 'react'; import { useAppState } from '@/providers/app-state-provider'; @@ -20,7 +20,7 @@ import { PageLoading } from '@/components/loading'; import Head from 'next/head'; import '@/libs/i18n'; -const ThemeProvider = dynamic(() => import('@/providers/themeProvider'), { +const ThemeProvider = dynamic(() => import('@/providers/ThemeProvider'), { ssr: false, }); diff --git a/packages/app/src/providers/confirm-provider.tsx b/packages/app/src/providers/ConfirmProvider.tsx similarity index 100% rename from packages/app/src/providers/confirm-provider.tsx rename to packages/app/src/providers/ConfirmProvider.tsx diff --git a/packages/app/src/providers/global-modal-provider.tsx b/packages/app/src/providers/GlobalModalProvider.tsx similarity index 100% rename from packages/app/src/providers/global-modal-provider.tsx rename to packages/app/src/providers/GlobalModalProvider.tsx diff --git a/packages/app/src/providers/themeProvider.tsx b/packages/app/src/providers/ThemeProvider.tsx similarity index 100% rename from packages/app/src/providers/themeProvider.tsx rename to packages/app/src/providers/ThemeProvider.tsx diff --git a/packages/app/src/providers/app-state-provider/dynamic-blocksuite.tsx b/packages/app/src/providers/app-state-provider/DynamicBlocksuite.tsx similarity index 100% rename from packages/app/src/providers/app-state-provider/dynamic-blocksuite.tsx rename to packages/app/src/providers/app-state-provider/DynamicBlocksuite.tsx diff --git a/packages/app/src/providers/app-state-provider/provider.tsx b/packages/app/src/providers/app-state-provider/Provider.tsx similarity index 98% rename from packages/app/src/providers/app-state-provider/provider.tsx rename to packages/app/src/providers/app-state-provider/Provider.tsx index daa60ff85e..9e22634639 100644 --- a/packages/app/src/providers/app-state-provider/provider.tsx +++ b/packages/app/src/providers/app-state-provider/Provider.tsx @@ -10,7 +10,7 @@ import type { } from './context'; import { Page, Workspace as StoreWorkspace } from '@blocksuite/store'; import { EditorContainer } from '@blocksuite/editor'; -const DynamicBlocksuite = dynamic(() => import('./dynamic-blocksuite'), { +const DynamicBlocksuite = dynamic(() => import('./DynamicBlocksuite'), { ssr: false, });