parent
d3e36b36f9
commit
73ee16b943
|
@ -294,6 +294,8 @@ export const expandListTimeline = (id, { maxId } = {}, done = noop) => {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export const expandGroupTimeline = (id, { sortBy, maxId, onlyMedia } = {}, done = noop) => {
|
export const expandGroupTimeline = (id, { sortBy, maxId, onlyMedia } = {}, done = noop) => {
|
||||||
|
if (!id) return
|
||||||
|
|
||||||
return expandTimeline(`group:${id}`, `/api/v1/timelines/group/${id}`, {
|
return expandTimeline(`group:${id}`, `/api/v1/timelines/group/${id}`, {
|
||||||
sort_by: sortBy,
|
sort_by: sortBy,
|
||||||
max_id: maxId,
|
max_id: maxId,
|
||||||
|
|
|
@ -31,17 +31,7 @@ class Video extends ImmutablePureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
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() {
|
componentWillUnmount() {
|
||||||
|
@ -75,6 +65,23 @@ class Video extends ImmutablePureComponent {
|
||||||
|
|
||||||
setVideoRef = (n) => {
|
setVideoRef = (n) => {
|
||||||
this.video = 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()
|
handleClickRoot = (e) => e.stopPropagation()
|
||||||
|
|
|
@ -20,6 +20,8 @@ class ChatConversationRequestApproveBar extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
|
if (!chatConversationId) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={[_s.d, _s.z4, _s.minH53PX, _s.w100PC].join(' ')}>
|
<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(' ')} >
|
<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(' ')}>
|
<main role='main' className={[_s.d, _s.w100PC, _s.flexGrow1, _s.bgPrimary, _s.borderBottom1PX, _s.borderColorSecondary].join(' ')}>
|
||||||
<ChatMessageScrollingList chatConversationId={selectedChatConversationId} isXS={isXS} />
|
<ChatMessageScrollingList chatConversationId={selectedChatConversationId} isXS={isXS} />
|
||||||
</main>
|
</main>
|
||||||
{ currentConversationIsRequest && <ChatConversationRequestApproveBar /> }
|
{ currentConversationIsRequest && <ChatConversationRequestApproveBar chatConversationId={selectedChatConversationId} /> }
|
||||||
{ !currentConversationIsRequest && <ChatMessageComposeForm chatConversationId={selectedChatConversationId} isXS={isXS} /> }
|
{ !currentConversationIsRequest && <ChatMessageComposeForm chatConversationId={selectedChatConversationId} isXS={isXS} /> }
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -33,18 +33,34 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
||||||
end
|
end
|
||||||
|
|
||||||
def avatar
|
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)
|
full_asset_url(object.avatar_original_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
def avatar_static
|
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)
|
full_asset_url(object.avatar_static_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
def header
|
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)
|
full_asset_url(object.header_original_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
def header_static
|
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)
|
full_asset_url(object.header_static_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue