parent
d3e36b36f9
commit
73ee16b943
|
@ -294,6 +294,8 @@ export const expandListTimeline = (id, { maxId } = {}, done = noop) => {
|
|||
*
|
||||
*/
|
||||
export const expandGroupTimeline = (id, { sortBy, maxId, onlyMedia } = {}, done = noop) => {
|
||||
if (!id) return
|
||||
|
||||
return expandTimeline(`group:${id}`, `/api/v1/timelines/group/${id}`, {
|
||||
sort_by: sortBy,
|
||||
max_id: maxId,
|
||||
|
|
|
@ -31,17 +31,7 @@ class Video extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
videoJsOptions.sources = [
|
||||
{
|
||||
src: this.props.src,
|
||||
type: this.props.fileContentType,
|
||||
},
|
||||
{
|
||||
src: this.props.sourceMp4,
|
||||
type: 'video/mp4',
|
||||
},
|
||||
]
|
||||
this.videoPlayer = videojs(this.video, videoJsOptions)
|
||||
//
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
@ -75,6 +65,23 @@ class Video extends ImmutablePureComponent {
|
|||
|
||||
setVideoRef = (n) => {
|
||||
this.video = n
|
||||
this.setupVideo()
|
||||
}
|
||||
|
||||
setupVideo = () => {
|
||||
if (!this.video) return null
|
||||
|
||||
videoJsOptions.sources = [
|
||||
{
|
||||
src: this.props.src,
|
||||
type: this.props.fileContentType,
|
||||
},
|
||||
{
|
||||
src: this.props.sourceMp4,
|
||||
type: 'video/mp4',
|
||||
},
|
||||
]
|
||||
this.videoPlayer = videojs(this.video, videoJsOptions)
|
||||
}
|
||||
|
||||
handleClickRoot = (e) => e.stopPropagation()
|
||||
|
|
|
@ -20,6 +20,8 @@ class ChatConversationRequestApproveBar extends React.PureComponent {
|
|||
}
|
||||
|
||||
render () {
|
||||
if (!chatConversationId) return null
|
||||
|
||||
return (
|
||||
<div className={[_s.d, _s.z4, _s.minH53PX, _s.w100PC].join(' ')}>
|
||||
<div className={[_s.d, _s.minH53PX, _s.bgNavigation, _s.aiCenter, _s.z3, _s.bottom0, _s.right0, _s.left0, _s.posFixed].join(' ')} >
|
||||
|
|
|
@ -107,7 +107,7 @@ class MessagesLayout extends React.PureComponent {
|
|||
<main role='main' className={[_s.d, _s.w100PC, _s.flexGrow1, _s.bgPrimary, _s.borderBottom1PX, _s.borderColorSecondary].join(' ')}>
|
||||
<ChatMessageScrollingList chatConversationId={selectedChatConversationId} isXS={isXS} />
|
||||
</main>
|
||||
{ currentConversationIsRequest && <ChatConversationRequestApproveBar /> }
|
||||
{ currentConversationIsRequest && <ChatConversationRequestApproveBar chatConversationId={selectedChatConversationId} /> }
|
||||
{ !currentConversationIsRequest && <ChatMessageComposeForm chatConversationId={selectedChatConversationId} isXS={isXS} /> }
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -33,18 +33,34 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
|||
end
|
||||
|
||||
def avatar
|
||||
if object.avatar_file_name.nil? and object.avatar_remote_url and object.avatar_remote_url.start_with? "gab://avatar/"
|
||||
return object.avatar_remote_url.sub("gab://avatar/", "https://gab.com/media/user/")
|
||||
end
|
||||
|
||||
full_asset_url(object.avatar_original_url)
|
||||
end
|
||||
|
||||
def avatar_static
|
||||
if object.avatar_file_name.nil? and object.avatar_remote_url and object.avatar_remote_url.start_with? "gab://avatar/"
|
||||
return object.avatar_remote_url.sub("gab://avatar/", "https://gab.com/media/user/")
|
||||
end
|
||||
|
||||
full_asset_url(object.avatar_static_url)
|
||||
end
|
||||
|
||||
def header
|
||||
if object.header_file_name.nil? and object.header_remote_url and object.header_remote_url.start_with? "gab://header/"
|
||||
return object.header_remote_url.sub("gab://header/", "https://gab.com/media/user/")
|
||||
end
|
||||
|
||||
full_asset_url(object.header_original_url)
|
||||
end
|
||||
|
||||
def header_static
|
||||
if object.header_file_name.nil? and object.header_remote_url and object.header_remote_url.start_with? "gab://header/"
|
||||
return object.header_remote_url.sub("gab://header/", "https://gab.com/media/user/")
|
||||
end
|
||||
|
||||
full_asset_url(object.header_static_url)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue