From 777f406abe54d55989e6bee448228ab33837c0ac Mon Sep 17 00:00:00 2001 From: zeppi Date: Tue, 30 Mar 2021 01:03:31 -0400 Subject: [PATCH 01/10] provide livestream replay publish via url --- flow-typed/livestream.js | 22 ++ flow-typed/subscription.js | 11 - static/app-strings.json | 5 + ui/component/fileActions/view.jsx | 17 +- ui/component/publishFile/index.js | 11 +- ui/component/publishFile/view.jsx | 316 +++++++++++++++++++++++--- ui/component/publishForm/index.js | 48 ++-- ui/component/publishForm/view.jsx | 153 +++++++++++-- ui/modal/modalPublishPreview/index.js | 27 ++- ui/modal/modalPublishPreview/view.jsx | 15 +- ui/scss/component/_livestream.scss | 76 +++++++ ui/scss/component/_table.scss | 16 ++ web/setup/publish.js | 2 + 13 files changed, 599 insertions(+), 120 deletions(-) create mode 100644 flow-typed/livestream.js diff --git a/flow-typed/livestream.js b/flow-typed/livestream.js new file mode 100644 index 000000000..9b1b2d30a --- /dev/null +++ b/flow-typed/livestream.js @@ -0,0 +1,22 @@ +// @flow + +declare type LivestreamReplayItem = { + data: { + claimId: string, + deleted: boolean, + deletedAt: ?string, + ffprobe: any, + fileDuration: number, // decimal? float? string? + fileType: string, + fileLocation: string, + fileSize: number, + key: string, + published: boolean, + publishedAt: ?string, + service: string, + thumbnails: Array, + uploadedAt: string, // Date? + }, + id: string, +} +declare type LivestreamReplayData = Array; diff --git a/flow-typed/subscription.js b/flow-typed/subscription.js index 53956b014..6f59206fc 100644 --- a/flow-typed/subscription.js +++ b/flow-typed/subscription.js @@ -1,15 +1,4 @@ // @flow -import * as ACTIONS from 'constants/action_types'; -import { - DOWNLOADED, - DOWNLOADING, - NOTIFY_ONLY, - VIEW_ALL, - VIEW_LATEST_FIRST, - SUGGESTED_TOP_BID, - SUGGESTED_TOP_SUBSCRIBED, - SUGGESTED_FEATURED, -} from 'constants/subscriptions'; declare type Subscription = { channelName: string, // @CryptoCandor, diff --git a/static/app-strings.json b/static/app-strings.json index 9b59ec2fc..1d6b125f0 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1777,6 +1777,11 @@ "Learn more and sign petition": "Learn more and sign petition", "Publishing...": "Publishing...", "Collection": "Collection", + "Upload that unlabeled video you found behind the TV in 1991": "Upload that unlabeled video you found behind the TV in 1991", + "Select Replay": "Select Replay", + "Craft an epic post clearly explaining... whatever.": "Craft an epic post clearly explaining... whatever.", + "waiting": "waiting", + "%viewer_count% currently %viewer_state%": "%viewer_count% currently %viewer_state%", "More from %claim_name%": "More from %claim_name%", "--end--": "--end--" } diff --git a/ui/component/fileActions/view.jsx b/ui/component/fileActions/view.jsx index a52970e3e..37acfbc85 100644 --- a/ui/component/fileActions/view.jsx +++ b/ui/component/fileActions/view.jsx @@ -3,7 +3,6 @@ import { SIMPLE_SITE, SITE_NAME, ENABLE_FILE_REACTIONS } from 'config'; import * as PAGES from 'constants/pages'; import * as MODALS from 'constants/modal_types'; import * as ICONS from 'constants/icons'; -import * as PUBLISH_MODES from 'constants/publish_types'; import React from 'react'; import Button from 'component/button'; import FileDownloadLink from 'component/fileDownloadLink'; @@ -114,25 +113,13 @@ function FileActions(props: Props) {