|
@@ -8,34 +8,40 @@ import loggerFactory from '@alias/logger';
|
|
|
import ErrorBoundary from './components/ErrorBoudary';
|
|
import ErrorBoundary from './components/ErrorBoudary';
|
|
|
import SearchPage from './components/SearchPage';
|
|
import SearchPage from './components/SearchPage';
|
|
|
import TagsList from './components/TagsList';
|
|
import TagsList from './components/TagsList';
|
|
|
-import PageEditor from './components/PageEditor';
|
|
|
|
|
-import PagePathNavForEditor from './components/PageEditor/PagePathNavForEditor';
|
|
|
|
|
-import EditorNavbarBottom from './components/PageEditor/EditorNavbarBottom';
|
|
|
|
|
|
|
+import DisplaySwitcher from './components/Page/DisplaySwitcher';
|
|
|
import { defaultEditorOptions, defaultPreviewOptions } from './components/PageEditor/OptionsSelector';
|
|
import { defaultEditorOptions, defaultPreviewOptions } from './components/PageEditor/OptionsSelector';
|
|
|
-import PageEditorByHackmd from './components/PageEditorByHackmd';
|
|
|
|
|
import Page from './components/Page';
|
|
import Page from './components/Page';
|
|
|
import PageComments from './components/PageComments';
|
|
import PageComments from './components/PageComments';
|
|
|
import PageTimeline from './components/PageTimeline';
|
|
import PageTimeline from './components/PageTimeline';
|
|
|
import CommentEditorLazyRenderer from './components/PageComment/CommentEditorLazyRenderer';
|
|
import CommentEditorLazyRenderer from './components/PageComment/CommentEditorLazyRenderer';
|
|
|
import PageManagement from './components/Page/PageManagement';
|
|
import PageManagement from './components/Page/PageManagement';
|
|
|
|
|
+import ShareLinkAlert from './components/Page/ShareLinkAlert';
|
|
|
|
|
+import TrashPageList from './components/TrashPageList';
|
|
|
import TrashPageAlert from './components/Page/TrashPageAlert';
|
|
import TrashPageAlert from './components/Page/TrashPageAlert';
|
|
|
|
|
+import NotFoundPage from './components/NotFoundPage';
|
|
|
|
|
+import NotFoundAlert from './components/Page/NotFoundAlert';
|
|
|
import PageStatusAlert from './components/PageStatusAlert';
|
|
import PageStatusAlert from './components/PageStatusAlert';
|
|
|
import RecentCreated from './components/RecentCreated/RecentCreated';
|
|
import RecentCreated from './components/RecentCreated/RecentCreated';
|
|
|
|
|
+import RecentlyCreatedIcon from './components/Icons/RecentlyCreatedIcon';
|
|
|
import MyDraftList from './components/MyDraftList/MyDraftList';
|
|
import MyDraftList from './components/MyDraftList/MyDraftList';
|
|
|
-import SeenUserList from './components/User/SeenUserList';
|
|
|
|
|
|
|
+import BookmarkIcon from './components/Icons/BookmarkIcon';
|
|
|
|
|
+import BookmarkList from './components/PageList/BookmarkList';
|
|
|
import LikerList from './components/User/LikerList';
|
|
import LikerList from './components/User/LikerList';
|
|
|
import TableOfContents from './components/TableOfContents';
|
|
import TableOfContents from './components/TableOfContents';
|
|
|
|
|
+import PageAccessories from './components/PageAccessories';
|
|
|
|
|
+import UserInfo from './components/User/UserInfo';
|
|
|
import Fab from './components/Fab';
|
|
import Fab from './components/Fab';
|
|
|
-
|
|
|
|
|
import PersonalSettings from './components/Me/PersonalSettings';
|
|
import PersonalSettings from './components/Me/PersonalSettings';
|
|
|
|
|
+import UserContentsLinks from './components/UserContentsLinks';
|
|
|
|
|
+import GrowiSubNavigation from './components/Navbar/GrowiSubNavigation';
|
|
|
|
|
+import GrowiSubNavigationSwitcher from './components/Navbar/GrowiSubNavigationSwitcher';
|
|
|
|
|
+
|
|
|
import NavigationContainer from './services/NavigationContainer';
|
|
import NavigationContainer from './services/NavigationContainer';
|
|
|
import PageContainer from './services/PageContainer';
|
|
import PageContainer from './services/PageContainer';
|
|
|
import PageHistoryContainer from './services/PageHistoryContainer';
|
|
import PageHistoryContainer from './services/PageHistoryContainer';
|
|
|
import CommentContainer from './services/CommentContainer';
|
|
import CommentContainer from './services/CommentContainer';
|
|
|
import EditorContainer from './services/EditorContainer';
|
|
import EditorContainer from './services/EditorContainer';
|
|
|
import TagContainer from './services/TagContainer';
|
|
import TagContainer from './services/TagContainer';
|
|
|
-import GrowiSubNavigation from './components/Navbar/GrowiSubNavigation';
|
|
|
|
|
-import GrowiSubNavigationSwitcher from './components/Navbar/GrowiSubNavigationSwitcher';
|
|
|
|
|
import PersonalContainer from './services/PersonalContainer';
|
|
import PersonalContainer from './services/PersonalContainer';
|
|
|
|
|
|
|
|
import { appContainer, componentMappings } from './base';
|
|
import { appContainer, componentMappings } from './base';
|
|
@@ -76,11 +82,24 @@ Object.assign(componentMappings, {
|
|
|
|
|
|
|
|
'trash-page-alert': <TrashPageAlert />,
|
|
'trash-page-alert': <TrashPageAlert />,
|
|
|
|
|
|
|
|
|
|
+ 'trash-page-list': <TrashPageList />,
|
|
|
|
|
+
|
|
|
|
|
+ 'not-found-page': <NotFoundPage />,
|
|
|
|
|
+
|
|
|
|
|
+ 'not-found-alert': <NotFoundAlert
|
|
|
|
|
+ onPageCreateClicked={navigationContainer.setEditorMode}
|
|
|
|
|
+ isHidden={pageContainer.state.isForbidden || pageContainer.state.isNotCreatable || pageContainer.state.isTrashPage}
|
|
|
|
|
+ />,
|
|
|
|
|
+
|
|
|
'page-timeline': <PageTimeline />,
|
|
'page-timeline': <PageTimeline />,
|
|
|
|
|
|
|
|
'personal-setting': <PersonalSettings crowi={personalContainer} />,
|
|
'personal-setting': <PersonalSettings crowi={personalContainer} />,
|
|
|
|
|
|
|
|
|
|
+ 'my-drafts': <MyDraftList />,
|
|
|
|
|
+
|
|
|
'grw-fab-container': <Fab />,
|
|
'grw-fab-container': <Fab />,
|
|
|
|
|
+
|
|
|
|
|
+ 'share-link-alert': <ShareLinkAlert />,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// additional definitions if data exists
|
|
// additional definitions if data exists
|
|
@@ -89,16 +108,19 @@ if (pageContainer.state.pageId != null) {
|
|
|
'page-comments-list': <PageComments />,
|
|
'page-comments-list': <PageComments />,
|
|
|
'page-comment-write': <CommentEditorLazyRenderer />,
|
|
'page-comment-write': <CommentEditorLazyRenderer />,
|
|
|
'page-management': <PageManagement />,
|
|
'page-management': <PageManagement />,
|
|
|
|
|
+ 'page-accessories': <PageAccessories />,
|
|
|
'revision-toc': <TableOfContents />,
|
|
'revision-toc': <TableOfContents />,
|
|
|
- 'seen-user-list': <SeenUserList />,
|
|
|
|
|
'liker-list': <LikerList />,
|
|
'liker-list': <LikerList />,
|
|
|
|
|
|
|
|
- 'user-draft-list': <MyDraftList />,
|
|
|
|
|
|
|
+ 'recent-created-icon': <RecentlyCreatedIcon />,
|
|
|
|
|
+ 'user-bookmark-icon': <BookmarkIcon />,
|
|
|
|
|
+ 'grw-user-contents-links': <UserContentsLinks />,
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
if (pageContainer.state.creator != null) {
|
|
if (pageContainer.state.creator != null) {
|
|
|
Object.assign(componentMappings, {
|
|
Object.assign(componentMappings, {
|
|
|
'user-created-list': <RecentCreated userId={pageContainer.state.creator._id} />,
|
|
'user-created-list': <RecentCreated userId={pageContainer.state.creator._id} />,
|
|
|
|
|
+ 'user-bookmark-list': <BookmarkList userId={pageContainer.state.creator._id} />,
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
if (pageContainer.state.path != null) {
|
|
if (pageContainer.state.path != null) {
|
|
@@ -107,21 +129,10 @@ if (pageContainer.state.path != null) {
|
|
|
'page': <Page />,
|
|
'page': <Page />,
|
|
|
'grw-subnav-container': <GrowiSubNavigation />,
|
|
'grw-subnav-container': <GrowiSubNavigation />,
|
|
|
'grw-subnav-switcher-container': <GrowiSubNavigationSwitcher />,
|
|
'grw-subnav-switcher-container': <GrowiSubNavigationSwitcher />,
|
|
|
|
|
+ 'user-info': <UserInfo pageUser={pageContainer.state.pageUser} />,
|
|
|
|
|
+ 'display-switcher': <DisplaySwitcher />,
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-// additional definitions if user is logged in
|
|
|
|
|
-if (appContainer.currentUser != null) {
|
|
|
|
|
- Object.assign(componentMappings, {
|
|
|
|
|
- 'page-editor': <PageEditor />,
|
|
|
|
|
- 'page-editor-path-nav': <PagePathNavForEditor />,
|
|
|
|
|
- 'page-editor-navbar-bottom-container': <EditorNavbarBottom />,
|
|
|
|
|
- });
|
|
|
|
|
- if (pageContainer.state.pageId != null) {
|
|
|
|
|
- Object.assign(componentMappings, {
|
|
|
|
|
- 'page-editor-with-hackmd': <PageEditorByHackmd />,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
Object.keys(componentMappings).forEach((key) => {
|
|
Object.keys(componentMappings).forEach((key) => {
|
|
|
const elem = document.getElementById(key);
|
|
const elem = document.getElementById(key);
|