Răsfoiți Sursa

Merge remote-tracking branch 'origin/master' into support/use-turborepo

Yuki Takei 3 ani în urmă
părinte
comite
d094343438
100 a modificat fișierele cu 220 adăugiri și 252 ștergeri
  1. 23 1
      CHANGELOG.md
  2. 1 1
      apps/app/docker/README.md
  3. 14 12
      apps/app/next.config.js
  4. 19 17
      apps/app/package.json
  5. 0 1
      apps/app/public/static/locales/en_US/admin.json
  6. 0 1
      apps/app/public/static/locales/ja_JP/admin.json
  7. 0 1
      apps/app/public/static/locales/zh_CN/admin.json
  8. 0 1
      apps/app/src/client/services/AdminCustomizeContainer.js
  9. 1 1
      apps/app/src/client/services/AdminGeneralSecurityContainer.js
  10. 7 7
      apps/app/src/client/services/AdminImportContainer.js
  11. 1 1
      apps/app/src/client/services/page-operation.ts
  12. 5 5
      apps/app/src/client/services/renderer/renderer.tsx
  13. 0 7
      apps/app/src/client/util/apiNotification.js
  14. 0 53
      apps/app/src/client/util/toastr.ts
  15. 1 1
      apps/app/src/components/Admin/AdminHome/AdminHome.jsx
  16. 1 1
      apps/app/src/components/Admin/App/AppSetting.jsx
  17. 1 1
      apps/app/src/components/Admin/App/AppSettingsPageContents.tsx
  18. 1 1
      apps/app/src/components/Admin/App/FileUploadSetting.tsx
  19. 1 1
      apps/app/src/components/Admin/App/MailSetting.tsx
  20. 1 1
      apps/app/src/components/Admin/App/MaintenanceMode.tsx
  21. 1 1
      apps/app/src/components/Admin/App/SiteUrlSetting.tsx
  22. 11 6
      apps/app/src/components/Admin/App/V5PageMigration.tsx
  23. 1 1
      apps/app/src/components/Admin/AuditLogManagement.tsx
  24. 5 7
      apps/app/src/components/Admin/Common/AdminNavigation.jsx
  25. 1 1
      apps/app/src/components/Admin/Customize/Customize.jsx
  26. 1 1
      apps/app/src/components/Admin/Customize/CustomizeCssSetting.tsx
  27. 1 1
      apps/app/src/components/Admin/Customize/CustomizeFunctionSetting.tsx
  28. 1 1
      apps/app/src/components/Admin/Customize/CustomizeLayoutSetting.tsx
  29. 1 1
      apps/app/src/components/Admin/Customize/CustomizeLogoSetting.tsx
  30. 1 1
      apps/app/src/components/Admin/Customize/CustomizeNoscriptSetting.tsx
  31. 1 1
      apps/app/src/components/Admin/Customize/CustomizeScriptSetting.tsx
  32. 1 1
      apps/app/src/components/Admin/Customize/CustomizeSidebarSetting.tsx
  33. 1 1
      apps/app/src/components/Admin/Customize/CustomizeTitle.tsx
  34. 2 2
      apps/app/src/components/Admin/ElasticsearchManagement/ElasticsearchManagement.tsx
  35. 1 1
      apps/app/src/components/Admin/ExportArchiveData/ArchiveFilesTableMenu.tsx
  36. 1 1
      apps/app/src/components/Admin/ExportArchiveData/SelectCollectionsModal.tsx
  37. 1 1
      apps/app/src/components/Admin/G2GDataTransfer.tsx
  38. 1 1
      apps/app/src/components/Admin/ImportData/GrowiArchive/ImportCollectionConfigurationModal.jsx
  39. 3 3
      apps/app/src/components/Admin/ImportData/GrowiArchive/ImportForm.jsx
  40. 1 1
      apps/app/src/components/Admin/ImportData/GrowiArchive/UploadForm.jsx
  41. 1 1
      apps/app/src/components/Admin/ImportData/GrowiArchiveSection.jsx
  42. 1 1
      apps/app/src/components/Admin/ImportData/ImportDataPageContents.jsx
  43. 1 1
      apps/app/src/components/Admin/LegacySlackIntegration/LegacySlackIntegration.jsx
  44. 1 1
      apps/app/src/components/Admin/LegacySlackIntegration/SlackConfiguration.jsx
  45. 24 24
      apps/app/src/components/Admin/ManageExternalAccount.tsx
  46. 1 1
      apps/app/src/components/Admin/MarkdownSetting/IndentForm.tsx
  47. 1 1
      apps/app/src/components/Admin/MarkdownSetting/LineBreakForm.jsx
  48. 1 1
      apps/app/src/components/Admin/MarkdownSetting/MarkDownSettingContents.tsx
  49. 1 1
      apps/app/src/components/Admin/MarkdownSetting/XssForm.jsx
  50. 1 1
      apps/app/src/components/Admin/Notification/GlobalNotification.jsx
  51. 1 1
      apps/app/src/components/Admin/Notification/GlobalNotificationList.jsx
  52. 1 1
      apps/app/src/components/Admin/Notification/ManageGlobalNotification.tsx
  53. 1 1
      apps/app/src/components/Admin/Notification/NotificationSetting.jsx
  54. 1 1
      apps/app/src/components/Admin/Notification/UserTriggerNotification.jsx
  55. 1 1
      apps/app/src/components/Admin/PluginsExtension/PluginCard.tsx
  56. 1 1
      apps/app/src/components/Admin/Security/GitHubSecuritySetting.jsx
  57. 1 1
      apps/app/src/components/Admin/Security/GitHubSecuritySettingContents.jsx
  58. 1 1
      apps/app/src/components/Admin/Security/GoogleSecuritySetting.jsx
  59. 1 1
      apps/app/src/components/Admin/Security/GoogleSecuritySettingContents.jsx
  60. 2 2
      apps/app/src/components/Admin/Security/LdapAuthTest.tsx
  61. 1 1
      apps/app/src/components/Admin/Security/LdapSecuritySetting.jsx
  62. 2 2
      apps/app/src/components/Admin/Security/LdapSecuritySettingContents.jsx
  63. 1 1
      apps/app/src/components/Admin/Security/LocalSecuritySetting.jsx
  64. 1 1
      apps/app/src/components/Admin/Security/LocalSecuritySettingContents.jsx
  65. 1 1
      apps/app/src/components/Admin/Security/OidcSecuritySetting.jsx
  66. 1 1
      apps/app/src/components/Admin/Security/OidcSecuritySettingContents.jsx
  67. 1 1
      apps/app/src/components/Admin/Security/SamlSecuritySetting.jsx
  68. 1 1
      apps/app/src/components/Admin/Security/SamlSecuritySettingContents.jsx
  69. 1 1
      apps/app/src/components/Admin/Security/SecurityManagement.tsx
  70. 5 4
      apps/app/src/components/Admin/Security/SecurityManagementContents.jsx
  71. 1 1
      apps/app/src/components/Admin/Security/SecuritySetting.jsx
  72. 1 1
      apps/app/src/components/Admin/Security/ShareLinkSetting.tsx
  73. 4 4
      apps/app/src/components/Admin/SlackIntegration/CustomBotWithProxySettings.jsx
  74. 1 1
      apps/app/src/components/Admin/SlackIntegration/CustomBotWithoutProxySecretTokenSection.jsx
  75. 1 1
      apps/app/src/components/Admin/SlackIntegration/ManageCommandsProcess.jsx
  76. 1 1
      apps/app/src/components/Admin/SlackIntegration/ManageCommandsProcessWithoutProxy.jsx
  77. 2 2
      apps/app/src/components/Admin/SlackIntegration/OfficialBotSettings.jsx
  78. 1 1
      apps/app/src/components/Admin/SlackIntegration/SlackIntegration.jsx
  79. 1 1
      apps/app/src/components/Admin/SlackIntegration/WithProxyAccordions.jsx
  80. 1 1
      apps/app/src/components/Admin/UserGroup/UserGroupPage.tsx
  81. 3 3
      apps/app/src/components/Admin/UserGroupDetail/UserGroupDetailPage.tsx
  82. 1 1
      apps/app/src/components/Admin/UserGroupDetail/UserGroupPageList.tsx
  83. 1 1
      apps/app/src/components/Admin/UserGroupDetail/UserGroupUserFormByInput.jsx
  84. 8 6
      apps/app/src/components/Admin/UserManagement.tsx
  85. 1 1
      apps/app/src/components/Admin/Users/ExternalAccountTable.tsx
  86. 1 1
      apps/app/src/components/Admin/Users/GiveAdminButton.tsx
  87. 2 2
      apps/app/src/components/Admin/Users/PasswordResetModal.jsx
  88. 1 1
      apps/app/src/components/Admin/Users/RemoveAdminButton.tsx
  89. 1 1
      apps/app/src/components/Admin/Users/RemoveAdminMenuItem.tsx
  90. 1 1
      apps/app/src/components/Admin/Users/SendInvitationEmailButton.jsx
  91. 1 1
      apps/app/src/components/Admin/Users/StatusActivateButton.jsx
  92. 1 1
      apps/app/src/components/Admin/Users/StatusSuspendMenuItem.tsx
  93. 1 1
      apps/app/src/components/Admin/Users/UserInviteModal.jsx
  94. 1 1
      apps/app/src/components/Admin/Users/UserRemoveButton.jsx
  95. 1 1
      apps/app/src/components/ArchiveCreateModal.jsx
  96. 1 1
      apps/app/src/components/Common/ImageCropModal.tsx
  97. 3 3
      apps/app/src/components/CompleteUserRegistrationForm.tsx
  98. 2 2
      apps/app/src/components/CustomNavigation/CustomNav.jsx
  99. 1 1
      apps/app/src/components/CustomNavigation/CustomTabContent.tsx
  100. 1 1
      apps/app/src/components/DescendantsPageList.tsx

