More stripe integration #6649

Closed
mayeaux wants to merge 17 commits from more-stripe-integration into master
Showing only changes of commit fb411c46f6 - Show all commits

View file

@ -156,10 +156,15 @@ export default function LivestreamComments(props: Props) {
'button-toggle--active': viewMode === VIEW_MODE_CHAT, 'button-toggle--active': viewMode === VIEW_MODE_CHAT,
})} })}
label={__('Chat')} label={__('Chat')}
onClick={() => setViewMode(VIEW_MODE_CHAT)} onClick={function() {
setViewMode(VIEW_MODE_CHAT);
const livestreamCommentsDiv = document.getElementsByClassName('livestream__comments')[0]
const divHeight = livestreamCommentsDiv.scrollHeight;
livestreamCommentsDiv.scrollTop = divHeight;
}}
/> />
{/* the list by tip amount value button */} {/* the button to show superchats listed by most to least support amount */}
<Button <Button
className={classnames('button-toggle', { className={classnames('button-toggle', {
'button-toggle--active': viewMode === VIEW_MODE_SUPER_CHAT, 'button-toggle--active': viewMode === VIEW_MODE_SUPER_CHAT,
@ -170,7 +175,12 @@ export default function LivestreamComments(props: Props) {
<CreditAmount amount={superChatsTotalAmount} size={8} isFiat={true} /> {' '}{__('Tipped')} <CreditAmount amount={superChatsTotalAmount} size={8} isFiat={true} /> {' '}{__('Tipped')}
</> </>
} }
onClick={() => setViewMode(VIEW_MODE_SUPER_CHAT)} onClick={function() {
setViewMode(VIEW_MODE_SUPER_CHAT);
const livestreamCommentsDiv = document.getElementsByClassName('livestream__comments')[0]
const divHeight = livestreamCommentsDiv.scrollHeight;
livestreamCommentsDiv.scrollTop = divHeight * -1;
}}
/> />
</div> </div>
)} )}
@ -236,7 +246,6 @@ export default function LivestreamComments(props: Props) {
commentIsMine={comment.channel_id && isMyComment(comment.channel_id)} commentIsMine={comment.channel_id && isMyComment(comment.channel_id)}
/> />
))} ))}
</div> </div>
) : ( ) : (
<div className="main--empty" style={{ flex: 1 }} /> <div className="main--empty" style={{ flex: 1 }} />