@alemonjs/bubble 2.1.0-alpha.6 → 2.1.0-alpha.7
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/lib/send.js +8 -4
- package/package.json +1 -1
package/lib/send.js
CHANGED
|
@@ -142,20 +142,24 @@ const sendToRoom = async (client, param, val) => {
|
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
else if (item.type === 'BT.group' && item.value.length > 0) {
|
|
145
|
-
contentMd += `<box>${item.value
|
|
145
|
+
contentMd += `<box classWind="mt-2" variant="borderless" >${item.value
|
|
146
|
+
?.map(row => {
|
|
146
147
|
const val = row.value;
|
|
147
148
|
if (val.length === 0) {
|
|
148
149
|
return '';
|
|
149
150
|
}
|
|
150
|
-
return `<flex>${val
|
|
151
|
+
return `<flex>${val
|
|
152
|
+
.map(button => {
|
|
151
153
|
const value = button.value;
|
|
152
154
|
const options = button.options;
|
|
153
155
|
const autoEnter = options?.autoEnter ?? false;
|
|
154
156
|
const label = typeof value === 'object' ? value.title : value;
|
|
155
157
|
const command = options?.data || label;
|
|
156
158
|
return `<btn command="${command}" enter="${String(autoEnter)}" >${label}</btn>`;
|
|
157
|
-
})
|
|
158
|
-
|
|
159
|
+
})
|
|
160
|
+
.join('')}</flex>`;
|
|
161
|
+
})
|
|
162
|
+
.join('')}</box>`;
|
|
159
163
|
}
|
|
160
164
|
});
|
|
161
165
|
}
|