+ 23 - 1
CHANGELOG.md

@@ -1,9 +1,31 @@
 # Changelog
 
-## [Unreleased](https://github.com/weseek/growi/compare/v6.0.8...HEAD)
+## [Unreleased](https://github.com/weseek/growi/compare/v6.0.9...HEAD)
 
 *Please do not manually update this file. We've automated the process.*
 
+## [v6.0.9](https://github.com/weseek/growi/compare/v6.0.8...v6.0.9) - 2023-03-14
+
+### 💎 Features
+
+- feat: Replaced with new toast (#7466) @mudana-grune
+
+### 🚀 Improvement
+
+- imprv: Page path hierarchical link color (#7474) @yuki-takei
+- imprv: Add markdown header link (h4, h5, h6) (#7465) @miya
+- imprv: Include anyone with the link page in the deletion target (#7461) @miya
+
+### 🐛 Bug Fixes
+
+- fix: Scrolling table in preview causes editor to scroll to row 1 (workaround) (#7473) @miya
+- fix: Internal server error when input wrong tag to markdown (#7471) @jam411
+- fix: Search results are not highlighted when searching for quoteted words (#7443) @miya
+
+### 🧰 Maintenance
+
+- support: Bump Next.js to v13 (#7458) @yuki-takei
+
 ## [v6.0.8](https://github.com/weseek/growi/compare/v6.0.7...v6.0.8) - 2023-03-06
 
 ### 💎 Features

+ 1 - 1
apps/app/docker/README.md

@@ -10,7 +10,7 @@ GROWI Official docker image
 Supported tags and respective Dockerfile links
 ------------------------------------------------
 
-* [`6.0.7`, `6.0`, `6`, `latest` (Dockerfile)](https://github.com/weseek/growi/blob/v6.0.7/apps/app/docker/Dockerfile)
+* [`6.0.9`, `6.0`, `6`, `latest` (Dockerfile)](https://github.com/weseek/growi/blob/v6.0.9/apps/app/docker/Dockerfile)
 * [`5.1.7`, `5.1`, `5`](https://github.com/weseek/growi/blob/v5.1.7/packages/app/docker/Dockerfile)
 * [`5.1.7-nocdn`, `5.1-nocdn`, `5-nocdn`](https://github.com/weseek/growi/blob/v5.1.7/packages/app/docker/Dockerfile)
 * [`4.5.23`, `4.5`, `4`, `latest` (Dockerfile)](https://github.com/weseek/growi/blob/v4.5.23/packages/app/docker/Dockerfile)

+ 14 - 12
apps/app/next.config.js

@@ -9,7 +9,7 @@ const { withSuperjson } = require('next-superjson');
 const { PHASE_PRODUCTION_BUILD, PHASE_PRODUCTION_SERVER } = require('next/constants');
 
 
-const setupTranspileModules = () => {
+const getTranspilePackages = () => {
   const eazyLogger = require('eazy-logger');
   const { listScopedPackages, listPrefixedPackages } = require('./src/utils/next.config.utils');
 
@@ -41,6 +41,8 @@ const setupTranspileModules = () => {
     'trough',
     'web-namespaces',
     'vfile',
+    'vfile-location',
+    'vfile-message',
     'zwitch',
     'emoticon',
     'direction', // for hast-util-select
@@ -51,7 +53,7 @@ const setupTranspileModules = () => {
   // logger.info('{bold:Listing scoped packages for transpiling:}');
   // logger.unprefixed('info', `{grey:${JSON.stringify(packages, null, 2)}}`);
 
-  return require('next-transpile-modules')(packages);
+  return packages;
 };
 
 
@@ -61,21 +63,22 @@ module.exports = async(phase, { defaultConfig }) => {
 
   /** @type {import('next').NextConfig} */
   const nextConfig = {
-    // == DOES NOT WORK
-    // see: https://github.com/vercel/next.js/discussions/27876
-    // experimental: { esmExternals: true }, // Prefer loading of ES Modules over CommonJS
 
+    reactStrictMode: true,
+    poweredByHeader: false,
+    pageExtensions: ['page.tsx', 'page.ts', 'page.jsx', 'page.js'],
+    i18n,
+
+    // for build
     eslint: {
       ignoreDuringBuilds: true,
     },
-    reactStrictMode: true,
-    swcMinify: true,
     typescript: {
       tsconfigPath: 'tsconfig.build.client.json',
     },
-    pageExtensions: ['page.tsx', 'page.ts', 'page.jsx', 'page.js'],
-
-    i18n,
+    transpilePackages: phase !== PHASE_PRODUCTION_SERVER
+      ? getTranspilePackages()
+      : undefined,
 
     /** @param config {import('next').NextConfig} */
     webpack(config, options) {
@@ -106,10 +109,9 @@ module.exports = async(phase, { defaultConfig }) => {
     return withSuperjson()(nextConfig);
   }
 
-  const withTM = setupTranspileModules();
   const withBundleAnalyzer = require('@next/bundle-analyzer')({
     enabled: phase === PHASE_PRODUCTION_BUILD || process.env.ANALYZE === 'true',
   });
 
-  return withBundleAnalyzer(withTM(withSuperjson()(nextConfig)));
+  return withBundleAnalyzer(withSuperjson()(nextConfig));
 };

+ 19 - 17
apps/app/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/app",
-  "version": "6.0.9-RC.0",
+  "version": "6.0.10-RC.0",
   "license": "MIT",
   "scripts": {
     "//// for production": "",
@@ -46,7 +46,7 @@
   },
   "// comments for dependencies": {
     "escape-string-regexp": "5.0.0 or above exports only ESM",
-    "next": "/Sandbox rendering is crashed with v12.3 or above ",
+    "next": ">=13.1.2 with Node v14 have the problem => https://github.com/vercel/next.js/issues/45052",
     "string-width": "5.0.0 or above exports only ESM.",
     "prom-client": "!!DO NOT REMOVE!! A peer dependency of @promster.",
     "remark-wiki-link": "!!DO NOT REMOVE!! including 'mdast-util-wiki-link' and 'micromark-extension-wiki-link' required by pukiwiki-like-linker"
@@ -60,14 +60,14 @@
     "@elastic/elasticsearch7": "npm:@elastic/elasticsearch@^7.17.0",
     "@godaddy/terminus": "^4.9.0",
     "@google-cloud/storage": "^5.8.5",
-    "@growi/codemirror-textlint": "^6.0.9-RC.0",
-    "@growi/core": "^6.0.9-RC.0",
-    "@growi/hackmd": "^6.0.9-RC.0",
-    "@growi/preset-themes": "^6.0.9-RC.0",
-    "@growi/remark-drawio": "^6.0.9-RC.0",
-    "@growi/remark-growi-directive": "^6.0.9-RC.0",
-    "@growi/remark-lsx": "^6.0.9-RC.0",
-    "@growi/slack": "^6.0.9-RC.0",
+    "@growi/codemirror-textlint": "^6.0.10-RC.0",
+    "@growi/core": "^6.0.10-RC.0",
+    "@growi/hackmd": "^6.0.10-RC.0",
+    "@growi/preset-themes": "^6.0.10-RC.0",
+    "@growi/remark-drawio": "^6.0.10-RC.0",
+    "@growi/remark-growi-directive": "^6.0.10-RC.0",
+    "@growi/remark-lsx": "^6.0.10-RC.0",
+    "@growi/slack": "^6.0.10-RC.0",
     "@promster/express": "^7.0.6",
     "@promster/server": "^7.0.8",
     "@slack/web-api": "^6.2.4",
@@ -111,6 +111,7 @@
     "hast-util-select": "^5.0.2",
     "helmet": "^4.6.0",
     "http-errors": "^2.0.0",
+    "i18next": "^22.4.10",
     "i18next-chained-backend": "^4.0.0",
     "i18next-http-backend": "^2.0.0",
     "i18next-localstorage-backend": "^4.0.0",
@@ -128,10 +129,10 @@
     "mongoose-unique-validator": "^2.0.3",
     "multer": "~1.4.0",
     "multer-autoreap": "^1.0.3",
-    "next": "~12.2",
-    "next-i18next": "^12.1.0",
+    "next": "=13.1.1",
+    "next-i18next": "^13.2.1",
     "next-superjson": "^0.0.4",
-    "next-themes": "^0.2.0",
+    "next-themes": "^0.2.1",
     "nocache": "^3.0.1",
     "nodemailer": "^6.6.2",
     "nodemailer-ses-transport": "~1.5.0",
@@ -153,6 +154,8 @@
     "react-dnd": "^14.0.5",
     "react-dnd-html5-backend": "^14.1.0",
     "react-dom": "^18.2.0",
+    "react-error-boundary": "^3.1.4",
+    "react-i18next": "^12.2.0",
     "react-image-crop": "^8.3.0",
     "react-markdown": "^8.0.3",
     "react-multiline-clamp": "^2.0.0",
@@ -196,11 +199,11 @@
     "handsontable": "v7.0.0 or above is no loger MIT lisence."
   },
   "devDependencies": {
-    "@growi/presentation": "^6.0.9-RC.0",
-    "@growi/ui": "^6.0.9-RC.0",
+    "@growi/presentation": "^6.0.10-RC.0",
+    "@growi/ui": "^6.0.10-RC.0",
     "@handsontable/react": "=2.1.0",
     "@icon/themify-icons": "1.0.1-alpha.3",
-    "@next/bundle-analyzer": "^12.2.3",
+    "@next/bundle-analyzer": "^13.2.3",
     "@types/express": "^4.17.11",
     "@types/react-scroll": "^1.8.4",
     "autoprefixer": "^9.0.0",
@@ -223,7 +226,6 @@
     "load-css-file": "^1.0.0",
     "material-icons": "^1.11.3",
     "morgan": "^1.10.0",
-    "next-transpile-modules": "^9.0.0",
     "penpal": "^4.0.0",
     "plantuml-encoder": "^1.2.5",
     "prettier": "^1.19.1",

+ 0 - 1
apps/app/public/static/locales/en_US/admin.json

@@ -1031,7 +1031,6 @@
     "remove_user_success": "Succeeded to removing {{username}}",
     "remove_external_user_success": "Succeeded to remove {{accountId}}",
     "switch_disable_link_sharing_success": "Succeeded to update share link setting",
-    "failed_to_reset_password":"Failed to reset password",
     "install_plugin_success": "Succeeded to install {{pluginName}}",
     "activate_plugin_success": "Succeeded to activating {{pluginName}}",
     "deactivate_plugin_success": "Succeeded to deactivate {{pluginName}}",

+ 0 - 1
apps/app/public/static/locales/ja_JP/admin.json

@@ -1039,7 +1039,6 @@
     "remove_user_success": "{{username}}を削除しました",
     "remove_external_user_success": "{{accountId}}を削除しました",
     "switch_disable_link_sharing_success": "共有リンクの設定を変更しました",
-    "failed_to_reset_password":"パスワードのリセットに失敗しました",
     "install_plugin_success": "{{pluginName}}のインストールに成功しました",
     "activate_plugin_success": "{{pluginName}}を有効化しました",
     "deactivate_plugin_success": "{{pluginName}}を無効化しました",

+ 0 - 1
apps/app/public/static/locales/zh_CN/admin.json

@@ -1039,7 +1039,6 @@
     "remove_user_success": "Succeeded to removing {{username}}",
     "remove_external_user_success": "Succeeded to remove {{accountId}}",
     "switch_disable_link_sharing_success": "成功更新分享链接设置",
-    "failed_to_reset_password":"Failed to reset password",
     "install_plugin_success": "Succeeded to install {{pluginName}}",
     "activate_plugin_success": "Succeeded to activating {{pluginName}}",
     "deactivate_plugin_success": "Succeeded to deactivate {{pluginName}}",

+ 0 - 1
apps/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
apps/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
apps/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
apps/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');
 

+ 5 - 5
apps/app/src/client/services/renderer/renderer.tsx

@@ -16,7 +16,6 @@ import type { Pluggable } from 'unified';
 
 import { DrawioViewerWithEditButton } from '~/components/ReactMarkdownComponents/DrawioViewerWithEditButton';
 import { Header } from '~/components/ReactMarkdownComponents/Header';
-import { Table } from '~/components/ReactMarkdownComponents/Table';
 import { TableWithEditButton } from '~/components/ReactMarkdownComponents/TableWithEditButton';
 import { RehypeSanitizeOption } from '~/interfaces/rehype';
 import type { RendererOptions } from '~/interfaces/renderer-options';
@@ -90,6 +89,9 @@ export const generateViewOptions = (
     components.h1 = Header;
     components.h2 = Header;
     components.h3 = Header;
+    components.h4 = Header;
+    components.h5 = Header;
+    components.h6 = Header;
     components.lsx = lsxGrowiPlugin.Lsx;
     components.drawio = DrawioViewerWithEditButton;
     components.table = TableWithEditButton;
@@ -151,7 +153,7 @@ export const generateSimpleViewOptions = (
     drawioPlugin.remarkPlugin,
     xsvToTable.remarkPlugin,
     lsxGrowiPlugin.remarkPlugin,
-    table.remarkPlugin,
+    // table.remarkPlugin,
   );
 
   const isEnabledLinebreaks = overrideIsEnabledLinebreaks ?? config.isEnabledLinebreaks;
@@ -185,7 +187,6 @@ export const generateSimpleViewOptions = (
   if (components != null) {
     components.lsx = lsxGrowiPlugin.LsxImmutable;
     components.drawio = drawioPlugin.DrawioViewer;
-    components.table = Table;
   }
 
   if (config.isEnabledXssPrevention) {
@@ -219,7 +220,7 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
     drawioPlugin.remarkPlugin,
     xsvToTable.remarkPlugin,
     lsxGrowiPlugin.remarkPlugin,
-    table.remarkPlugin,
+    // table.remarkPlugin,
   );
   if (config.isEnabledLinebreaks) {
     remarkPlugins.push(breaks);
@@ -250,7 +251,6 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
   if (components != null) {
     components.lsx = lsxGrowiPlugin.LsxImmutable;
     components.drawio = drawioPlugin.DrawioViewer;
-    components.table = Table;
   }
 
   if (config.isEnabledXssPrevention) {

+ 0 - 7
apps/app/src/client/util/apiNotification.js

@@ -1,7 +0,0 @@
-import { legacy } from './toastr';
-
-// DEPRECATED -- 2022.12.07 Yuki Takei
-// Use methods from './toastr.ts' instead
-export const toastError = legacy.toastError;
-export const toastSuccess = legacy.toastSuccess;
-export const toastWarning = legacy.toastWarning;

+ 0 - 53
apps/app/src/client/util/toastr.ts

@@ -36,56 +36,3 @@ export const toastWarningOption: ToastOptions = {
 export const toastWarning = (content: ToastContent, option: ToastOptions = toastWarningOption): void => {
   toastrLegacy.warning(content, option);
 };
-
-
-const toastrLegacyOption = {
-  error: {
-    closeButton: true,
-    progressBar: true,
-    newestOnTop: false,
-    showDuration: '100',
-    hideDuration: '100',
-    timeOut: '0',
-  },
-  success: {
-    closeButton: true,
-    progressBar: true,
-    newestOnTop: false,
-    showDuration: '100',
-    hideDuration: '100',
-    timeOut: '3000',
-  },
-  warning: {
-    closeButton: true,
-    progressBar: true,
-    newestOnTop: false,
-    showDuration: '100',
-    hideDuration: '100',
-    timeOut: '6000',
-  },
-};
-
-export const legacy = {
-  // accepts both a single error and an array of errors
-  toastError: (err: string | Error | Error[], header = 'Error', option = toastrLegacyOption.error): void => {
-    const errs = toArrayIfNot(err);
-
-    if (errs.length === 0) {
-      toastrLegacy.error('', header);
-    }
-
-    for (const err of errs) {
-      const message = (typeof err === 'string') ? err : err.message;
-      toastrLegacy.error(message || err, header, option);
-    }
-  },
-
-  // only accepts a single item
-  toastSuccess: (body: string, header = 'Success', option = toastrLegacyOption.success): void => {
-    toastrLegacy.success(body, header, option);
-  },
-
-  toastWarning: (body: string, header = 'Warning', option = toastrLegacyOption.warning): void => {
-    toastrLegacy.warning(body, header, option);
-  },
-};

+ 1 - 1
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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';

+ 5 - 7
apps/app/src/components/Admin/Common/AdminNavigation.jsx

@@ -55,13 +55,11 @@ const AdminNavigation = (props) => {
     const href = isRoot ? '/admin' : urljoin('/admin', menu);
 
     return (
-      <Link href={href}>
-        <a
-          href={href}
-          className={`${pageTransitionClassName} ${isActive ? 'active' : ''}`}
-        >
-          <MenuLabel menu={menu} />
-        </a>
+      <Link
+        href={href}
+        className={`${pageTransitionClassName} ${isActive ? 'active' : ''}`}
+      >
+        <MenuLabel menu={menu} />
       </Link>
     );
   };

+ 1 - 1
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/app/src/components/Admin/ExportArchiveData/ArchiveFilesTableMenu.tsx

@@ -2,7 +2,7 @@ import React from 'react';
 
 import { useTranslation } from 'next-i18next';
 
-// import { toastSuccess, toastError } from '~/client/util/apiNotification';
+// import { toastSuccess, toastError } from '~/client/util/toastr';
 
 type ArchiveFilesTableMenuProps = {
   fileName: string,

+ 1 - 1
apps/app/src/components/Admin/ExportArchiveData/SelectCollectionsModal.tsx

@@ -8,7 +8,7 @@ import * as toastr from 'toastr';
 
 import { apiPost } from '~/client/util/apiv1-client';
 
-// import { toastSuccess, toastError } from '~/client/util/apiNotification';
+// import { toastSuccess, toastError } from '~/client/util/toastr';
 
 
 const GROUPS_PAGE = [

+ 1 - 1
apps/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';
 

+ 1 - 1
apps/app/src/components/Admin/ImportData/GrowiArchive/ImportCollectionConfigurationModal.jsx

@@ -13,7 +13,7 @@ import {
 
 import GrowiArchiveImportOption from '~/models/admin/growi-archive-import-option';
 
-// import { toastSuccess, toastError } from '~/client/util/apiNotification';
+// import { toastSuccess, toastError } from '~/client/util/toastr';
 
 
 class ImportCollectionConfigurationModal extends React.Component {

+ 3 - 3
apps/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
apps/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
apps/app/src/components/Admin/ImportData/GrowiArchiveSection.jsx

@@ -6,7 +6,7 @@ import * as toastr from 'toastr';
 
 import { apiv3Delete, apiv3Get } from '~/client/util/apiv3-client';
 
-// import { toastSuccess, toastError } from '~/client/util/apiNotification';
+// import { toastSuccess, toastError } from '~/client/util/toastr';
 
 import ImportForm from './GrowiArchive/ImportForm';
 import UploadForm from './GrowiArchive/UploadForm';

+ 1 - 1
apps/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
apps/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
apps/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';

+ 24 - 24
apps/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';
@@ -46,32 +46,32 @@ const ManageExternalAccount = (props: ManageExternalAccountProps): JSX.Element =
     />
   );
 
-  return (
-    <>
-      <p>
-        <Link href="/admin/users" prefetch={false}>
-          <a className="btn btn-outline-secondary">
-            <i className="icon-fw ti ti-arrow-left" aria-hidden="true"></i>
-            {t('admin:user_management.back_to_user_management')}
-          </a>
-        </Link>
-      </p>
-      <h2>{t('admin:user_management.external_account_list')}</h2>
-      {(totalAccounts !== 0) ? (
+  return <>
+    <p>
+      <Link
+        href="/admin/users"
+        prefetch={false}
+        className="btn btn-outline-secondary"
+      >
+        <i className="icon-fw ti ti-arrow-left" aria-hidden="true"></i>
+        {t('admin:user_management.back_to_user_management')}
+      </Link>
+    </p>
+    <h2>{t('admin:user_management.external_account_list')}</h2>
+    {(totalAccounts !== 0) ? (
+      <>
+        {pager}
+        <ExternalAccountTable />
+        {pager}
+      </>
+    )
+      : (
         <>
-          {pager}
-          <ExternalAccountTable />
-          {pager}
+          { t('admin:user_management.external_account_none') }
         </>
       )
-        : (
-          <>
-            { t('admin:user_management.external_account_none') }
-          </>
-        )
-      }
-    </>
-  );
+    }
+  </>;
 };
 
 const ManageExternalAccountWrapper = withUnstatedContainers(ManageExternalAccount, [AdminExternalAccountsContainer]);

+ 1 - 1
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/app/src/components/Admin/PluginsExtension/PluginCard.tsx

@@ -105,7 +105,7 @@ export const PluginCard = (props: Props): JSX.Element => {
         <div className="row mb-3">
           <div className="col-9">
             <h2 className="card-title h3 border-bottom pb-2 mb-3">
-              <Link href={`${url}`}>{name}</Link>
+              <Link href={`${url}`} legacyBehavior>{name}</Link>
             </h2>
             <p className="card-text text-muted">{desc}</p>
           </div>

+ 1 - 1
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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';

+ 5 - 4
apps/app/src/components/Admin/Security/SecurityManagementContents.jsx

@@ -84,10 +84,11 @@ const SecurityManagementContents = () => {
       <div className="mb-5">
         <h2 className="border-bottom">{t('security_settings.xss_prevent_setting')}</h2>
         <div className="text-center">
-          <Link href="/admin/markdown/#preventXSS" prefetch={false}>
-            <a style={{ fontSize: 'large' }}>
-              <i className="fa-fw icon-login"></i> {t('security_settings.xss_prevent_setting_link')}
-            </a>
+          <Link
+            href="/admin/markdown/#preventXSS"
+            style={{ fontSize: 'large' }}
+          >
+            <i className="fa-fw icon-login"></i> {t('security_settings.xss_prevent_setting_link')}
           </Link>
         </div>
       </div>

+ 1 - 1
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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';

+ 3 - 3
apps/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';
@@ -329,7 +329,7 @@ const UserGroupDetailPage = (props: Props): JSX.Element => {
         <ol className="breadcrumb">
           <li className="breadcrumb-item">
             <Link href="/admin/user-groups" prefetch={false}>
-              <a >{t('user_group_management.group_list')}</a>
+              {t('user_group_management.group_list')}
             </Link>
           </li>
           {
@@ -343,7 +343,7 @@ const UserGroupDetailPage = (props: Props): JSX.Element => {
                   <span>{ancestorUserGroup.name}</span>
                 ) : (
                   <Link href={`/admin/user-group-detail/${ancestorUserGroup._id}`} prefetch={false}>
-                    <a href={`/admin/user-group-detail/${ancestorUserGroup._id}`}>{ancestorUserGroup.name}</a>
+                    {ancestorUserGroup.name}
                   </Link>
                 ) }
               </li>

+ 1 - 1
apps/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
apps/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 {

+ 8 - 6
apps/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';
@@ -123,11 +123,13 @@ const UserManagement = (props: UserManagementProps) => {
       ) }
       <p>
         <InviteUserControl />
-        <Link href="/admin/users/external-accounts" prefetch={false}>
-          <a className="btn btn-outline-secondary ml-2" role="button">
-            <i className="icon-user-follow mr-1" aria-hidden="true"></i>
-            {t('admin:user_management.external_account')}
-          </a>
+        <Link
+          href="/admin/users/external-accounts"
+          className="btn btn-outline-secondary ml-2"
+          role="button"
+        >
+          <i className="icon-user-follow mr-1" aria-hidden="true"></i>
+          {t('admin:user_management.external_account')}
         </Link>
       </p>
 

+ 1 - 1
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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
apps/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);
     }

+ 2 - 2
apps/app/src/components/CustomNavigation/CustomNav.jsx

@@ -78,8 +78,8 @@ export const CustomNavDropdown = (props) => {
 };
 
 CustomNavDropdown.propTypes = {
-  activeTab: PropTypes.string.isRequired,
   navTabMapping: PropTypes.object.isRequired,
+  activeTab: PropTypes.string,
   onNavSelected: PropTypes.func,
 };
 
@@ -119,7 +119,7 @@ export const CustomNavTab = (props) => {
   }
 
   useEffect(() => {
-    if (activeTab === '') {
+    if (activeTab == null || activeTab === '') {
       return;
     }
 

+ 1 - 1
apps/app/src/components/CustomNavigation/CustomTabContent.tsx

@@ -10,8 +10,8 @@ import { LazyRenderer } from '../Common/LazyRenderer';
 
 
 type Props = {
-  activeTab: string,
   navTabMapping: ICustomNavTabMappings,
+  activeTab?: string,
   additionalClassNames?: string[],
 }
 

+ 1 - 1
apps/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,

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff