Просмотр исходного кода

Implement new toastr

https://youtrack.weseek.co.jp/issue/GW-7930
Mudana-Grune 3 лет назад
Родитель
Сommit
15fe5cda87
100 измененных файлов с 128 добавлено и 124 удалено
  1. 0 1
      packages/app/src/client/services/AdminCustomizeContainer.js
  2. 1 1
      packages/app/src/client/services/AdminGeneralSecurityContainer.js
  3. 7 7
      packages/app/src/client/services/AdminImportContainer.js
  4. 1 1
      packages/app/src/client/services/page-operation.ts
  5. 1 1
      packages/app/src/components/Admin/AdminHome/AdminHome.jsx
  6. 1 1
      packages/app/src/components/Admin/App/AppSetting.jsx
  7. 1 1
      packages/app/src/components/Admin/App/AppSettingsPageContents.tsx
  8. 1 1
      packages/app/src/components/Admin/App/FileUploadSetting.tsx
  9. 1 1
      packages/app/src/components/Admin/App/MailSetting.tsx
  10. 1 1
      packages/app/src/components/Admin/App/MaintenanceMode.tsx
  11. 1 1
      packages/app/src/components/Admin/App/SiteUrlSetting.tsx
  12. 11 6
      packages/app/src/components/Admin/App/V5PageMigration.tsx
  13. 1 1
      packages/app/src/components/Admin/AuditLogManagement.tsx
  14. 1 1
      packages/app/src/components/Admin/Customize/Customize.jsx
  15. 1 1
      packages/app/src/components/Admin/Customize/CustomizeCssSetting.tsx
  16. 1 1
      packages/app/src/components/Admin/Customize/CustomizeFunctionSetting.tsx
  17. 1 1
      packages/app/src/components/Admin/Customize/CustomizeLayoutSetting.tsx
  18. 1 1
      packages/app/src/components/Admin/Customize/CustomizeLogoSetting.tsx
  19. 1 1
      packages/app/src/components/Admin/Customize/CustomizeNoscriptSetting.tsx
  20. 1 1
      packages/app/src/components/Admin/Customize/CustomizeScriptSetting.tsx
  21. 1 1
      packages/app/src/components/Admin/Customize/CustomizeSidebarSetting.tsx
  22. 1 1
      packages/app/src/components/Admin/Customize/CustomizeTitle.tsx
  23. 2 2
      packages/app/src/components/Admin/ElasticsearchManagement/ElasticsearchManagement.tsx
  24. 1 1
      packages/app/src/components/Admin/G2GDataTransfer.tsx
  25. 3 3
      packages/app/src/components/Admin/ImportData/GrowiArchive/ImportForm.jsx
  26. 1 1
      packages/app/src/components/Admin/ImportData/GrowiArchive/UploadForm.jsx
  27. 1 1
      packages/app/src/components/Admin/ImportData/ImportDataPageContents.jsx
  28. 1 1
      packages/app/src/components/Admin/LegacySlackIntegration/LegacySlackIntegration.jsx
  29. 1 1
      packages/app/src/components/Admin/LegacySlackIntegration/SlackConfiguration.jsx
  30. 1 1
      packages/app/src/components/Admin/ManageExternalAccount.tsx
  31. 1 1
      packages/app/src/components/Admin/MarkdownSetting/IndentForm.tsx
  32. 1 1
      packages/app/src/components/Admin/MarkdownSetting/LineBreakForm.jsx
  33. 1 1
      packages/app/src/components/Admin/MarkdownSetting/MarkDownSettingContents.tsx
  34. 1 1
      packages/app/src/components/Admin/MarkdownSetting/XssForm.jsx
  35. 1 1
      packages/app/src/components/Admin/Notification/GlobalNotification.jsx
  36. 1 1
      packages/app/src/components/Admin/Notification/GlobalNotificationList.jsx
  37. 1 1
      packages/app/src/components/Admin/Notification/ManageGlobalNotification.tsx
  38. 1 1
      packages/app/src/components/Admin/Notification/NotificationSetting.jsx
  39. 1 1
      packages/app/src/components/Admin/Notification/UserTriggerNotification.jsx
  40. 1 1
      packages/app/src/components/Admin/Security/GitHubSecuritySetting.jsx
  41. 1 1
      packages/app/src/components/Admin/Security/GitHubSecuritySettingContents.jsx
  42. 1 1
      packages/app/src/components/Admin/Security/GoogleSecuritySetting.jsx
  43. 1 1
      packages/app/src/components/Admin/Security/GoogleSecuritySettingContents.jsx
  44. 2 2
      packages/app/src/components/Admin/Security/LdapAuthTest.tsx
  45. 1 1
      packages/app/src/components/Admin/Security/LdapSecuritySetting.jsx
  46. 2 2
      packages/app/src/components/Admin/Security/LdapSecuritySettingContents.jsx
  47. 1 1
      packages/app/src/components/Admin/Security/LocalSecuritySetting.jsx
  48. 1 1
      packages/app/src/components/Admin/Security/LocalSecuritySettingContents.jsx
  49. 1 1
      packages/app/src/components/Admin/Security/OidcSecuritySetting.jsx
  50. 1 1
      packages/app/src/components/Admin/Security/OidcSecuritySettingContents.jsx
  51. 1 1
      packages/app/src/components/Admin/Security/SamlSecuritySetting.jsx
  52. 1 1
      packages/app/src/components/Admin/Security/SamlSecuritySettingContents.jsx
  53. 1 1
      packages/app/src/components/Admin/Security/SecurityManagement.tsx
  54. 1 1
      packages/app/src/components/Admin/Security/SecuritySetting.jsx
  55. 1 1
      packages/app/src/components/Admin/Security/ShareLinkSetting.tsx
  56. 4 4
      packages/app/src/components/Admin/SlackIntegration/CustomBotWithProxySettings.jsx
  57. 1 1
      packages/app/src/components/Admin/SlackIntegration/CustomBotWithoutProxySecretTokenSection.jsx
  58. 1 1
      packages/app/src/components/Admin/SlackIntegration/ManageCommandsProcess.jsx
  59. 1 1
      packages/app/src/components/Admin/SlackIntegration/ManageCommandsProcessWithoutProxy.jsx
  60. 2 2
      packages/app/src/components/Admin/SlackIntegration/OfficialBotSettings.jsx
  61. 1 1
      packages/app/src/components/Admin/SlackIntegration/SlackIntegration.jsx
  62. 1 1
      packages/app/src/components/Admin/SlackIntegration/WithProxyAccordions.jsx
  63. 1 1
      packages/app/src/components/Admin/UserGroup/UserGroupPage.tsx
  64. 1 1
      packages/app/src/components/Admin/UserGroupDetail/UserGroupDetailPage.tsx
  65. 1 1
      packages/app/src/components/Admin/UserGroupDetail/UserGroupPageList.tsx
  66. 1 1
      packages/app/src/components/Admin/UserGroupDetail/UserGroupUserFormByInput.jsx
  67. 1 1
      packages/app/src/components/Admin/UserManagement.tsx
  68. 1 1
      packages/app/src/components/Admin/Users/ExternalAccountTable.tsx
  69. 1 1
      packages/app/src/components/Admin/Users/GiveAdminButton.tsx
  70. 2 2
      packages/app/src/components/Admin/Users/PasswordResetModal.jsx
  71. 1 1
      packages/app/src/components/Admin/Users/RemoveAdminButton.tsx
  72. 1 1
      packages/app/src/components/Admin/Users/RemoveAdminMenuItem.tsx
  73. 1 1
      packages/app/src/components/Admin/Users/SendInvitationEmailButton.jsx
  74. 1 1
      packages/app/src/components/Admin/Users/StatusActivateButton.jsx
  75. 1 1
      packages/app/src/components/Admin/Users/StatusSuspendMenuItem.tsx
  76. 1 1
      packages/app/src/components/Admin/Users/UserInviteModal.jsx
  77. 1 1
      packages/app/src/components/Admin/Users/UserRemoveButton.jsx
  78. 1 1
      packages/app/src/components/ArchiveCreateModal.jsx
  79. 1 1
      packages/app/src/components/Common/ImageCropModal.tsx
  80. 3 3
      packages/app/src/components/CompleteUserRegistrationForm.tsx
  81. 1 1
      packages/app/src/components/DescendantsPageList.tsx
  82. 1 1
      packages/app/src/components/InAppNotification/InAppNotificationDropdown.tsx
  83. 1 1
      packages/app/src/components/InstallerForm.tsx
  84. 1 1
      packages/app/src/components/Me/ApiSettings.tsx
  85. 1 1
      packages/app/src/components/Me/AssociateModal.tsx
  86. 1 1
      packages/app/src/components/Me/BasicInfoSettings.tsx
  87. 1 1
      packages/app/src/components/Me/DisassociateModal.tsx
  88. 1 1
      packages/app/src/components/Me/EditorSettings.tsx
  89. 1 1
      packages/app/src/components/Me/InAppNotificationSettings.tsx
  90. 1 1
      packages/app/src/components/Me/PasswordSettings.jsx
  91. 1 1
      packages/app/src/components/Me/ProfileImageSettings.tsx
  92. 2 2
      packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx
  93. 1 1
      packages/app/src/components/Navbar/PersonalDropdown.jsx
  94. 1 1
      packages/app/src/components/Navbar/SubNavButtons.tsx
  95. 1 1
      packages/app/src/components/PageAlert/FixPageGrantAlert.tsx
  96. 1 1
      packages/app/src/components/PageAlert/PageRedirectedAlert.tsx
  97. 1 1
      packages/app/src/components/PageAlert/TrashPageAlert.tsx
  98. 1 1
      packages/app/src/components/PageComment.tsx
  99. 1 1
      packages/app/src/components/PageCreateModal.jsx
  100. 1 1
      packages/app/src/components/PageDuplicateModal.tsx

