|
|
@@ -65,7 +65,7 @@ const markTarget = (children: ItemNode[], targetPathOrId?: Nullable<string>): vo
|
|
|
};
|
|
|
|
|
|
|
|
|
-const bookmarkMenuItemClickHandler = async (_pageId: string, _newValue: boolean): Promise<void> => {
|
|
|
+const bookmarkMenuItemClickHandler = async(_pageId: string, _newValue: boolean): Promise<void> => {
|
|
|
const bookmarkOperation = _newValue ? bookmark : unbookmark;
|
|
|
await bookmarkOperation(_pageId);
|
|
|
};
|
|
|
@@ -172,7 +172,7 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
|
|
|
}),
|
|
|
});
|
|
|
|
|
|
- const pageItemDropHandler = async (item: ItemNode) => {
|
|
|
+ const pageItemDropHandler = async(item: ItemNode) => {
|
|
|
const { page: droppedPage } = item;
|
|
|
|
|
|
if (!isDroppable(droppedPage, page, true)) {
|
|
|
@@ -247,7 +247,7 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
|
|
|
return currentChildren != null && currentChildren.length > 0;
|
|
|
}, [currentChildren]);
|
|
|
|
|
|
- const onClickLoadChildren = useCallback(async () => {
|
|
|
+ const onClickLoadChildren = useCallback(async() => {
|
|
|
setIsOpen(!isOpen);
|
|
|
}, [isOpen]);
|
|
|
|
|
|
@@ -279,7 +279,7 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
|
|
|
setRenameInputShown(true);
|
|
|
}, []);
|
|
|
|
|
|
- const onPressEnterForRenameHandler = async (inputText: string) => {
|
|
|
+ const onPressEnterForRenameHandler = async(inputText: string) => {
|
|
|
const parentPath = pathUtils.addTrailingSlash(nodePath.dirname(page.path ?? ''));
|
|
|
const newPagePath = nodePath.resolve(parentPath, inputText);
|
|
|
|
|
|
@@ -308,7 +308,7 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- const deleteMenuItemClickHandler = useCallback(async (_pageId: string, pageInfo: IPageInfoAll | undefined): Promise<void> => {
|
|
|
+ const deleteMenuItemClickHandler = useCallback(async(_pageId: string, pageInfo: IPageInfoAll | undefined): Promise<void> => {
|
|
|
if (onClickDeleteMenuItem == null) {
|
|
|
return;
|
|
|
}
|
|
|
@@ -329,7 +329,7 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
|
|
|
onClickDeleteMenuItem(pageToDelete);
|
|
|
}, [onClickDeleteMenuItem, page]);
|
|
|
|
|
|
- const onPressEnterForCreateHandler = async (inputText: string) => {
|
|
|
+ const onPressEnterForCreateHandler = async(inputText: string) => {
|
|
|
setNewPageInputShown(false);
|
|
|
const parentPath = pathUtils.addTrailingSlash(page.path as string);
|
|
|
const newPagePath = nodePath.resolve(parentPath, inputText);
|
|
|
@@ -388,7 +388,7 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
|
|
|
* Users do not need to know if all pages have been renamed.
|
|
|
* Make resuming rename operation appears to be working fine to allow users for a seamless operation.
|
|
|
*/
|
|
|
- const pathRecoveryMenuItemClickHandler = async (pageId: string): Promise<void> => {
|
|
|
+ const pathRecoveryMenuItemClickHandler = async(pageId: string): Promise<void> => {
|
|
|
try {
|
|
|
await resumeRenameOperation(pageId);
|
|
|
toastSuccess(t('page_operation.paths_recovered'));
|