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

Merge pull request #9499 from weseek/imprv/159233-159234-show-warning-on-page-bulk-export-exec

Imprv/159233 159234 show warning on page bulk export exec
Yuki Takei 1 год назад
Родитель
Сommit
64c8e1eeb7

+ 3 - 1
apps/app/public/static/locales/en_US/translation.json

@@ -660,7 +660,9 @@
     "export_page_markdown": "Export page as Markdown",
     "export_page_pdf": "Export page as PDF",
     "bulk_export": "Export page and all child pages",
-    "bulk_export_notice": "Once a download link is ready, a notification will be sent. If the number of pages is large, it may take a while for preparation.",
+    "bulk_export_download_explanation": "A notification will be sent when the export is complete. To download the exported file, click the notification.",
+    "bulk_export_exec_time_warning": "If the number of pages is large, it may take a while to export",
+    "large_bulk_export_warning": "To conserve system resources, please refrain from exporting a large number of pages consecutively",
     "markdown": "Markdown",
     "choose_export_format": "Select export format",
     "bulk_export_started": "Please wait a moment...",

+ 3 - 1
apps/app/public/static/locales/fr_FR/translation.json

@@ -653,7 +653,9 @@
     "export_page_markdown": "Exporter la page en Markdown",
     "export_page_pdf": "Exporter la page en PDF",
     "bulk_export": "Exporter la page et toutes les pages enfants",
-    "bulk_export_notice": "Une fois qu'un lien de téléchargement est prêt, une notification sera envoyée. Si le nombre de pages est important, la préparation peut prendre un certain temps.",
+    "bulk_export_download_explanation": "Une notification sera envoyée lorsque l’exportation sera terminée. Pour télécharger le fichier exporté, cliquez sur la notification.",
+    "bulk_export_exec_time_warning": "Si le nombre de pages est important, l'exportation peut prendre un certain temps.",
+    "large_bulk_export_warning": "Pour préserver les ressources du système, veuillez éviter d'exporter un grand nombre de pages consécutivement",
     "markdown": "Markdown",
     "choose_export_format": "Sélectionnez le format d'exportation",
     "bulk_export_started": "Patientez s'il-vous-plait...",

+ 3 - 1
apps/app/public/static/locales/ja_JP/translation.json

@@ -692,7 +692,9 @@
     "export_page_markdown": "マークダウン形式でページをエクスポート",
     "export_page_pdf": "PDF形式でページをエクスポート",
     "bulk_export": "ページとその配下のページを全てエクスポート",
-    "bulk_export_notice": "ダウンロードの準備が完了すると、通知が届きます。ページ数が多いと、準備に時間がかかる場合があります。",
+    "bulk_export_download_explanation": "エクスポート完了後に通知が届きます。通知をクリックし、ファイルをダウンロードしてください。",
+    "bulk_export_exec_time_warning": "ページ数が多いと、エクスポートに時間がかかる場合があります",
+    "large_bulk_export_warning": "システムリソースの維持のため、ページ数の多いエクスポートを連続して実行することはご遠慮ください",
     "markdown": "マークダウン",
     "choose_export_format": "エクスポート形式を選択してください",
     "bulk_export_started": "ただいま準備中です...",

+ 3 - 1
apps/app/public/static/locales/zh_CN/translation.json

@@ -662,7 +662,9 @@
     "export_page_markdown": "以Markdown格式导出页面",
     "export_page_pdf": "以PDF格式导出页面",
     "bulk_export": "导出页面及其下的所有页面",
-    "bulk_export_notice": "下载链接准备好后,将发送通知。如果页数较多,则可能需要一段时间准备。",
+    "bulk_export_download_explanation": "导出完成后将发送通知。要下载导出的文件,请单击通知。",
+    "bulk_export_exec_time_warning": "如果页数较多,导出可能需要一段时间",
+    "large_bulk_export_warning": "为了节省系统资源,请避免连续导出大量页面",
     "markdown": "Markdown",
     "choose_export_format": "选择导出格式",
     "bulk_export_started": "目前我们正在准备...",

+ 10 - 7
apps/app/src/features/page-bulk-export/client/components/PageBulkExportSelectModal.tsx

@@ -54,17 +54,20 @@ const PageBulkExportSelectModal = (): JSX.Element => {
   return (
     <>
       {status != null && (
-        <Modal isOpen={status.isOpened} toggle={close}>
+        <Modal isOpen={status.isOpened} toggle={close} size="lg">
           <ModalHeader tag="h4" toggle={close}>
             {t('page_export.bulk_export')}
           </ModalHeader>
           <ModalBody>
-            {t('page_export.choose_export_format')}
-            <div className="my-1">
-              <small className="text-muted">
-                {t('page_export.bulk_export_notice')}
-              </small>
-            </div>
+            <p className="card custom-card bg-warning-subtle pt-3 px-3">
+              {t('page_export.bulk_export_download_explanation')}
+              <span className="mt-3"><span className="material-symbols-outlined me-1">warning</span>{t('Warning')}</span>
+              <ul className="mt-2">
+                <li>{t('page_export.bulk_export_exec_time_warning')}</li>
+                <li>{t('page_export.large_bulk_export_warning')}</li>
+              </ul>
+            </p>
+            {t('page_export.choose_export_format')}:
             <div className="d-flex justify-content-center mt-3">
               <button className="btn btn-primary" type="button" onClick={() => startBulkExport(PageBulkExportFormat.md)}>
                 {t('page_export.markdown')}

+ 0 - 4
apps/app/src/features/page-bulk-export/server/service/page-bulk-export.ts

@@ -33,10 +33,6 @@ export interface IPageBulkExportService {
 
 class PageBulkExportService implements IPageBulkExportService {
 
-  // temporal path of local fs to output page files before upload
-  // TODO: If necessary, change to a proper path in https://redmine.weseek.co.jp/issues/149512
-  tmpOutputRootDir = '/tmp/page-bulk-export';
-
   /**
    * Create a new page bulk export job or reset the existing one
    */