|
@@ -1,7 +1,9 @@
|
|
|
import React, {
|
|
import React, {
|
|
|
forwardRef, ForwardRefRenderFunction, useEffect, useImperativeHandle, useRef, useState,
|
|
forwardRef, ForwardRefRenderFunction, useEffect, useImperativeHandle, useRef, useState,
|
|
|
} from 'react';
|
|
} from 'react';
|
|
|
|
|
+
|
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
+
|
|
|
import { ISelectableAll } from '~/client/interfaces/selectable-all';
|
|
import { ISelectableAll } from '~/client/interfaces/selectable-all';
|
|
|
import AppContainer from '~/client/services/AppContainer';
|
|
import AppContainer from '~/client/services/AppContainer';
|
|
|
import { toastSuccess } from '~/client/util/apiNotification';
|
|
import { toastSuccess } from '~/client/util/apiNotification';
|
|
@@ -11,8 +13,8 @@ import { OnDeletedFunction } from '~/interfaces/ui';
|
|
|
import { useIsGuestUser, useIsSearchServiceConfigured, useIsSearchServiceReachable } from '~/stores/context';
|
|
import { useIsGuestUser, useIsSearchServiceConfigured, useIsSearchServiceReachable } from '~/stores/context';
|
|
|
import { usePageDeleteModal } from '~/stores/modal';
|
|
import { usePageDeleteModal } from '~/stores/modal';
|
|
|
import { usePageTreeTermManager } from '~/stores/page-listing';
|
|
import { usePageTreeTermManager } from '~/stores/page-listing';
|
|
|
-import { ForceHideMenuItems } from '../Common/Dropdown/PageItemControl';
|
|
|
|
|
|
|
|
|
|
|
|
+import { ForceHideMenuItems } from '../Common/Dropdown/PageItemControl';
|
|
|
import { SearchResultContent } from '../SearchPage/SearchResultContent';
|
|
import { SearchResultContent } from '../SearchPage/SearchResultContent';
|
|
|
import { SearchResultList } from '../SearchPage/SearchResultList';
|
|
import { SearchResultList } from '../SearchPage/SearchResultList';
|
|
|
|
|
|
|
@@ -253,7 +255,14 @@ export const usePageDeleteModalForBulkDeletion = (
|
|
|
|
|
|
|
|
openDeleteModal(selectedPages, {
|
|
openDeleteModal(selectedPages, {
|
|
|
onDeleted: (...args) => {
|
|
onDeleted: (...args) => {
|
|
|
- toastSuccess(args[2] ? t('deleted_pages_completely') : t('deleted_pages'));
|
|
|
|
|
|
|
+ const path = args[0];
|
|
|
|
|
+ const isCompletely = args[2];
|
|
|
|
|
+ if (path == null || isCompletely == null) {
|
|
|
|
|
+ toastSuccess(t('deleted_page'));
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ toastSuccess(t('deleted_pages_completely', { path }));
|
|
|
|
|
+ }
|
|
|
advancePt();
|
|
advancePt();
|
|
|
|
|
|
|
|
if (onDeleted != null) {
|
|
if (onDeleted != null) {
|