yuken 4 лет назад
Родитель
Сommit
6283215d06

+ 3 - 1
packages/app/resource/locales/ja_JP/admin/admin.json

@@ -31,7 +31,9 @@
     "already_upgraded": "v5 互換形式への変換は既に完了しています",
     "already_upgraded": "v5 互換形式への変換は既に完了しています",
     "header_upgrading_progress": "アップグレード進行度",
     "header_upgrading_progress": "アップグレード進行度",
     "migration_succeeded": "アップグレードが正常に完了しました!メンテナンスモードを終了して、GROWI を使用することができます。",
     "migration_succeeded": "アップグレードが正常に完了しました!メンテナンスモードを終了して、GROWI を使用することができます。",
-    "migration_failed": "アップグレードが失敗しました。失敗した場合の対処法は GROWI docs を参照してください。"
+    "migration_failed": "アップグレードが失敗しました。失敗した場合の対処法は GROWI docs を参照してください。",
+    "page_migration_succeeded": "ページの v5 互換形式変換が正常に終了しました。",
+    "page_migration_failed": "{{paths}} の変換中にエラーが発生しました。"
   },
   },
   "maintenance_mode": {
   "maintenance_mode": {
     "maintenance_mode": "メンテナンスモード",
     "maintenance_mode": "メンテナンスモード",

+ 4 - 1
packages/app/src/components/PrivateLegacyPages.tsx

@@ -9,7 +9,7 @@ import {
 
 
 import { ISelectableAll, ISelectableAndIndeterminatable } from '~/client/interfaces/selectable-all';
 import { ISelectableAll, ISelectableAndIndeterminatable } from '~/client/interfaces/selectable-all';
 import AppContainer from '~/client/services/AppContainer';
 import AppContainer from '~/client/services/AppContainer';
-import { toastSuccess } from '~/client/util/apiNotification';
+import { toastSuccess, toastWarning } from '~/client/util/apiNotification';
 import { V5MigrationStatus } from '~/interfaces/page-listing-results';
 import { V5MigrationStatus } from '~/interfaces/page-listing-results';
 import { IFormattedSearchResult } from '~/interfaces/search';
 import { IFormattedSearchResult } from '~/interfaces/search';
 import { PageMigrationErrorData, SocketEventName } from '~/interfaces/websocket';
 import { PageMigrationErrorData, SocketEventName } from '~/interfaces/websocket';
@@ -172,10 +172,13 @@ export const PrivateLegacyPages = (props: Props): JSX.Element => {
   useEffect(() => {
   useEffect(() => {
     socket?.on(SocketEventName.PageMigrationSuccess, () => {
     socket?.on(SocketEventName.PageMigrationSuccess, () => {
       // page migration success
       // page migration success
+      toastSuccess(t('admin:v5_page_migration.page_migration_succeeded'));
     });
     });
 
 
     socket?.on(SocketEventName.PageMigrationError, (data: PageMigrationErrorData) => {
     socket?.on(SocketEventName.PageMigrationError, (data: PageMigrationErrorData) => {
       // page migration error
       // page migration error
+      const errorPaths: string = data.paths.join(', ');
+      toastWarning(t('admin:v5_page_migration.page_migration_failed', { paths: errorPaths }));
     });
     });
 
 
     return () => {
     return () => {