|
|
@@ -27,7 +27,7 @@ import {
|
|
|
import { mutatePageTree } from '~/stores/page-listing';
|
|
|
import {
|
|
|
useEditorMode, useIsAbleToShowPageManagement,
|
|
|
- useIsAbleToChangeEditorMode,
|
|
|
+ useIsAbleToChangeEditorMode, useIsAbleToShowCreateButton,
|
|
|
} from '~/stores/ui';
|
|
|
|
|
|
import CreateTemplateModal from '../CreateTemplateModal';
|
|
|
@@ -200,6 +200,7 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
|
|
|
|
|
|
const { data: isAbleToShowPageManagement } = useIsAbleToShowPageManagement();
|
|
|
const { data: isAbleToChangeEditorMode } = useIsAbleToChangeEditorMode();
|
|
|
+ const { data: isAbleToShowCreateButton } = useIsAbleToShowCreateButton();
|
|
|
|
|
|
// TODO: implement tags for editor
|
|
|
// refs: https://redmine.weseek.co.jp/issues/132125
|
|
|
@@ -358,6 +359,16 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
|
|
|
onPageEditorModeButtonClicked={viewType => mutateEditorMode(viewType)}
|
|
|
/>
|
|
|
)}
|
|
|
+ {isAbleToShowCreateButton && (
|
|
|
+ <button
|
|
|
+ type="button"
|
|
|
+ className="btn btn-outline-primary"
|
|
|
+ onClick={() => {}}
|
|
|
+ >
|
|
|
+ <span className="me-1"><i className="icon-control-play" /></span>
|
|
|
+ <span>Create</span>
|
|
|
+ </button>
|
|
|
+ )}
|
|
|
</div>
|
|
|
|
|
|
{path != null && currentUser != null && !isReadOnlyUser && (
|