From 9b82f5700628ea0ff326ef29f493f09dd8f83143 Mon Sep 17 00:00:00 2001 From: zeppi Date: Wed, 14 Apr 2021 11:56:45 -0400 Subject: [PATCH] livestream related publish fixes --- ui/component/publishFile/view.jsx | 10 +-- ui/component/publishForm/view.jsx | 29 +++--- ui/constants/publish_types.js | 6 +- ui/page/home/view.jsx | 4 +- ui/page/livestreamSetup/index.js | 12 ++- ui/page/livestreamSetup/view.jsx | 136 +++++++++++++++++++++++++---- ui/scss/component/_livestream.scss | 2 +- 7 files changed, 155 insertions(+), 44 deletions(-) diff --git a/ui/component/publishFile/view.jsx b/ui/component/publishFile/view.jsx index e109dfa15..cdc168118 100644 --- a/ui/component/publishFile/view.jsx +++ b/ui/component/publishFile/view.jsx @@ -112,17 +112,17 @@ function PublishFile(props: Props) { ); const fileSelectorModes = [ - { label: __('Choose Replay'), actionName: SOURCE_SELECT, icon: ICONS.MENU }, { label: __('Upload'), actionName: SOURCE_UPLOAD, icon: ICONS.PUBLISH }, + { label: __('Choose Replay'), actionName: SOURCE_SELECT, icon: ICONS.MENU }, { label: __('None'), actionName: SOURCE_NONE }, ]; const livestreamDataStr = JSON.stringify(livestreamData); const hasLivestreamData = livestreamData && Boolean(livestreamData.length); - const showSourceSelector = isLivestreamClaim; + const showSourceSelector = isLivestreamClaim || (hasLivestreamData && mode === PUBLISH_MODES.FILE); const [fileSelectSource, setFileSelectSource] = useState( - IS_WEB && showSourceSelector ? SOURCE_SELECT : SOURCE_UPLOAD + IS_WEB && showSourceSelector && name ? SOURCE_SELECT : SOURCE_UPLOAD ); // const [showFileUpdate, setShowFileUpdate] = useState(false); const [selectedFileIndex, setSelectedFileIndex] = useState(null); @@ -437,7 +437,7 @@ function PublishFile(props: Props) { updatePublishForm(publishFormParams); } - const showFileUpload = mode === PUBLISH_MODES.FILE || (mode === PUBLISH_MODES.LIVESTREAM && hasLivestreamData); + const showFileUpload = mode === PUBLISH_MODES.FILE; const isPublishPost = mode === PUBLISH_MODES.POST; return ( @@ -474,7 +474,7 @@ function PublishFile(props: Props) {
- +
{fileSelectorModes.map((fmode) => (
} /> diff --git a/ui/scss/component/_livestream.scss b/ui/scss/component/_livestream.scss index 79e461e28..26d561104 100644 --- a/ui/scss/component/_livestream.scss +++ b/ui/scss/component/_livestream.scss @@ -257,7 +257,7 @@ } &:nth-child(n) { &.livestream__data-row--selected { - background-color: var(--color-input-toggle-bg-hover); + background-color: var(--color-button-toggle-bg); } } td {