diff --git a/CHANGELOG.md b/CHANGELOG.md index c9af77a73..a163dba89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,18 +7,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased for Desktop] ### Added - +- Private and Publishable Playlists ([#6157](https://github.com/lbryio/lbry-desktop/pull/6157)) +- Channel thumbnails in following side menu ([#6193](https://github.com/lbryio/lbry-desktop/pull/6193)) +- Web is now PWA app ([#6120](https://github.com/lbryio/lbry-desktop/pull/6120)) - Send a tip with your comment ([#5920](https://github.com/lbryio/lbry-desktop/issues/5920)) - Search for tags in search dropdown ([#5876](https://github.com/lbryio/lbry-desktop/issues/5876)) - Japanese, Afrikaans, Filipino, Thai and Vietnamese language support ([#5684](https://github.com/lbryio/lbry-desktop/issues/5684)) +- Brazilian-Portuguese language support ([#5900](https://github.com/lbryio/lbry-desktop/issues/5900)) - Highlight comments made by content owner _community pr!_ ([#5744](https://github.com/lbryio/lbry-desktop/pull/5744)) - Ability to report infringing content directly from the application ([#5808](https://github.com/lbryio/lbry-desktop/pull/5808)) - Re-added ability to export wallet transactions ([#5899](https://github.com/lbryio/lbry-desktop/pull/5899)) +- 24-hour clock setting _community pr!_ ([#5820](https://github.com/lbryio/lbry-desktop/pull/5820)) +- "Related" (recommendations) section: added option to view more from current creator _community pr!_ ([#5847](https://github.com/lbryio/lbry-desktop/pull/5847)) +- Wallet: ability to swap cryptocurrency into LBC ([#5654](https://github.com/lbryio/lbry-desktop/pull/5654)) +- Wallet: ability to send LBC directly to a user through a name or URL search _community pr!_ ([#5990](https://github.com/lbryio/lbry-desktop/pull/5990)) +- Publish: ability to edit the Release Date field ([#6049](https://github.com/lbryio/lbry-desktop/pull/6049)) +- Creator Settings: ability to mute specific words in comments ([#5934](https://github.com/lbryio/lbry-desktop/pull/5934)) +- Creator Settings: ability to disable comments + assign moderators ([#6199](https://github.com/lbryio/lbry-desktop/pull/6199)) +- Additional options in context-menu _community pr!_ ([#6106](https://github.com/lbryio/lbry-desktop/pull/6106)) ### Changed - Keyboard shortcut additions and changes _community pr!_ ([#5717](https://github.com/lbryio/lbry-desktop/pull/5717)) - Removed the 10k character-limit when editing _Posts_ ([#5719](https://github.com/lbryio/lbry-desktop/pull/5719)) +- Improved search functionality (more filters, infinite-scroll, etc.) ([#5742](https://github.com/lbryio/lbry-desktop/pull/5742)) ### Fixed @@ -27,6 +39,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Autoplay looping to a previous video or itself ([#5711](https://github.com/lbryio/lbry-desktop/pull/5711)) - Autoplay not working in mini-player mode ([#5716](https://github.com/lbryio/lbry-desktop/pull/5716)) - Edited claim accidentally moved to 'Anonymous' ([#5767](https://github.com/lbryio/lbry-desktop/pull/5767)) +- Squished "Upload Date" and "View Count" on smaller screens _community pr!_ ([#5823](https://github.com/lbryio/lbry-desktop/pull/5823)) +- Home and End key not working in search bar ([#5867](https://github.com/lbryio/lbry-desktop/pull/5867)) +- Unable to buy paid-Images or Posts ([#6114](https://github.com/lbryio/lbry-desktop/pull/6114)) ## [0.50.2] - [2021-04-2] diff --git a/static/app-strings.json b/static/app-strings.json index 8737ec4a2..390d654ff 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1911,7 +1911,6 @@ "Enabling a minimum amount to hyperchat will force all TIPPED comments to have this value in order to be shown. This still allows regular comments to be posted.": "Enabling a minimum amount to hyperchat will force all TIPPED comments to have this value in order to be shown. This still allows regular comments to be posted.", "Settings unavailable for this channel": "Settings unavailable for this channel", "This channel isn't staking enough LBRY Credits to enable Creator Settings.": "This channel isn't staking enough LBRY Credits to enable Creator Settings.", - "Not a channel (prefix with \"@\", or enter the channel URL)": "Not a channel (prefix with \"@\", or enter the channel URL)", "We apologize for this inconvenience, but have added this additional step to prevent abuse. Users on VPN or shared connections will continue to see this message and are not eligible for Rewards.": "We apologize for this inconvenience, but have added this additional step to prevent abuse. Users on VPN or shared connections will continue to see this message and are not eligible for Rewards.", "Help LBRY Save Crypto": "Help LBRY Save Crypto", "The US government is attempting to destroy the cryptocurrency industry. Can you help?": "The US government is attempting to destroy the cryptocurrency industry. Can you help?", @@ -1995,6 +1994,5 @@ "Item added to Watch Later": "Item added to Watch Later", "Your publish is being confirmed and will be live soon": "Your publish is being confirmed and will be live soon", "Clear Edits": "Clear Edits", - "Something not quite right..": "Something not quite right..", "--end--": "--end--" } diff --git a/ui/component/claimPreview/view.jsx b/ui/component/claimPreview/view.jsx index a69742968..835f35b43 100644 --- a/ui/component/claimPreview/view.jsx +++ b/ui/component/claimPreview/view.jsx @@ -78,7 +78,6 @@ type Props = { isCollectionMine: boolean, collectionUris: Array, collectionIndex?: number, - disableNavigation?: boolean, }; const ClaimPreview = forwardRef((props: Props, ref: any) => { @@ -135,7 +134,6 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { editCollection, isCollectionMine, collectionUris, - disableNavigation, } = props; const isRepost = claim && claim.repost_channel_url; const WrapperElement = wrapperElement || 'li'; @@ -216,7 +214,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { onClick(e); } - if (claim && !pending && !disableNavigation) { + if (claim && !pending) { history.push(navigateUrl); } } @@ -425,9 +423,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { )} - {!hideMenu && ( - - )} + {!hideMenu && } ); diff --git a/ui/component/commentMenuList/index.js b/ui/component/commentMenuList/index.js index 16c197592..f549ba9f6 100644 --- a/ui/component/commentMenuList/index.js +++ b/ui/component/commentMenuList/index.js @@ -7,7 +7,6 @@ import { doCommentModBlock, doCommentModBlockAsAdmin, doCommentModBlockAsModerator, - doCommentModAddDelegate, } from 'redux/actions/comments'; import { doChannelMute } from 'redux/actions/blocked'; // import { doSetActiveChannel } from 'redux/actions/app'; @@ -37,8 +36,6 @@ const perform = (dispatch) => ({ commentModBlockAsAdmin: (commenterUri, blockerId) => dispatch(doCommentModBlockAsAdmin(commenterUri, blockerId)), commentModBlockAsModerator: (commenterUri, creatorId, blockerId) => dispatch(doCommentModBlockAsModerator(commenterUri, creatorId, blockerId)), - commentModAddDelegate: (modChanId, modChanName, creatorChannelClaim) => - dispatch(doCommentModAddDelegate(modChanId, modChanName, creatorChannelClaim, true)), }); export default connect(select, perform)(CommentMenuList); diff --git a/ui/component/commentMenuList/view.jsx b/ui/component/commentMenuList/view.jsx index d8c7ce563..cea182f2f 100644 --- a/ui/component/commentMenuList/view.jsx +++ b/ui/component/commentMenuList/view.jsx @@ -4,7 +4,6 @@ import React from 'react'; import { MenuList, MenuItem } from '@reach/menu-button'; import ChannelThumbnail from 'component/channelThumbnail'; import Icon from 'component/common/icon'; -import { parseURI } from 'lbry-redux'; type Props = { uri: string, @@ -26,7 +25,6 @@ type Props = { commentModBlock: (string) => void, commentModBlockAsAdmin: (string, string) => void, commentModBlockAsModerator: (string, string, string) => void, - commentModAddDelegate: (string, string, ChannelClaim) => void, playingUri: ?PlayingUri, disableEdit?: boolean, disableRemove?: boolean, @@ -53,7 +51,6 @@ function CommentMenuList(props: Props) { commentModBlock, commentModBlockAsAdmin, commentModBlockAsModerator, - commentModAddDelegate, playingUri, disableEdit, disableRemove, @@ -96,13 +93,6 @@ function CommentMenuList(props: Props) { muteChannel(authorUri); } - function assignAsModerator() { - if (activeChannelClaim && authorUri) { - const { channelName, channelClaimId } = parseURI(authorUri); - commentModAddDelegate(channelClaimId, channelName, activeChannelClaim); - } - } - function blockCommentAsModerator() { if (activeChannelClaim && contentChannelClaim) { commentModBlockAsModerator(authorUri, contentChannelClaim.claim_id, activeChannelClaim.claim_id); @@ -131,20 +121,6 @@ function CommentMenuList(props: Props) { )} - {activeChannelIsCreator && ( - -
- - {__('Add as moderator')} -
- - {__('Assign this user to moderate %channel%', { - channel: activeChannelClaim ? activeChannelClaim.name : __('your channel'), - })} - -
- )} - {!disableRemove && activeChannelClaim && (activeChannelClaim.permanent_url === authorUri || diff --git a/ui/component/viewers/videoViewer/internal/videojs.jsx b/ui/component/viewers/videoViewer/internal/videojs.jsx index 95482991b..52cc59706 100644 --- a/ui/component/viewers/videoViewer/internal/videojs.jsx +++ b/ui/component/viewers/videoViewer/internal/videojs.jsx @@ -564,12 +564,6 @@ export default React.memo(function VideoJs(props: Props) { // note: the poster prop seems to return null usually. if (poster) player.poster(poster); - // Update player source - player.src({ - src: finalSource, - type: type, - }); - // set playsinline for mobile player.children_[0].setAttribute('playsinline', ''); diff --git a/ui/page/settingsCreator/view.jsx b/ui/page/settingsCreator/view.jsx index c89a662b2..cf8b5d5c8 100644 --- a/ui/page/settingsCreator/view.jsx +++ b/ui/page/settingsCreator/view.jsx @@ -3,15 +3,13 @@ import * as React from 'react'; import Card from 'component/common/card'; import TagsSearch from 'component/tagsSearch'; import Page from 'component/page'; -import Button from 'component/button'; import ChannelSelector from 'component/channelSelector'; import Spinner from 'component/spinner'; import { FormField } from 'component/common/form-components/form-field'; import LbcSymbol from 'component/common/lbc-symbol'; import I18nMessage from 'component/i18nMessage'; -import { isNameValid, parseURI } from 'lbry-redux'; -import ClaimPreview from 'component/claimPreview'; -import { getUriForSearchTerm } from 'util/search'; +import { parseURI } from 'lbry-redux'; +import WunderBar from 'component/wunderbar'; const DEBOUNCE_REFRESH_MS = 1000; @@ -51,9 +49,6 @@ export default function SettingsCreatorPage(props: Props) { const [commentsEnabled, setCommentsEnabled] = React.useState(true); const [mutedWordTags, setMutedWordTags] = React.useState([]); const [moderatorTags, setModeratorTags] = React.useState([]); - const [moderatorSearchTerm, setModeratorSearchTerm] = React.useState(''); - const [moderatorSearchError, setModeratorSearchError] = React.useState(''); - const [moderatorSearchClaimUri, setModeratorSearchClaimUri] = React.useState(''); const [minTipAmountComment, setMinTipAmountComment] = React.useState(0); const [minTipAmountSuperChat, setMinTipAmountSuperChat] = React.useState(0); const [slowModeMinGap, setSlowModeMinGap] = React.useState(0); @@ -147,39 +142,17 @@ export default function SettingsCreatorPage(props: Props) { } } - function handleChannelSearchSelect(claim) { - if (claim && claim.name && claim.claim_id) { - addModerator([{ name: claim.name + '#' + claim.claim_id }]); + function handleChannelSearchSelect(value: string) { + let uriInfo; + try { + uriInfo = parseURI(value); + } catch (e) {} + + if (uriInfo && uriInfo.path) { + addModerator([{ name: uriInfo.path }]); } } - // 'moderatorSearchTerm' to 'moderatorSearchClaimUri' - React.useEffect(() => { - if (!moderatorSearchTerm) { - setModeratorSearchError(''); - setModeratorSearchClaimUri(''); - } else { - const [searchUri, error] = getUriForSearchTerm(moderatorSearchTerm); - setModeratorSearchError(error ? __('Something not quite right..') : ''); - - try { - const { streamName, channelName, isChannel } = parseURI(searchUri); - - if (!isChannel && streamName && isNameValid(streamName)) { - setModeratorSearchError(__('Not a channel (prefix with "@", or enter the channel URL)')); - setModeratorSearchClaimUri(''); - } else if (isChannel && channelName && isNameValid(channelName)) { - setModeratorSearchClaimUri(searchUri); - } - } catch (e) { - if (moderatorSearchTerm !== '@') { - setModeratorSearchError(''); - } - setModeratorSearchClaimUri(''); - } - } - }, [moderatorSearchTerm, setModeratorSearchError]); - // Update local moderator states with data from API. React.useEffect(() => { commentModListDelegates(activeChannelClaim); @@ -345,44 +318,18 @@ export default function SettingsCreatorPage(props: Props) { className="card--enable-overflow" actions={
- setModeratorSearchTerm(e.target.value)} - error={moderatorSearchError} + + - {moderatorSearchClaimUri && ( -
- { - return ( -
- )} blockerIds.includes(x.claim_id)); } - const { channelName, channelClaimId } = parseURI(commenterUri); + const commenterClaim = selectClaimsByUri(state)[commenterUri]; + if (!commenterClaim) { + console.error("Can't find claim to block"); // eslint-disable-line + return; + } const creatorClaim = selectClaimsById(state)[creatorId]; if (creatorId && !creatorClaim) { @@ -584,8 +587,8 @@ function doCommentModToggleBlock( }, }); - const commenterIdForAction = channelClaimId; - const commenterNameForAction = channelName; + const commenterIdForAction = commenterClaim ? commenterClaim.claim_id : null; + const commenterNameForAction = commenterClaim ? commenterClaim.name : null; let channelSignatures = []; @@ -942,8 +945,7 @@ export const doUpdateBlockListForPublishedChannel = (channelClaim: ChannelClaim) export function doCommentModAddDelegate( modChannelId: string, modChannelName: string, - creatorChannelClaim: ChannelClaim, - showToast: boolean = false + creatorChannelClaim: ChannelClaim ) { return async (dispatch: Dispatch, getState: GetState) => { let signature: ?{ @@ -968,29 +970,14 @@ export function doCommentModAddDelegate( creator_channel_name: creatorChannelClaim.name, signature: signature.signature, signing_ts: signature.signing_ts, - }) - .then(() => { - if (showToast) { - dispatch( - doToast({ - message: __('Added %user% as moderator for %myChannel%', { - user: modChannelName, - myChannel: creatorChannelClaim.name, - }), - linkText: __('Manage'), - linkTarget: `/${PAGES.SETTINGS_CREATOR}`, - }) - ); - } - }) - .catch((err) => { - dispatch( - doToast({ - message: err.message, - isError: true, - }) - ); - }); + }).catch((err) => { + dispatch( + doToast({ + message: err.message, + isError: true, + }) + ); + }); }; } diff --git a/ui/util/search.js b/ui/util/search.js index 3839b4d6f..b9ec5a910 100644 --- a/ui/util/search.js +++ b/ui/util/search.js @@ -1,8 +1,5 @@ // @flow -import { isNameValid, isURIValid, normalizeURI, parseURI } from 'lbry-redux'; -import { URL as SITE_URL, URL_LOCAL, URL_DEV } from 'config'; - export function createNormalizedSearchKey(query: string) { const FROM = '&from='; @@ -36,70 +33,3 @@ export function getLivestreamOnlyOptions(options: any) { newOptions.has_no_source = true; return newOptions; } - -/** - * getUriForSearchTerm - * @param term - * @returns {string[]|*[]|(string|string)[]} - */ -export function getUriForSearchTerm(term: string) { - const WEB_DEV_PREFIX = `${URL_DEV}/`; - const WEB_LOCAL_PREFIX = `${URL_LOCAL}/`; - const WEB_PROD_PREFIX = `${SITE_URL}/`; - const ODYSEE_PREFIX = `https://odysee.com/`; - const includesLbryTvProd = term.includes(WEB_PROD_PREFIX); - const includesOdysee = term.includes(ODYSEE_PREFIX); - const includesLbryTvLocal = term.includes(WEB_LOCAL_PREFIX); - const includesLbryTvDev = term.includes(WEB_DEV_PREFIX); - const wasCopiedFromWeb = includesLbryTvDev || includesLbryTvLocal || includesLbryTvProd || includesOdysee; - const isLbryUrl = term.startsWith('lbry://') && term !== 'lbry://'; - const error = ''; - - const addLbryIfNot = (term) => { - return term.startsWith('lbry://') ? term : `lbry://${term}`; - }; - - if (wasCopiedFromWeb) { - let prefix = WEB_PROD_PREFIX; - if (includesLbryTvLocal) prefix = WEB_LOCAL_PREFIX; - if (includesLbryTvDev) prefix = WEB_DEV_PREFIX; - if (includesOdysee) prefix = ODYSEE_PREFIX; - - let query = (term && term.slice(prefix.length).replace(/:/g, '#')) || ''; - try { - const lbryUrl = `lbry://${query}`; - parseURI(lbryUrl); - return [lbryUrl, null]; - } catch (e) { - return [query, 'error']; - } - } - - if (!isLbryUrl) { - if (term.startsWith('@')) { - if (isNameValid(term.slice(1))) { - return [term, null]; - } else { - return [term, error]; - } - } - return [addLbryIfNot(term), null]; - } else { - try { - const isValid = isURIValid(term); - if (isValid) { - let uri; - try { - uri = normalizeURI(term); - } catch (e) { - return [term, null]; - } - return [uri, null]; - } else { - return [term, null]; - } - } catch (e) { - return [term, 'error']; - } - } -}