+ 0 - 1
packages/app/src/client/services/AdminCustomizeContainer.js

@@ -3,7 +3,6 @@ import { Container } from 'unstated';
 
 import loggerFactory from '~/utils/logger';
 
-import { toastError } from '../util/apiNotification';
 import { apiv3Get, apiv3Put } from '../util/apiv3-client';
 
 // eslint-disable-next-line no-unused-vars

+ 1 - 1
packages/app/src/client/services/AdminGeneralSecurityContainer.js

@@ -7,8 +7,8 @@ import {
 } from '~/interfaces/page-delete-config';
 import { removeNullPropertyFromObject } from '~/utils/object-utils';
 
-import { toastError } from '../util/apiNotification';
 import { apiv3Get, apiv3Put } from '../util/apiv3-client';
+import { toastError } from '../util/toastr';
 
 /**
  * Service container for admin security page (SecuritySetting.jsx)

+ 7 - 7
packages/app/src/client/services/AdminImportContainer.js

@@ -3,9 +3,9 @@ import { Container } from 'unstated';
 
 import loggerFactory from '~/utils/logger';
 
-import { toastSuccess, toastError } from '../util/apiNotification';
 import { apiPost } from '../util/apiv1-client';
 import { apiv3Get } from '../util/apiv3-client';
+import { toastSuccess, toastError } from '../util/toastr';
 
 const logger = loggerFactory('growi:appSettings');
 
@@ -82,7 +82,7 @@ export default class AdminImportContainer extends Container {
     }
     catch (err) {
       logger.error(err);
-      toastError(err, 'Error occurred in importing pages from esa.io');
+      toastError(err);
     }
   }
 
@@ -96,7 +96,7 @@ export default class AdminImportContainer extends Container {
       toastSuccess('Test connection to esa success.');
     }
     catch (error) {
-      toastError(error, 'Test connection to esa failed.');
+      toastError(error);
     }
   }
 
@@ -111,7 +111,7 @@ export default class AdminImportContainer extends Container {
     }
     catch (err) {
       logger.error(err);
-      toastError(err, 'Errors');
+      toastError(err);
     }
   }
 
@@ -126,7 +126,7 @@ export default class AdminImportContainer extends Container {
     }
     catch (err) {
       logger.error(err);
-      toastError(err, 'Error occurred in importing pages from qiita:team');
+      toastError(err);
     }
   }
 
@@ -142,7 +142,7 @@ export default class AdminImportContainer extends Container {
     }
     catch (err) {
       logger.error(err);
-      toastError(err, 'Test connection to qiita:team failed.');
+      toastError(err);
     }
   }
 
@@ -157,7 +157,7 @@ export default class AdminImportContainer extends Container {
     }
     catch (err) {
       logger.error(err);
-      toastError(err, 'Errors');
+      toastError(err);
     }
   }
 

+ 1 - 1
packages/app/src/client/services/page-operation.ts

@@ -9,9 +9,9 @@ import { useCurrentPageId, useSWRMUTxCurrentPage, useSWRxTagsInfo } from '~/stor
 import { useSetRemoteLatestPageData } from '~/stores/remote-latest-page';
 import loggerFactory from '~/utils/logger';
 
-import { toastError } from '../util/apiNotification';
 import { apiPost } from '../util/apiv1-client';
 import { apiv3Post, apiv3Put } from '../util/apiv3-client';
+import { toastError } from '../util/toastr';
 
 const logger = loggerFactory('growi:services:page-operation');
 

+ 1 - 1
packages/app/src/components/Admin/AdminHome/AdminHome.jsx

@@ -6,7 +6,7 @@ import { CopyToClipboard } from 'react-copy-to-clipboard';
 import { Tooltip } from 'reactstrap';
 
 import AdminHomeContainer from '~/client/services/AdminHomeContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { useSWRxV5MigrationStatus } from '~/stores/page-listing';
 import loggerFactory from '~/utils/logger';
 

+ 1 - 1
packages/app/src/components/Admin/App/AppSetting.jsx

@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
 import { i18n as i18nConfig } from '^/config/next-i18next.config';
 
 import AdminAppContainer from '~/client/services/AdminAppContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import loggerFactory from '~/utils/logger';
 
 

+ 1 - 1
packages/app/src/components/Admin/App/AppSettingsPageContents.tsx

@@ -3,7 +3,7 @@ import React, { useEffect } from 'react';
 import { useTranslation } from 'next-i18next';
 
 import AdminAppContainer from '~/client/services/AdminAppContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { useIsMaintenanceMode } from '~/stores/maintenanceMode';
 import { toArrayIfNot } from '~/utils/array-utils';
 import loggerFactory from '~/utils/logger';

+ 1 - 1
packages/app/src/components/Admin/App/FileUploadSetting.tsx

@@ -3,7 +3,7 @@ import React, { ChangeEvent, useCallback } from 'react';
 import { useTranslation } from 'next-i18next';
 
 import AdminAppContainer from '~/client/services/AdminAppContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import AdminUpdateButtonRow from '../Common/AdminUpdateButtonRow';

+ 1 - 1
packages/app/src/components/Admin/App/MailSetting.tsx

@@ -3,7 +3,7 @@ import React from 'react';
 import { useTranslation } from 'next-i18next';
 
 import AdminAppContainer from '~/client/services/AdminAppContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 

+ 1 - 1
packages/app/src/components/Admin/App/MaintenanceMode.tsx

@@ -2,7 +2,7 @@ import React, { FC, useState, useCallback } from 'react';
 
 import { useTranslation } from 'next-i18next';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useIsMaintenanceMode } from '~/stores/maintenanceMode';
 import loggerFactory from '~/utils/logger';
 

+ 1 - 1
packages/app/src/components/Admin/App/SiteUrlSetting.tsx

@@ -3,7 +3,7 @@ import React, { useCallback } from 'react';
 import { useTranslation } from 'next-i18next';
 
 import AdminAppContainer from '~/client/services/AdminAppContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import loggerFactory from '~/utils/logger';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 11 - 6
packages/app/src/components/Admin/App/V5PageMigration.tsx

@@ -1,16 +1,21 @@
 import React, {
   FC, useCallback, useEffect, useState,
 } from 'react';
+
 import { useTranslation } from 'next-i18next';
-import { ConfirmModal } from './ConfirmModal';
-import AdminAppContainer from '../../../client/services/AdminAppContainer';
-import { withUnstatedContainers } from '../../UnstatedUtils';
-import { toastSuccess, toastError } from '../../../client/util/apiNotification';
-import { useGlobalAdminSocket } from '~/stores/websocket';
-import LabeledProgressBar from '../Common/LabeledProgressBar';
+
+import { toastError, toastSuccess } from '~/client/util/toastr';
 import {
   SocketEventName, PMStartedData, PMMigratingData, PMErrorCountData, PMEndedData,
 } from '~/interfaces/websocket';
+import { useGlobalAdminSocket } from '~/stores/websocket';
+
+import AdminAppContainer from '../../../client/services/AdminAppContainer';
+import { withUnstatedContainers } from '../../UnstatedUtils';
+import LabeledProgressBar from '../Common/LabeledProgressBar';
+
+import { ConfirmModal } from './ConfirmModal';
+
 
 type Props = {
   adminAppContainer: typeof AdminAppContainer & { v5PageMigrationHandler: () => Promise<{ isV5Compatible: boolean }> },

+ 1 - 1
packages/app/src/components/Admin/AuditLogManagement.tsx

@@ -6,7 +6,7 @@ import { format } from 'date-fns';
 import { useTranslation } from 'react-i18next';
 
 import { IClearable } from '~/client/interfaces/clearable';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { SupportedActionType } from '~/interfaces/activity';
 import { useSWRxActivity } from '~/stores/activity';
 import { useAuditLogEnabled, useAuditLogAvailableActions } from '~/stores/context';

+ 1 - 1
packages/app/src/components/Admin/Customize/Customize.jsx

@@ -4,7 +4,7 @@ import React, { useEffect, useCallback } from 'react';
 import PropTypes from 'prop-types';
 
 import AdminCustomizeContainer from '~/client/services/AdminCustomizeContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 import loggerFactory from '~/utils/logger';
 

+ 1 - 1
packages/app/src/components/Admin/Customize/CustomizeCssSetting.tsx

@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
 import { Card, CardBody } from 'reactstrap';
 
 import AdminCustomizeContainer from '~/client/services/AdminCustomizeContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import AdminUpdateButtonRow from '../Common/AdminUpdateButtonRow';

+ 1 - 1
packages/app/src/components/Admin/Customize/CustomizeFunctionSetting.tsx

@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
 import { Card, CardBody } from 'reactstrap';
 
 import AdminCustomizeContainer from '~/client/services/AdminCustomizeContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import AdminUpdateButtonRow from '../Common/AdminUpdateButtonRow';

+ 1 - 1
packages/app/src/components/Admin/Customize/CustomizeLayoutSetting.tsx

@@ -4,7 +4,7 @@ import React, {
 
 import { useTranslation } from 'next-i18next';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useSWRxLayoutSetting } from '~/stores/admin/customize';
 import { useNextThemes } from '~/stores/use-next-themes';
 

+ 1 - 1
packages/app/src/components/Admin/Customize/CustomizeLogoSetting.tsx

@@ -2,10 +2,10 @@ import React, { useCallback, useMemo, useState } from 'react';
 
 import { useTranslation } from 'react-i18next';
 
-import { toastError, toastSuccess } from '~/client/util/apiNotification';
 import {
   apiv3Delete, apiv3PostForm, apiv3Put,
 } from '~/client/util/apiv3-client';
+import { toastError, toastSuccess } from '~/client/util/toastr';
 import ImageCropModal from '~/components/Common/ImageCropModal';
 import { useIsDefaultLogo, useIsCustomizedLogoUploaded } from '~/stores/context';
 

+ 1 - 1
packages/app/src/components/Admin/Customize/CustomizeNoscriptSetting.tsx

@@ -6,7 +6,7 @@ import { oneDark } from 'react-syntax-highlighter/dist/cjs/styles/prism';
 import { Card, CardBody } from 'reactstrap';
 
 import AdminCustomizeContainer from '~/client/services/AdminCustomizeContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import AdminUpdateButtonRow from '../Common/AdminUpdateButtonRow';

+ 1 - 1
packages/app/src/components/Admin/Customize/CustomizeScriptSetting.tsx

@@ -6,7 +6,7 @@ import { oneDark } from 'react-syntax-highlighter/dist/cjs/styles/prism';
 import { Card, CardBody } from 'reactstrap';
 
 import AdminCustomizeContainer from '~/client/services/AdminCustomizeContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import AdminUpdateButtonRow from '../Common/AdminUpdateButtonRow';

+ 1 - 1
packages/app/src/components/Admin/Customize/CustomizeSidebarSetting.tsx

@@ -3,7 +3,7 @@ import React, { useCallback } from 'react';
 import { useTranslation } from 'next-i18next';
 import { Card, CardBody } from 'reactstrap';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useSWRxSidebarConfig } from '~/stores/ui';
 import { useNextThemes } from '~/stores/use-next-themes';
 

+ 1 - 1
packages/app/src/components/Admin/Customize/CustomizeTitle.tsx

@@ -3,8 +3,8 @@ import React, { FC, useState } from 'react';
 import { useTranslation } from 'next-i18next';
 import { Card, CardBody } from 'reactstrap';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useCustomizeTitle } from '~/stores/context';
 
 import AdminUpdateButtonRow from '../Common/AdminUpdateButtonRow';

+ 2 - 2
packages/app/src/components/Admin/ElasticsearchManagement/ElasticsearchManagement.tsx

@@ -3,8 +3,8 @@ import React, { useEffect, useState, useCallback } from 'react';
 import { useTranslation } from 'next-i18next';
 
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Get, apiv3Post, apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { SocketEventName } from '~/interfaces/websocket';
 import { useIsSearchServiceReachable } from '~/stores/context';
 import { useAdminSocket } from '~/stores/socket-io';
@@ -89,7 +89,7 @@ const ElasticsearchManagement = () => {
     });
 
     socket.on(SocketEventName.RebuildingFailed, (data) => {
-      toastError(new Error(data.error), 'Rebuilding Index has failed.');
+      toastError(new Error(data.error));
     });
 
     return () => {

+ 1 - 1
packages/app/src/components/Admin/G2GDataTransfer.tsx

@@ -5,8 +5,8 @@ import React, {
 import { useTranslation } from 'next-i18next';
 
 import { useGenerateTransferKey } from '~/client/services/g2g-transfer';
-import { toastError, toastSuccess } from '~/client/util/apiNotification';
 import { apiv3Get, apiv3Post } from '~/client/util/apiv3-client';
+import { toastError, toastSuccess } from '~/client/util/toastr';
 import { G2G_PROGRESS_STATUS, type G2GProgress } from '~/interfaces/g2g-transfer';
 import { useAdminSocket } from '~/stores/socket-io';
 

+ 3 - 3
packages/app/src/components/Admin/ImportData/GrowiArchive/ImportForm.jsx

@@ -3,8 +3,8 @@ import React from 'react';
 import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Post } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import GrowiArchiveImportOption from '~/models/admin/growi-archive-import-option';
 import ImportOptionForPages from '~/models/admin/import-option-for-pages';
 import ImportOptionForRevisions from '~/models/admin/import-option-for-revisions';
@@ -136,7 +136,7 @@ class ImportForm extends React.Component {
         isImported: false,
       });
 
-      toastError(err, 'Import process has failed.');
+      toastError(err);
     });
   }
 
@@ -316,7 +316,7 @@ class ImportForm extends React.Component {
       if (err.code === 'only_upsert_available') {
         toastError(t('admin:importer_management.error.only_upsert_available'));
       }
-      toastError(err, 'Import request failed.');
+      toastError(err);
     }
   }
 

+ 1 - 1
packages/app/src/components/Admin/ImportData/GrowiArchive/UploadForm.jsx

@@ -3,8 +3,8 @@ import React from 'react';
 import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
-import { toastError } from '~/client/util/apiNotification';
 import { apiv3PostForm } from '~/client/util/apiv3-client';
+import { toastError } from '~/client/util/toastr';
 
 class UploadForm extends React.Component {
 

+ 1 - 1
packages/app/src/components/Admin/ImportData/ImportDataPageContents.jsx

@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
 import AdminImportContainer from '~/client/services/AdminImportContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 import loggerFactory from '~/utils/logger';
 

+ 1 - 1
packages/app/src/components/Admin/LegacySlackIntegration/LegacySlackIntegration.jsx

@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
 import AdminSlackIntegrationLegacyContainer from '~/client/services/AdminSlackIntegrationLegacyContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 import loggerFactory from '~/utils/logger';
 

+ 1 - 1
packages/app/src/components/Admin/LegacySlackIntegration/SlackConfiguration.jsx

@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
 import AdminSlackIntegrationLegacyContainer from '~/client/services/AdminSlackIntegrationLegacyContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import loggerFactory from '~/utils/logger';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/ManageExternalAccount.tsx

@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
 import Link from 'next/link';
 
 import AdminExternalAccountsContainer from '~/client/services/AdminExternalAccountsContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 
 import PaginationWrapper from '../PaginationWrapper';
 import { withUnstatedContainers } from '../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/MarkdownSetting/IndentForm.tsx

@@ -7,7 +7,7 @@ import {
 } from 'reactstrap';
 
 import AdminMarkDownContainer from '~/client/services/AdminMarkDownContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import loggerFactory from '~/utils/logger';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/MarkdownSetting/LineBreakForm.jsx

@@ -5,7 +5,7 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
 import AdminMarkDownContainer from '~/client/services/AdminMarkDownContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import loggerFactory from '~/utils/logger';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/MarkdownSetting/MarkDownSettingContents.tsx

@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
 import { Card, CardBody } from 'reactstrap';
 
 import AdminMarkDownContainer from '~/client/services/AdminMarkDownContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 import loggerFactory from '~/utils/logger';
 

+ 1 - 1
packages/app/src/components/Admin/MarkdownSetting/XssForm.jsx

@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
 import { defaultSchema as sanitizeDefaultSchema } from 'rehype-sanitize';
 
 import AdminMarkDownContainer from '~/client/services/AdminMarkDownContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { RehypeSanitizeOption } from '~/interfaces/rehype';
 import loggerFactory from '~/utils/logger';
 

+ 1 - 1
packages/app/src/components/Admin/Notification/GlobalNotification.jsx

@@ -5,7 +5,7 @@ import { useRouter } from 'next/router';
 import PropTypes from 'prop-types';
 
 import AdminNotificationContainer from '~/client/services/AdminNotificationContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import loggerFactory from '~/utils/logger';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Notification/GlobalNotificationList.jsx

@@ -5,8 +5,8 @@ import PropTypes from 'prop-types';
 import urljoin from 'url-join';
 
 import AdminNotificationContainer from '~/client/services/AdminNotificationContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import loggerFactory from '~/utils/logger';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Notification/ManageGlobalNotification.tsx

@@ -6,8 +6,8 @@ import { useTranslation } from 'next-i18next';
 import { useRouter } from 'next/router';
 
 import { NotifyType, TriggerEventType } from '~/client/interfaces/global-notification';
-import { toastError } from '~/client/util/apiNotification';
 import { apiv3Post } from '~/client/util/apiv3-client';
+import { toastError } from '~/client/util/toastr';
 import { useIsMailerSetup } from '~/stores/context';
 import { useSWRxGlobalNotification } from '~/stores/global-notification';
 import loggerFactory from '~/utils/logger';

+ 1 - 1
packages/app/src/components/Admin/Notification/NotificationSetting.jsx

@@ -10,7 +10,7 @@ import {
 } from 'reactstrap';
 
 import AdminNotificationContainer from '~/client/services/AdminNotificationContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 import loggerFactory from '~/utils/logger';
 

+ 1 - 1
packages/app/src/components/Admin/Notification/UserTriggerNotification.jsx

@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
 import AdminNotificationContainer from '~/client/services/AdminNotificationContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import loggerFactory from '~/utils/logger';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Security/GitHubSecuritySetting.jsx

@@ -3,7 +3,7 @@ import React, { useEffect, useCallback } from 'react';
 import PropTypes from 'prop-types';
 
 import AdminGitHubSecurityContainer from '~/client/services/AdminGitHubSecurityContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Security/GitHubSecuritySettingContents.jsx

@@ -9,7 +9,7 @@ import urljoin from 'url-join';
 
 import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
 import AdminGitHubSecurityContainer from '~/client/services/AdminGitHubSecurityContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useSiteUrl } from '~/stores/context';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Security/GoogleSecuritySetting.jsx

@@ -3,7 +3,7 @@ import React, { useEffect, useCallback } from 'react';
 import PropTypes from 'prop-types';
 
 import AdminGoogleSecurityContainer from '~/client/services/AdminGoogleSecurityContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Security/GoogleSecuritySettingContents.jsx

@@ -7,7 +7,7 @@ import urljoin from 'url-join';
 
 import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
 import AdminGoogleSecurityContainer from '~/client/services/AdminGoogleSecurityContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useSiteUrl } from '~/stores/context';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 2 - 2
packages/app/src/components/Admin/Security/LdapAuthTest.tsx

@@ -2,10 +2,10 @@ import React, { useState } from 'react';
 
 import { useTranslation } from 'next-i18next';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiPost } from '~/client/util/apiv1-client';
-import loggerFactory from '~/utils/logger';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { IResTestLdap } from '~/interfaces/ldap';
+import loggerFactory from '~/utils/logger';
 
 const logger = loggerFactory('growi:security:AdminLdapSecurityContainer');
 

+ 1 - 1
packages/app/src/components/Admin/Security/LdapSecuritySetting.jsx

@@ -3,7 +3,7 @@ import React, { useEffect, useCallback } from 'react';
 import PropTypes from 'prop-types';
 
 import AdminLdapSecurityContainer from '~/client/services/AdminLdapSecurityContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 2 - 2
packages/app/src/components/Admin/Security/LdapSecuritySettingContents.jsx

@@ -1,11 +1,11 @@
 import React from 'react';
 
-import PropTypes from 'prop-types';
 import { useTranslation } from 'next-i18next';
+import PropTypes from 'prop-types';
 
 import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
 import AdminLdapSecurityContainer from '~/client/services/AdminLdapSecurityContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 

+ 1 - 1
packages/app/src/components/Admin/Security/LocalSecuritySetting.jsx

@@ -3,7 +3,7 @@ import React, { useEffect, useCallback } from 'react';
 import PropTypes from 'prop-types';
 
 import AdminLocalSecurityContainer from '~/client/services/AdminLocalSecurityContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Security/LocalSecuritySettingContents.jsx

@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
 
 import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
 import AdminLocalSecurityContainer from '~/client/services/AdminLocalSecurityContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useIsMailerSetup } from '~/stores/context';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Security/OidcSecuritySetting.jsx

@@ -3,7 +3,7 @@ import React, { useEffect, useCallback } from 'react';
 import PropTypes from 'prop-types';
 
 import AdminOidcSecurityContainer from '~/client/services/AdminOidcSecurityContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Security/OidcSecuritySettingContents.jsx

@@ -8,7 +8,7 @@ import urljoin from 'url-join';
 
 import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
 import AdminOidcSecurityContainer from '~/client/services/AdminOidcSecurityContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useSiteUrl } from '~/stores/context';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Security/SamlSecuritySetting.jsx

@@ -3,7 +3,7 @@ import React, { useEffect, useCallback } from 'react';
 import PropTypes from 'prop-types';
 
 import AdminSamlSecurityContainer from '~/client/services/AdminSamlSecurityContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Security/SamlSecuritySettingContents.jsx

@@ -10,7 +10,7 @@ import urljoin from 'url-join';
 
 import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
 import AdminSamlSecurityContainer from '~/client/services/AdminSamlSecurityContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useSiteUrl } from '~/stores/context';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Security/SecurityManagement.tsx

@@ -3,7 +3,7 @@ import React, { useEffect, useCallback } from 'react';
 import PropTypes from 'prop-types';
 
 import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { toArrayIfNot } from '~/utils/array-utils';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Security/SecuritySetting.jsx

@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
 import { Collapse } from 'reactstrap';
 
 import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { PageDeleteConfigValue } from '~/interfaces/page-delete-config';
 import { validateDeleteConfigs, prepareDeleteConfigValuesForCalc } from '~/utils/page-delete-config';
 

+ 1 - 1
packages/app/src/components/Admin/Security/ShareLinkSetting.tsx

@@ -5,8 +5,8 @@ import React, {
 import { useTranslation } from 'next-i18next';
 
 import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Delete } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import PaginationWrapper from '../../PaginationWrapper';
 import ShareLinkList from '../../ShareLink/ShareLinkList';

+ 4 - 4
packages/app/src/components/Admin/SlackIntegration/CustomBotWithProxySettings.jsx

@@ -3,8 +3,8 @@ import React, { useState, useEffect, useCallback } from 'react';
 import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Delete, apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useAppTitle } from '~/stores/context';
 import loggerFactory from '~/utils/logger';
 
@@ -53,7 +53,7 @@ const CustomBotWithProxySettings = (props) => {
       toastSuccess(t('toaster.update_successed', { target: 'Primary', ns: 'commons' }));
     }
     catch (err) {
-      toastError(err, 'Failed to change isPrimary');
+      toastError(err);
       logger.error('Failed to change isPrimary', err);
     }
   }, [t, onPrimaryUpdated]);
@@ -67,7 +67,7 @@ const CustomBotWithProxySettings = (props) => {
       toastSuccess(t('admin:slack_integration.toastr.delete_slack_integration_procedure'));
     }
     catch (err) {
-      toastError(err, 'Failed to delete');
+      toastError(err);
       logger.error('Failed to delete', err);
     }
   };
@@ -80,7 +80,7 @@ const CustomBotWithProxySettings = (props) => {
       toastSuccess(t('toaster.update_successed', { target: 'Proxy URL', ns: 'commons' }));
     }
     catch (err) {
-      toastError(err, 'Failed to update');
+      toastError(err);
       logger.error('Failed to update', err);
     }
   };

+ 1 - 1
packages/app/src/components/Admin/SlackIntegration/CustomBotWithoutProxySecretTokenSection.jsx

@@ -3,8 +3,8 @@ import React, { useState, useEffect } from 'react';
 import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 import AdminUpdateButtonRow from '../Common/AdminUpdateButtonRow';

+ 1 - 1
packages/app/src/components/Admin/SlackIntegration/ManageCommandsProcess.jsx

@@ -5,9 +5,9 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
 import { apiv3Put } from '~/client/util/apiv3-client';
+import { toastError, toastSuccess } from '~/client/util/toastr';
 import loggerFactory from '~/utils/logger';
 
-import { toastSuccess, toastError } from '../../../client/util/apiNotification';
 
 const logger = loggerFactory('growi:SlackIntegration:ManageCommandsProcess');
 

+ 1 - 1
packages/app/src/components/Admin/SlackIntegration/ManageCommandsProcessWithoutProxy.jsx

@@ -5,9 +5,9 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
 import { apiv3Put } from '~/client/util/apiv3-client';
+import { toastError, toastSuccess } from '~/client/util/toastr';
 import loggerFactory from '~/utils/logger';
 
-import { toastSuccess, toastError } from '../../../client/util/apiNotification';
 
 const logger = loggerFactory('growi:SlackIntegration:ManageCommandsProcess');
 

+ 2 - 2
packages/app/src/components/Admin/SlackIntegration/OfficialBotSettings.jsx

@@ -5,8 +5,8 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Delete, apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useAppTitle } from '~/stores/context';
 import loggerFactory from '~/utils/logger';
 
@@ -49,7 +49,7 @@ const OfficialBotSettings = (props) => {
       toastSuccess(t('toaster.update_successed', { target: 'Primary', ns: 'commons' }));
     }
     catch (err) {
-      toastError(err, 'Failed to change isPrimary');
+      toastError(err);
       logger.error('Failed to change isPrimary', err);
     }
   }, [t, onPrimaryUpdated]);

+ 1 - 1
packages/app/src/components/Admin/SlackIntegration/SlackIntegration.jsx

@@ -4,10 +4,10 @@ import { SlackbotType } from '@growi/slack';
 import { useTranslation } from 'next-i18next';
 
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import {
   apiv3Delete, apiv3Get, apiv3Post, apiv3Put,
 } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import BotTypeCard from './BotTypeCard';
 import ConfirmBotChangeModal from './ConfirmBotChangeModal';

+ 1 - 1
packages/app/src/components/Admin/SlackIntegration/WithProxyAccordions.jsx

@@ -7,8 +7,8 @@ import PropTypes from 'prop-types';
 import { CopyToClipboard } from 'react-copy-to-clipboard';
 import { Tooltip } from 'reactstrap';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Put, apiv3Post } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useSiteUrl } from '~/stores/context';
 import loggerFactory from '~/utils/logger';
 

+ 1 - 1
packages/app/src/components/Admin/UserGroup/UserGroupPage.tsx

@@ -3,8 +3,8 @@ import React, { FC, useState, useCallback } from 'react';
 import dynamic from 'next/dynamic';
 import { useTranslation } from 'react-i18next';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Delete, apiv3Post, apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { IUserGroup, IUserGroupHasId } from '~/interfaces/user';
 import { useIsAclEnabled } from '~/stores/context';
 import { useSWRxUserGroupList, useSWRxChildUserGroupList, useSWRxUserGroupRelationList } from '~/stores/user-group';

+ 1 - 1
packages/app/src/components/Admin/UserGroupDetail/UserGroupDetailPage.tsx

@@ -8,10 +8,10 @@ import dynamic from 'next/dynamic';
 import Link from 'next/link';
 import { useRouter } from 'next/router';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import {
   apiv3Get, apiv3Put, apiv3Delete, apiv3Post,
 } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { IUserGroup, IUserGroupHasId } from '~/interfaces/user';
 import { SearchTypes, SearchType } from '~/interfaces/user-group';
 import Xss from '~/services/xss';

+ 1 - 1
packages/app/src/components/Admin/UserGroupDetail/UserGroupPageList.tsx

@@ -2,8 +2,8 @@ import React, { useEffect, useState, useCallback } from 'react';
 
 import { useTranslation } from 'next-i18next';
 
-import { toastError } from '~/client/util/apiNotification';
 import { apiv3Get } from '~/client/util/apiv3-client';
+import { toastError } from '~/client/util/toastr';
 import { IPageHasId } from '~/interfaces/page';
 
 import { PageListItemS } from '../../PageList/PageListItemS';

+ 1 - 1
packages/app/src/components/Admin/UserGroupDetail/UserGroupUserFormByInput.jsx

@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
 import { AsyncTypeahead } from 'react-bootstrap-typeahead';
 import { debounce } from 'throttle-debounce';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import Xss from '~/services/xss';
 
 class UserGroupUserFormByInput extends React.Component {

+ 1 - 1
packages/app/src/components/Admin/UserManagement.tsx

@@ -6,7 +6,7 @@ import { useTranslation } from 'next-i18next';
 import Link from 'next/link';
 
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 
 import PaginationWrapper from '../PaginationWrapper';
 import { withUnstatedContainers } from '../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Users/ExternalAccountTable.tsx

@@ -5,7 +5,7 @@ import dateFnsFormat from 'date-fns/format';
 import { useTranslation } from 'next-i18next';
 
 import AdminExternalAccountsContainer from '~/client/services/AdminExternalAccountsContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 

+ 1 - 1
packages/app/src/components/Admin/Users/GiveAdminButton.tsx

@@ -4,7 +4,7 @@ import type { IUserHasId } from '@growi/core';
 import { useTranslation } from 'next-i18next';
 
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 

+ 2 - 2
packages/app/src/components/Admin/Users/PasswordResetModal.jsx

@@ -6,8 +6,8 @@ import {
   Modal, ModalHeader, ModalBody, ModalFooter,
 } from 'reactstrap';
 
-import { toastError } from '~/client/util/apiNotification';
 import { apiv3Put } from '~/client/util/apiv3-client';
+import { toastError } from '~/client/util/toastr';
 
 
 class PasswordResetModal extends React.Component {
@@ -29,7 +29,7 @@ class PasswordResetModal extends React.Component {
       this.setState({ isPasswordResetDone: true });
     }
     catch (err) {
-      toastError(err, t('toaster.failed_to_reset_password'));
+      toastError(err);
     }
   }
 

+ 1 - 1
packages/app/src/components/Admin/Users/RemoveAdminButton.tsx

@@ -4,7 +4,7 @@ import type { IUserHasId } from '@growi/core';
 import { useTranslation } from 'next-i18next';
 
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useCurrentUser } from '~/stores/context';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Users/RemoveAdminMenuItem.tsx

@@ -4,7 +4,7 @@ import type { IUserHasId } from '@growi/core';
 import { useTranslation } from 'next-i18next';
 
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useCurrentUser } from '~/stores/context';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Users/SendInvitationEmailButton.jsx

@@ -4,8 +4,8 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 

+ 1 - 1
packages/app/src/components/Admin/Users/StatusActivateButton.jsx

@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 

+ 1 - 1
packages/app/src/components/Admin/Users/StatusSuspendMenuItem.tsx

@@ -4,7 +4,7 @@ import type { IUserHasId } from '@growi/core';
 import { useTranslation } from 'next-i18next';
 
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { withUnstatedContainers } from '~/components/UnstatedUtils';
 import { useCurrentUser } from '~/stores/context';
 

+ 1 - 1
packages/app/src/components/Admin/Users/UserInviteModal.jsx

@@ -10,7 +10,7 @@ import {
 
 
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
-import { toastSuccess, toastError, toastWarning } from '~/client/util/apiNotification';
+import { toastSuccess, toastError, toastWarning } from '~/client/util/toastr';
 import { useIsMailerSetup } from '~/stores/context';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';

+ 1 - 1
packages/app/src/components/Admin/Users/UserRemoveButton.jsx

@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import { withUnstatedContainers } from '../../UnstatedUtils';
 

+ 1 - 1
packages/app/src/components/ArchiveCreateModal.jsx

@@ -6,8 +6,8 @@ import {
   Modal, ModalHeader, ModalBody, ModalFooter,
 } from 'reactstrap';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Post } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 
 const ArchiveCreateModal = (props) => {

+ 1 - 1
packages/app/src/components/Common/ImageCropModal.tsx

@@ -13,7 +13,7 @@ import {
 } from 'reactstrap';
 
 
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import loggerFactory from '~/utils/logger';
 import 'react-image-crop/dist/ReactCrop.css';
 

+ 3 - 3
packages/app/src/components/CompleteUserRegistrationForm.tsx

@@ -7,7 +7,7 @@ import { apiv3Get, apiv3Post } from '~/client/util/apiv3-client';
 import { UserActivationErrorCode } from '~/interfaces/errors/user-activation';
 import { RegistrationMode } from '~/interfaces/registration-mode';
 
-import { toastError } from '../client/util/apiNotification';
+import { toastError } from '../client/util/toastr';
 
 import { CompleteUserRegistration } from './CompleteUserRegistration';
 
@@ -50,7 +50,7 @@ const CompleteUserRegistrationForm: React.FC<Props> = (props: Props) => {
         }
       }
       catch (error) {
-        toastError(error, 'Error occurred when checking username');
+        toastError(error);
       }
     }, 500);
 
@@ -73,7 +73,7 @@ const CompleteUserRegistrationForm: React.FC<Props> = (props: Props) => {
       }
     }
     catch (err) {
-      toastError(err, 'Registration failed');
+      toastError(err);
       setDisableForm(false);
       setIsSuccessToRagistration(false);
     }

+ 1 - 1
packages/app/src/components/DescendantsPageList.tsx

@@ -2,7 +2,7 @@ import React, { useCallback, useState } from 'react';
 
 import { useTranslation } from 'next-i18next';
 
-import { toastSuccess } from '~/client/util/apiNotification';
+import { toastSuccess } from '~/client/util/toastr';
 import {
   IDataWithMeta,
   IPageHasId,

+ 1 - 1
packages/app/src/components/InAppNotification/InAppNotificationDropdown.tsx

@@ -7,8 +7,8 @@ import {
 } from 'reactstrap';
 
 
-import { toastError } from '~/client/util/apiNotification';
 import { apiv3Post } from '~/client/util/apiv3-client';
+import { toastError } from '~/client/util/toastr';
 import { useSWRxInAppNotifications, useSWRxInAppNotificationStatus } from '~/stores/in-app-notification';
 import { useDefaultSocket } from '~/stores/socket-io';
 import loggerFactory from '~/utils/logger';

+ 1 - 1
packages/app/src/components/InstallerForm.tsx

@@ -7,8 +7,8 @@ import { useRouter } from 'next/router';
 
 import { i18n as i18nConfig } from '^/config/next-i18next.config';
 
-import { toastError } from '~/client/util/apiNotification';
 import { apiv3Post } from '~/client/util/apiv3-client';
+import { toastError } from '~/client/util/toastr';
 
 const InstallerForm = memo((): JSX.Element => {
   const { t, i18n } = useTranslation();

+ 1 - 1
packages/app/src/components/Me/ApiSettings.tsx

@@ -2,8 +2,8 @@ import React, { useCallback } from 'react';
 
 import { useTranslation } from 'next-i18next';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useSWRxPersonalSettings, usePersonalSettings } from '~/stores/personal-settings';
 
 

+ 1 - 1
packages/app/src/components/Me/AssociateModal.tsx

@@ -12,7 +12,7 @@ import {
   TabPane,
 } from 'reactstrap';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { usePersonalSettings, useSWRxPersonalExternalAccounts } from '~/stores/personal-settings';
 
 import { LdapAuthTest } from '../Admin/Security/LdapAuthTest';

+ 1 - 1
packages/app/src/components/Me/BasicInfoSettings.tsx

@@ -4,7 +4,7 @@ import { useTranslation, i18n } from 'next-i18next';
 
 import { i18n as i18nConfig } from '^/config/next-i18next.config';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useRegistrationWhiteList } from '~/stores/context';
 import { usePersonalSettings } from '~/stores/personal-settings';
 

+ 1 - 1
packages/app/src/components/Me/DisassociateModal.tsx

@@ -8,7 +8,7 @@ import {
   ModalFooter,
 } from 'reactstrap';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { IExternalAccount } from '~/interfaces/external-account';
 import { usePersonalSettings, useSWRxPersonalExternalAccounts } from '~/stores/personal-settings';
 

+ 1 - 1
packages/app/src/components/Me/EditorSettings.tsx

@@ -6,7 +6,7 @@ import React, {
 
 import { useTranslation } from 'next-i18next';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { useEditorSettings } from '~/stores/editor';
 
 

+ 1 - 1
packages/app/src/components/Me/InAppNotificationSettings.tsx

@@ -5,8 +5,8 @@ import React, {
 import { pullAllBy } from 'lodash';
 import { useTranslation } from 'next-i18next';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Get, apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { subscribeRuleNames, SubscribeRuleDescriptions } from '~/interfaces/in-app-notification';
 
 type SubscribeRule = {

+ 1 - 1
packages/app/src/components/Me/PasswordSettings.jsx

@@ -3,8 +3,8 @@ import React, { useCallback } from 'react';
 import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Get, apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import { usePersonalSettings } from '~/stores/personal-settings';
 
 

+ 1 - 1
packages/app/src/components/Me/ProfileImageSettings.tsx

@@ -3,9 +3,9 @@ import React, { useCallback, useState } from 'react';
 
 import { useTranslation } from 'next-i18next';
 
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiPost, apiPostForm } from '~/client/util/apiv1-client';
 import { apiv3Put } from '~/client/util/apiv3-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import ImageCropModal from '~/components/Common/ImageCropModal';
 import { useCurrentUser } from '~/stores/context';
 import { generateGravatarSrc, GRAVATAR_DEFAULT } from '~/utils/gravatar';

+ 2 - 2
packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx

@@ -9,8 +9,8 @@ import { useRouter } from 'next/router';
 import { DropdownItem } from 'reactstrap';
 
 import { exportAsMarkdown, updateContentWidth, useUpdateStateAfterSave } from '~/client/services/page-operation';
-import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiPost } from '~/client/util/apiv1-client';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 import {
   IPageToRenameWithMeta, IPageWithMeta, IPageInfoForEntity,
 } from '~/interfaces/page';
@@ -269,7 +269,7 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
       toastSuccess('updated tags successfully');
     }
     catch (err) {
-      toastError(err, 'fail to update tags');
+      toastError(err);
     }
 
   }, [currentPage, updateStateAfterSave]);

+ 1 - 1
packages/app/src/components/Navbar/PersonalDropdown.jsx

@@ -5,8 +5,8 @@ import { useTranslation } from 'next-i18next';
 import Link from 'next/link';
 import { useRipple } from 'react-use-ripple';
 
-import { toastError } from '~/client/util/apiNotification';
 import { apiv3Post } from '~/client/util/apiv3-client';
+import { toastError } from '~/client/util/toastr';
 import { useCurrentUser } from '~/stores/context';
 
 const PersonalDropdown = () => {

+ 1 - 1
packages/app/src/components/Navbar/SubNavButtons.tsx

@@ -6,7 +6,7 @@ import { DropdownItem } from 'reactstrap';
 import {
   toggleBookmark, toggleLike, toggleSubscribe,
 } from '~/client/services/page-operation';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import {
   IPageInfoForOperation, IPageToDeleteWithMeta, IPageToRenameWithMeta, isIPageInfoForEntity, isIPageInfoForOperation,
 } from '~/interfaces/page';

+ 1 - 1
packages/app/src/components/PageAlert/FixPageGrantAlert.tsx

@@ -5,8 +5,8 @@ import {
   Modal, ModalHeader, ModalBody, ModalFooter,
 } from 'reactstrap';
 
-import { toastError, toastSuccess } from '~/client/util/apiNotification';
 import { apiv3Put } from '~/client/util/apiv3-client';
+import { toastError, toastSuccess } from '~/client/util/toastr';
 import { PageGrant, IPageGrantData } from '~/interfaces/page';
 import { IRecordApplicableGrant, IResIsGrantNormalizedGrantData } from '~/interfaces/page-grant';
 import { useCurrentUser } from '~/stores/context';

+ 1 - 1
packages/app/src/components/PageAlert/PageRedirectedAlert.tsx

@@ -3,7 +3,7 @@ import React, { useState, useCallback } from 'react';
 import { useTranslation } from 'next-i18next';
 
 import { unlink } from '~/client/services/page-operation';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { useCurrentPagePath } from '~/stores/page';
 import { useRedirectFrom } from '~/stores/page-redirect';
 

+ 1 - 1
packages/app/src/components/PageAlert/TrashPageAlert.tsx

@@ -6,7 +6,7 @@ import { useRouter } from 'next/router';
 import { useTranslation } from 'react-i18next';
 
 import { unlink } from '~/client/services/page-operation';
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { usePageDeleteModal, usePutBackPageModal } from '~/stores/modal';
 import {
   useCurrentPagePath, useSWRxPageInfo, useSWRxCurrentPage, useIsTrashPage,

+ 1 - 1
packages/app/src/components/PageComment.tsx

@@ -5,8 +5,8 @@ import React, {
 import { IRevisionHasId, isPopulated, getIdForRef } from '@growi/core';
 import { Button } from 'reactstrap';
 
-import { toastError } from '~/client/util/apiNotification';
 import { apiPost } from '~/client/util/apiv1-client';
+import { toastError } from '~/client/util/toastr';
 import { RendererOptions } from '~/services/renderer/renderer';
 import { useCommentForCurrentPageOptions } from '~/stores/renderer';
 

+ 1 - 1
packages/app/src/components/PageCreateModal.jsx

@@ -11,7 +11,7 @@ import {
 } from 'reactstrap';
 import { debounce } from 'throttle-debounce';
 
-import { toastError } from '~/client/util/apiNotification';
+import { toastError } from '~/client/util/toastr';
 import { useCurrentUser, useIsSearchServiceReachable } from '~/stores/context';
 import { usePageCreateModal } from '~/stores/modal';
 import { EditorMode, useEditorMode } from '~/stores/ui';

+ 1 - 1
packages/app/src/components/PageDuplicateModal.tsx

@@ -8,8 +8,8 @@ import {
 } from 'reactstrap';
 import { debounce } from 'throttle-debounce';
 
-import { toastError } from '~/client/util/apiNotification';
 import { apiv3Get, apiv3Post } from '~/client/util/apiv3-client';
+import { toastError } from '~/client/util/toastr';
 import { useIsSearchServiceReachable, useSiteUrl } from '~/stores/context';
 import { usePageDuplicateModal } from '~/stores/modal';
 

Некоторые файлы не были показаны из-за большого количества измененных файлов