zahmis 5 лет назад
Родитель
Сommit
37bbcc17eb
1 измененных файлов с 7 добавлено и 3 удалено
  1. 7 3
      src/server/service/bolt.js

+ 7 - 3
src/server/service/bolt.js

@@ -196,8 +196,8 @@ class BoltService {
           },
           },
           blocks: [
           blocks: [
             this.generateMarkdownSectionBlock('ページを作成します'),
             this.generateMarkdownSectionBlock('ページを作成します'),
-            this.generateInputSectionBlock('path', 'Path', 'path_input', false),
-            this.generateInputSectionBlock('contents', 'Contents', 'contents_input', true),
+            this.generateInputSectionBlock('path', 'Path', 'path_input', false, '/path'),
+            this.generateInputSectionBlock('contents', 'Contents', 'contents_input', true, 'Input with Markdown...'),
           ],
           ],
         },
         },
       });
       });
@@ -224,7 +224,7 @@ class BoltService {
     };
     };
   }
   }
 
 
-  generateInputSectionBlock(blockId, labelText, actionId, isMultiline) {
+  generateInputSectionBlock(blockId, labelText, actionId, isMultiline, placeholder) {
     return {
     return {
       type: 'input',
       type: 'input',
       block_id: blockId,
       block_id: blockId,
@@ -236,6 +236,10 @@ class BoltService {
         type: 'plain_text_input',
         type: 'plain_text_input',
         action_id: actionId,
         action_id: actionId,
         multiline: isMultiline,
         multiline: isMultiline,
+        placeholder: {
+          type: 'plain_text',
+          text: placeholder,
+        },
       },
       },
     };
     };
   }
   }