|
@@ -24,20 +24,22 @@ import DrawerToggler from './DrawerToggler';
|
|
|
import PageManagement from '../Page/PageManagement';
|
|
import PageManagement from '../Page/PageManagement';
|
|
|
|
|
|
|
|
|
|
|
|
|
-// eslint-disable-next-line react/prop-types
|
|
|
|
|
-const PagePathNav = ({ pageId, pagePath, isPageForbidden }) => {
|
|
|
|
|
|
|
+const PagePathNav = ({
|
|
|
|
|
+ // eslint-disable-next-line react/prop-types
|
|
|
|
|
+ pageId, pagePath, isPageForbidden, isEditorMode,
|
|
|
|
|
+}) => {
|
|
|
|
|
|
|
|
const dPagePath = new DevidedPagePath(pagePath, false, true);
|
|
const dPagePath = new DevidedPagePath(pagePath, false, true);
|
|
|
|
|
|
|
|
let formerLink;
|
|
let formerLink;
|
|
|
let latterLink;
|
|
let latterLink;
|
|
|
|
|
|
|
|
- // when the path is root or first level
|
|
|
|
|
- if (dPagePath.isRoot || dPagePath.isFormerRoot) {
|
|
|
|
|
|
|
+ // one line
|
|
|
|
|
+ if (dPagePath.isRoot || dPagePath.isFormerRoot || isEditorMode) {
|
|
|
const linkedPagePath = new LinkedPagePath(pagePath);
|
|
const linkedPagePath = new LinkedPagePath(pagePath);
|
|
|
latterLink = <PagePathHierarchicalLink linkedPagePath={linkedPagePath} />;
|
|
latterLink = <PagePathHierarchicalLink linkedPagePath={linkedPagePath} />;
|
|
|
}
|
|
}
|
|
|
- // when the path is second level or deeper
|
|
|
|
|
|
|
+ // two line
|
|
|
else {
|
|
else {
|
|
|
const linkedPagePathFormer = new LinkedPagePath(dPagePath.former);
|
|
const linkedPagePathFormer = new LinkedPagePath(dPagePath.former);
|
|
|
const linkedPagePathLatter = new LinkedPagePath(dPagePath.latter);
|
|
const linkedPagePathLatter = new LinkedPagePath(dPagePath.latter);
|
|
@@ -94,6 +96,7 @@ const GrowiSubNavigation = (props) => {
|
|
|
} = pageContainer.state;
|
|
} = pageContainer.state;
|
|
|
|
|
|
|
|
const { isGuestUser } = appContainer;
|
|
const { isGuestUser } = appContainer;
|
|
|
|
|
+ const isEditorMode = editorMode !== 'view';
|
|
|
// Tags cannot be edited while the new page and editorMode is view
|
|
// Tags cannot be edited while the new page and editorMode is view
|
|
|
const isTagLabelHidden = (editorMode !== 'edit' && !isPageExist);
|
|
const isTagLabelHidden = (editorMode !== 'edit' && !isPageExist);
|
|
|
|
|
|
|
@@ -107,30 +110,30 @@ const GrowiSubNavigation = (props) => {
|
|
|
{/* Left side */}
|
|
{/* Left side */}
|
|
|
<div className="d-flex grw-subnav-left-side">
|
|
<div className="d-flex grw-subnav-left-side">
|
|
|
{ isDrawerMode && (
|
|
{ isDrawerMode && (
|
|
|
- <div className="d-none d-md-flex align-items-center border-right mr-3 pr-3">
|
|
|
|
|
|
|
+ <div className={`d-none d-md-flex align-items-center ${isEditorMode ? 'mr-2 pr-2' : 'border-right mr-4 pr-4'}`}>
|
|
|
<DrawerToggler />
|
|
<DrawerToggler />
|
|
|
</div>
|
|
</div>
|
|
|
) }
|
|
) }
|
|
|
|
|
|
|
|
<div className="grw-path-nav-container">
|
|
<div className="grw-path-nav-container">
|
|
|
{ pageContainer.isAbleToShowTagLabel && !isCompactMode && !isTagLabelHidden && (
|
|
{ pageContainer.isAbleToShowTagLabel && !isCompactMode && !isTagLabelHidden && (
|
|
|
- <div className="mb-2">
|
|
|
|
|
|
|
+ <div className="grw-taglabels-container">
|
|
|
<TagLabels editorMode={editorMode} />
|
|
<TagLabels editorMode={editorMode} />
|
|
|
</div>
|
|
</div>
|
|
|
) }
|
|
) }
|
|
|
- <PagePathNav pageId={pageId} pagePath={path} isPageForbidden={isPageForbidden} />
|
|
|
|
|
|
|
+ <PagePathNav pageId={pageId} pagePath={path} isPageForbidden={isPageForbidden} isEditorMode={isEditorMode} />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
{/* Right side */}
|
|
{/* Right side */}
|
|
|
<div className="d-flex">
|
|
<div className="d-flex">
|
|
|
|
|
|
|
|
- <div className="d-flex flex-column align-items-end">
|
|
|
|
|
|
|
+ <div className={`d-flex ${isEditorMode ? 'align-items-center' : 'flex-column align-items-end'}`}>
|
|
|
<div className="d-flex">
|
|
<div className="d-flex">
|
|
|
{ pageContainer.isAbleToShowPageReactionButtons && <PageReactionButtons appContainer={appContainer} pageContainer={pageContainer} /> }
|
|
{ pageContainer.isAbleToShowPageReactionButtons && <PageReactionButtons appContainer={appContainer} pageContainer={pageContainer} /> }
|
|
|
{ pageContainer.isAbleToShowPageManagement && <PageManagement isCompactMode={isCompactMode} /> }
|
|
{ pageContainer.isAbleToShowPageManagement && <PageManagement isCompactMode={isCompactMode} /> }
|
|
|
</div>
|
|
</div>
|
|
|
- <div className="mt-2">
|
|
|
|
|
|
|
+ <div className={`${isEditorMode ? 'ml-2' : 'mt-2'}`}>
|
|
|
{pageContainer.isAbleToShowThreeStrandedButton && (
|
|
{pageContainer.isAbleToShowThreeStrandedButton && (
|
|
|
<ThreeStrandedButton
|
|
<ThreeStrandedButton
|
|
|
onThreeStrandedButtonClicked={onThreeStrandedButtonClicked}
|
|
onThreeStrandedButtonClicked={onThreeStrandedButtonClicked}
|