dsh-channel-feishu 0.8.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +14 -12
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2192,6 +2192,20 @@ export function questionCardJson({ callId, questions, selections, skipped, note,
|
|
|
2192
2192
|
})
|
|
2193
2193
|
}
|
|
2194
2194
|
|
|
2195
|
+
// Fine print (option descriptions plus the reply hint) sits right above the
|
|
2196
|
+
// action row: explanations must not split the options from their buttons.
|
|
2197
|
+
const finePrint = []
|
|
2198
|
+
options.forEach((option, optionIndex) => {
|
|
2199
|
+
if (!option?.description) return
|
|
2200
|
+
finePrint.push(`<font color="grey">${optionIndex + 1} · ${option.description}</font>`)
|
|
2201
|
+
})
|
|
2202
|
+
finePrint.push(`<font color="grey">${multi
|
|
2203
|
+
? '可多选:点选项切换选中,选好后点「提交」。'
|
|
2204
|
+
: '点上面的按钮作答,也可直接回复序号 / 选项文字。'}</font>`)
|
|
2205
|
+
elements.push({ tag: 'markdown', text_size: 'notation', content: finePrint.join('\n') })
|
|
2206
|
+
|
|
2207
|
+
// The action row closes the block, so 提交 / 跳过 always sit at the very
|
|
2208
|
+
// bottom no matter how many options the fold reveals.
|
|
2195
2209
|
const actions = []
|
|
2196
2210
|
if (multi) {
|
|
2197
2211
|
actions.push({
|
|
@@ -2213,18 +2227,6 @@ export function questionCardJson({ callId, questions, selections, skipped, note,
|
|
|
2213
2227
|
}
|
|
2214
2228
|
if (actions.length === 1) elements.push(actions[0])
|
|
2215
2229
|
else if (actions.length > 1) elements.push(fillRow(actions))
|
|
2216
|
-
|
|
2217
|
-
// Fine print (option descriptions plus the reply hint) always closes the
|
|
2218
|
-
// block: mid-card notes read as if they described the buttons below them.
|
|
2219
|
-
const finePrint = []
|
|
2220
|
-
options.forEach((option, optionIndex) => {
|
|
2221
|
-
if (!option?.description) return
|
|
2222
|
-
finePrint.push(`<font color="grey">${optionIndex + 1} · ${option.description}</font>`)
|
|
2223
|
-
})
|
|
2224
|
-
finePrint.push(`<font color="grey">${multi
|
|
2225
|
-
? '可多选:点选项切换选中,选好后点「提交」。'
|
|
2226
|
-
: '点上面的按钮作答,也可直接回复序号 / 选项文字。'}</font>`)
|
|
2227
|
-
elements.push({ tag: 'markdown', text_size: 'notation', content: finePrint.join('\n') })
|
|
2228
2230
|
})
|
|
2229
2231
|
const noteText = note || '等待你的回答…'
|
|
2230
2232
|
if (note !== null && noteText !== '') {
|
package/package.json
CHANGED