From d25896d99c858017e6fb5dc2dae91d9bfd792a2b Mon Sep 17 00:00:00 2001 From: zeppi Date: Wed, 28 Jul 2021 10:36:24 -0400 Subject: [PATCH] recon commentCreate --- ui/component/commentCreate/view.jsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx index 12028b6de..bdf515e4e 100644 --- a/ui/component/commentCreate/view.jsx +++ b/ui/component/commentCreate/view.jsx @@ -42,7 +42,9 @@ type Props = { isReply: boolean, activeChannel: string, activeChannelClaim: ?ChannelClaim, + bottom: boolean, livestream?: boolean, + embed?: boolean, toast: (string) => void, claimIsMine: boolean, sendTip: ({}, (any) => void, (any) => void) => void, @@ -63,7 +65,9 @@ export function CommentCreate(props: Props) { isReply, parentId, activeChannelClaim, + bottom, livestream, + embed, claimIsMine, sendTip, doToast, @@ -106,7 +110,7 @@ export function CommentCreate(props: Props) { function altEnterListener(e: SyntheticKeyboardEvent<*>) { const KEYCODE_ENTER = 13; - if ((e.ctrlKey || e.metaKey) && e.keyCode === KEYCODE_ENTER) { + if ((livestream || e.ctrlKey || e.metaKey) && e.keyCode === KEYCODE_ENTER) { e.preventDefault(); buttonref.current.click(); } @@ -147,8 +151,6 @@ export function CommentCreate(props: Props) { const activeChannelName = activeChannelClaim && activeChannelClaim.name; const activeChannelId = activeChannelClaim && activeChannelClaim.claim_id; - console.log(activeChannelClaim); - setIsSubmitting(true); if (activeTab === TAB_LBC) { @@ -280,6 +282,11 @@ export function CommentCreate(props: Props) {
{ + if (embed) { + window.open(`https://odysee.com/$/${PAGES.AUTH}?redirect=/$/${PAGES.LIVESTREAM}`); + return; + } + const pathPlusRedirect = `/$/${PAGES.CHANNEL_NEW}?redirect=${pathname}`; if (livestream) { window.open(pathPlusRedirect); @@ -344,6 +351,7 @@ export function CommentCreate(props: Props) { className={classnames('comment__create', { 'comment__create--reply': isReply, 'comment__create--nested-reply': isNested, + 'comment__create--bottom': bottom, })} >