@subiz/widget-v4 4.1.30 → 4.1.31
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/assets/less/message.less
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import sb from '../util/index.js'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import {Com} from '../common.js'
|
|
3
|
+
import {h} from 'preact'
|
|
4
4
|
|
|
5
5
|
export default class AudioAttachments extends Com {
|
|
6
|
-
constructor
|
|
6
|
+
constructor(props) {
|
|
7
7
|
super(props)
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
render
|
|
10
|
+
render() {
|
|
11
11
|
let byType = sb.get(this.props.ev, 'by.type')
|
|
12
12
|
var attachments = sb.get(this.props.ev, 'data.message.attachments', [])
|
|
13
13
|
var audios = []
|
|
@@ -20,12 +20,12 @@ export default class AudioAttachments extends Com {
|
|
|
20
20
|
var $audios = sb.map(audios, (audio, index) => {
|
|
21
21
|
return (
|
|
22
22
|
<div key={index} class={`audio-attachment audio-attachment--${byType}`}>
|
|
23
|
-
<audio class=
|
|
23
|
+
<audio class='audio-attachment__audio' controls>
|
|
24
24
|
<source src={this.props.store.replaceFileUrl(audio.url)} type={audio.mimetype} />
|
|
25
25
|
</audio>
|
|
26
26
|
</div>
|
|
27
27
|
)
|
|
28
28
|
})
|
|
29
|
-
return <div class={`message-${byType}`}>{$audios}</div>
|
|
29
|
+
return <div class={`message-${byType} message-${byType}-audio`}>{$audios}</div>
|
|
30
30
|
}
|
|
31
31
|
}
|