|
|
@@ -14,6 +14,7 @@ import { bookmark, unbookmark, resumeRenameOperation } from '~/client/services/p
|
|
|
import { toastWarning, toastError, toastSuccess } from '~/client/util/apiNotification';
|
|
|
import { apiv3Put, apiv3Post } from '~/client/util/apiv3-client';
|
|
|
import TriangleIcon from '~/components/Icons/TriangleIcon';
|
|
|
+import { NotAvailableForGuest } from '~/components/NotAvailableForGuest';
|
|
|
import {
|
|
|
IPageHasId, IPageInfoAll, IPageToDeleteWithMeta,
|
|
|
} from '~/interfaces/page';
|
|
|
@@ -481,34 +482,40 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
|
|
|
<CountBadge count={descendantCount} />
|
|
|
</div>
|
|
|
)}
|
|
|
- <div className="grw-pagetree-control d-flex">
|
|
|
- <PageItemControl
|
|
|
- pageId={page._id}
|
|
|
- isEnableActions={isEnableActions}
|
|
|
- onClickBookmarkMenuItem={bookmarkMenuItemClickHandler}
|
|
|
- onClickDuplicateMenuItem={duplicateMenuItemClickHandler}
|
|
|
- onClickRenameMenuItem={renameMenuItemClickHandler}
|
|
|
- onClickDeleteMenuItem={deleteMenuItemClickHandler}
|
|
|
- onClickPathRecoveryMenuItem={pathRecoveryMenuItemClickHandler}
|
|
|
- isInstantRename
|
|
|
- // Todo: It is wanted to find a better way to pass operationProcessData to PageItemControl
|
|
|
- operationProcessData={page.processData}
|
|
|
- >
|
|
|
- {/* pass the color property to reactstrap dropdownToggle props. https://6-4-0--reactstrap.netlify.app/components/dropdowns/ */}
|
|
|
- <DropdownToggle color="transparent" className="border-0 rounded btn-page-item-control p-0 grw-visible-on-hover mr-1">
|
|
|
- <i className="icon-options fa fa-rotate-90 p-1"></i>
|
|
|
- </DropdownToggle>
|
|
|
- </PageItemControl>
|
|
|
- {!pagePathUtils.isUsersTopPage(page.path ?? '') && (
|
|
|
+ <NotAvailableForGuest>
|
|
|
+ <div className="grw-pagetree-control d-flex">
|
|
|
+ <PageItemControl
|
|
|
+ pageId={page._id}
|
|
|
+ isEnableActions={isEnableActions}
|
|
|
+ onClickBookmarkMenuItem={bookmarkMenuItemClickHandler}
|
|
|
+ onClickDuplicateMenuItem={duplicateMenuItemClickHandler}
|
|
|
+ onClickRenameMenuItem={renameMenuItemClickHandler}
|
|
|
+ onClickDeleteMenuItem={deleteMenuItemClickHandler}
|
|
|
+ onClickPathRecoveryMenuItem={pathRecoveryMenuItemClickHandler}
|
|
|
+ isInstantRename
|
|
|
+ // Todo: It is wanted to find a better way to pass operationProcessData to PageItemControl
|
|
|
+ operationProcessData={page.processData}
|
|
|
+ >
|
|
|
+ {/* pass the color property to reactstrap dropdownToggle props. https://6-4-0--reactstrap.netlify.app/components/dropdowns/ */}
|
|
|
+ <DropdownToggle color="transparent" className="border-0 rounded btn-page-item-control p-0 grw-visible-on-hover mr-1">
|
|
|
+ <i id='option-button-in-page-tree' className="icon-options fa fa-rotate-90 p-1"></i>
|
|
|
+ </DropdownToggle>
|
|
|
+ </PageItemControl>
|
|
|
+ </div>
|
|
|
+ </NotAvailableForGuest>
|
|
|
+
|
|
|
+ {!pagePathUtils.isUsersTopPage(page.path ?? '') && (
|
|
|
+ <NotAvailableForGuest>
|
|
|
<button
|
|
|
+ id='page-create-button-in-page-tree'
|
|
|
type="button"
|
|
|
className="border-0 rounded btn btn-page-item-control p-0 grw-visible-on-hover"
|
|
|
onClick={onClickPlusButton}
|
|
|
>
|
|
|
<i className="icon-plus d-block p-0" />
|
|
|
</button>
|
|
|
- )}
|
|
|
- </div>
|
|
|
+ </NotAvailableForGuest>
|
|
|
+ )}
|
|
|
</li>
|
|
|
|
|
|
{isEnableActions && isNewPageInputShown && (
|