Compare commits
11 Commits
protocol
...
notificati
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
985f8e3724 | ||
|
|
076df9c47f | ||
|
|
56852955e4 | ||
|
|
62001810df | ||
|
|
a6eaf0b652 | ||
|
|
6bca894f1c | ||
|
|
7fd1849e3d | ||
|
|
3df47c607c | ||
|
|
4e02c84f90 | ||
|
|
ec6a2c315b | ||
|
|
08cca491fe |
@@ -10,7 +10,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Add watch later to hover action for last used playlist on popup _community pr!_ ([#6274](https://github.com/lbryio/lbry-desktop/pull/6274))
|
||||
- Open in desktop (web feature) _community pr!_ ([#6667](https://github.com/lbryio/lbry-desktop/pull/6667))
|
||||
- Add confirmation on comment removal _community pr!_ ([#6563](https://github.com/lbryio/lbry-desktop/pull/6563))
|
||||
- Show on content page if a file is part of a playlist already _community pr!_([#6393](https://github.com/lbryio/lbry-desktop/pull/6393))
|
||||
|
||||
### Changed
|
||||
- Use Canonical Url for copy link ([#6500](https://github.com/lbryio/lbry-desktop/pull/6500))
|
||||
|
||||
@@ -45,15 +45,9 @@ let daemon;
|
||||
let lbryFirst;
|
||||
|
||||
const appState = {};
|
||||
const PROTOCOL = 'lbry';
|
||||
|
||||
if (isDev && process.platform === 'win32') {
|
||||
// Setting this is required to get this working in dev mode.
|
||||
app.setAsDefaultProtocolClient(PROTOCOL, process.execPath, [
|
||||
path.resolve(process.argv[1]),
|
||||
]);
|
||||
} else {
|
||||
app.setAsDefaultProtocolClient(PROTOCOL);
|
||||
if (process.platform !== 'linux') {
|
||||
app.setAsDefaultProtocolClient('lbry');
|
||||
}
|
||||
|
||||
app.name = 'LBRY';
|
||||
@@ -155,15 +149,9 @@ if (!gotSingleInstanceLock) {
|
||||
app.on('second-instance', (event, argv) => {
|
||||
// Send the url to the app to navigate first, then focus
|
||||
if (rendererWindow) {
|
||||
// External uri (last item on argv):
|
||||
const EXTERNAL_URI = (argv.length) ? argv[argv.length - 1] : '';
|
||||
// Handle protocol requests for windows and linux
|
||||
const platforms = (process.platform === 'win32' || process.platform === 'linux');
|
||||
// Is LBRY protocol
|
||||
const isProtocolURI = String(EXTERNAL_URI).startsWith(PROTOCOL + '://');
|
||||
// External protocol requested:
|
||||
if (platforms && isProtocolURI) {
|
||||
let URI = EXTERNAL_URI;
|
||||
if ((process.platform === 'win32' || process.platform === 'linux') && String(argv[1]).startsWith('lbry')) {
|
||||
let URI = argv[1];
|
||||
|
||||
// Keep only command line / deep linked arguments
|
||||
// Windows normalizes URIs when they're passed in from other apps. On Windows, this tries to
|
||||
// restore the original URI that was typed.
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
"imagesloaded": "^4.1.4",
|
||||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#7cc9923ed9ff1940b508842af6be44c8da906a60",
|
||||
"lbry-redux": "lbryio/lbry-redux#a327385cdf71568dbd15a17f3dcf5f4b83e0966d",
|
||||
"lbryinc": "lbryio/lbryinc#8f9a58bfc8312a65614fd7327661cdcc502c4e59",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
|
||||
@@ -2058,15 +2058,14 @@
|
||||
"Only select creators can receive tips at this time": "Only select creators can receive tips at this time",
|
||||
"The payment will be made from your saved card": "The payment will be made from your saved card",
|
||||
"Commenting...": "Commenting...",
|
||||
"Show %count% replies": "Show %count% replies",
|
||||
"Show reply": "Show reply",
|
||||
"added to": "added to",
|
||||
"removed from": "removed from",
|
||||
"Skip Navigation": "Skip Navigation",
|
||||
"Reset": "Reset",
|
||||
"Reset to original (previous) publish date": "Reset to original (previous) publish date",
|
||||
"Search for something...": "Search for something...",
|
||||
"Open in Desktop": "Open in Desktop",
|
||||
"Show %count% replies": "Show %count% replies",
|
||||
"Show reply": "Show reply",
|
||||
"Confirm Comment Deletion": "Confirm Comment Deletion",
|
||||
"Remove Comment": "Remove Comment",
|
||||
"Are you sure you want to remove this comment?": "Are you sure you want to remove this comment?",
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { doOpenModal } from 'redux/actions/app';
|
||||
import CollectionAddButton from './view';
|
||||
import { makeSelectClaimForUri, makeSelectClaimUrlInCollection } from 'lbry-redux';
|
||||
import { makeSelectClaimForUri } from 'lbry-redux';
|
||||
|
||||
const select = (state, props) => {
|
||||
const claim = makeSelectClaimForUri(props.uri)(state);
|
||||
const permanentUrl = claim && claim.permanent_url;
|
||||
|
||||
return {
|
||||
claim,
|
||||
isSaved: makeSelectClaimUrlInCollection(permanentUrl)(state),
|
||||
};
|
||||
};
|
||||
const select = (state, props) => ({
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
});
|
||||
|
||||
export default connect(select, {
|
||||
doOpenModal,
|
||||
|
||||
@@ -11,11 +11,10 @@ type Props = {
|
||||
fileAction?: boolean,
|
||||
type?: boolean,
|
||||
claim: Claim,
|
||||
isSaved: boolean,
|
||||
};
|
||||
|
||||
export default function CollectionAddButton(props: Props) {
|
||||
const { doOpenModal, uri, fileAction, type = 'playlist', claim, isSaved } = props;
|
||||
const { doOpenModal, uri, fileAction, type = 'playlist', claim } = props;
|
||||
|
||||
// $FlowFixMe
|
||||
const streamType = (claim && claim.value && claim.value.stream_type) || '';
|
||||
@@ -26,9 +25,9 @@ export default function CollectionAddButton(props: Props) {
|
||||
<Button
|
||||
button={fileAction ? undefined : 'alt'}
|
||||
className={classnames({ 'button--file-action': fileAction })}
|
||||
icon={fileAction ? (!isSaved ? ICONS.ADD : ICONS.STACK) : ICONS.LIBRARY}
|
||||
icon={fileAction ? ICONS.ADD : ICONS.LIBRARY}
|
||||
iconSize={fileAction ? 22 : undefined}
|
||||
label={uri ? (!isSaved ? __('Save') : __('Saved')) : __('New List')}
|
||||
label={uri ? __('Save') : __('New List')}
|
||||
requiresAuth={IS_WEB}
|
||||
title={__('Add this claim to a list')}
|
||||
onClick={(e) => {
|
||||
|
||||
@@ -106,7 +106,7 @@ function ClaimListDiscover(props: Props) {
|
||||
claimType,
|
||||
pageSize,
|
||||
defaultClaimType,
|
||||
streamType = SIMPLE_SITE ? [CS.FILE_VIDEO, CS.FILE_AUDIO] : undefined,
|
||||
streamType = SIMPLE_SITE ? CS.FILE_VIDEO : undefined,
|
||||
defaultStreamType = SIMPLE_SITE ? CS.FILE_VIDEO : undefined, // add param for DEFAULT_STREAM_TYPE
|
||||
freshness,
|
||||
defaultFreshness = CS.FRESH_WEEK,
|
||||
@@ -319,7 +319,7 @@ function ClaimListDiscover(props: Props) {
|
||||
}
|
||||
|
||||
if (streamTypeParam && streamTypeParam !== CS.CONTENT_ALL && claimType !== CS.CLAIM_CHANNEL) {
|
||||
options.stream_types = typeof streamTypeParam === 'string' ? [streamTypeParam] : streamTypeParam;
|
||||
options.stream_types = [streamTypeParam];
|
||||
}
|
||||
|
||||
if (claimTypeParam) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import { Menu, MenuButton, MenuList, MenuItem } from '@reach/menu-button';
|
||||
import Icon from 'component/common/icon';
|
||||
import { generateShareUrl, generateRssUrl, generateLbryContentUrl } from 'util/url';
|
||||
import { useHistory } from 'react-router';
|
||||
import { useIsMobile } from 'effects/use-screensize';
|
||||
import { buildURI, parseURI, COLLECTIONS_CONSTS } from 'lbry-redux';
|
||||
|
||||
const SHARE_DOMAIN = SHARE_DOMAIN_URL || URL;
|
||||
@@ -95,7 +94,6 @@ function ClaimMenuList(props: Props) {
|
||||
editedCollection,
|
||||
isAuthenticated,
|
||||
} = props;
|
||||
const isMobile = useIsMobile();
|
||||
const incognitoClaim = contentChannelUri && !contentChannelUri.includes('@');
|
||||
const isChannel = !incognitoClaim && !contentSigningChannel;
|
||||
const { channelName } = parseURI(contentChannelUri);
|
||||
@@ -231,10 +229,6 @@ function ClaimMenuList(props: Props) {
|
||||
push(`/$/${PAGES.REPORT_CONTENT}?claimId=${contentClaim && contentClaim.claim_id}`);
|
||||
}
|
||||
|
||||
function handleOpenInDesktop() {
|
||||
window.open(claim.permanent_url, '_top');
|
||||
}
|
||||
|
||||
return (
|
||||
<Menu>
|
||||
<MenuButton
|
||||
@@ -416,15 +410,6 @@ function ClaimMenuList(props: Props) {
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{IS_WEB && !isMobile && (
|
||||
<MenuItem className="comment__menu-option" onSelect={handleOpenInDesktop}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.DESKTOP} />
|
||||
{__('Open in Desktop')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{!claimIsMine && !isMyCollection && (
|
||||
<MenuItem className="comment__menu-option" onSelect={handleReportContent}>
|
||||
<div className="menu__link">
|
||||
|
||||
@@ -59,7 +59,9 @@ type Props = {
|
||||
stakedLevel: number,
|
||||
supportAmount: number,
|
||||
numDirectReplies: number,
|
||||
isFiat: boolean
|
||||
isFiat: boolean,
|
||||
setCommentReply: (any) => void,
|
||||
commentReply: any,
|
||||
};
|
||||
|
||||
const LENGTH_TO_COLLAPSE = 300;
|
||||
@@ -93,6 +95,8 @@ function Comment(props: Props) {
|
||||
supportAmount,
|
||||
numDirectReplies,
|
||||
isFiat,
|
||||
setCommentReply,
|
||||
commentReply,
|
||||
} = props;
|
||||
|
||||
const {
|
||||
@@ -178,6 +182,7 @@ function Comment(props: Props) {
|
||||
|
||||
function handleSubmit() {
|
||||
updateComment(commentId, editedMessage);
|
||||
setCommentReply({ ...commentReply, comment_id: commentId, comment: editedMessage });
|
||||
setEditing(false);
|
||||
}
|
||||
|
||||
@@ -253,7 +258,10 @@ function Comment(props: Props) {
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="comment__menu">
|
||||
<span className="comment__menu" onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}}>
|
||||
<Menu>
|
||||
<MenuButton className="menu__button">
|
||||
<Icon
|
||||
@@ -271,9 +279,10 @@ function Comment(props: Props) {
|
||||
commentIsMine={commentIsMine}
|
||||
handleEditComment={handleEditComment}
|
||||
supportAmount={supportAmount}
|
||||
setCommentReply={setCommentReply}
|
||||
/>
|
||||
</Menu>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
{isEditing ? (
|
||||
@@ -286,6 +295,10 @@ function Comment(props: Props) {
|
||||
charCount={charCount}
|
||||
onChange={handleEditMessageChanged}
|
||||
textAreaMaxLength={FF_MAX_CHARS_IN_COMMENT}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}}
|
||||
/>
|
||||
<div className="section__actions section__actions--no-margin">
|
||||
<Button
|
||||
@@ -294,8 +307,15 @@ function Comment(props: Props) {
|
||||
label={__('Done')}
|
||||
requiresAuth={IS_WEB}
|
||||
disabled={message === editedMessage}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
}}
|
||||
/>
|
||||
<Button button="link" label={__('Cancel')} onClick={() => setEditing(false)} />
|
||||
<Button button="link" label={__('Cancel')} onClick={(e) => {
|
||||
setEditing(false);
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}} />
|
||||
</div>
|
||||
</Form>
|
||||
) : (
|
||||
@@ -330,7 +350,11 @@ function Comment(props: Props) {
|
||||
requiresAuth={IS_WEB}
|
||||
label={commentingEnabled ? __('Reply') : __('Log in to reply')}
|
||||
className="comment__action"
|
||||
onClick={handleCommentReply}
|
||||
onClick={(e) => {
|
||||
handleCommentReply();
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}}
|
||||
icon={ICONS.REPLY}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -50,6 +50,7 @@ type Props = {
|
||||
sendTip: ({}, (any) => void, (any) => void) => void,
|
||||
doToast: ({ message: string }) => void,
|
||||
disabled: boolean,
|
||||
setCommentReply: (any) => void,
|
||||
};
|
||||
|
||||
export function CommentCreate(props: Props) {
|
||||
@@ -71,6 +72,7 @@ export function CommentCreate(props: Props) {
|
||||
claimIsMine,
|
||||
sendTip,
|
||||
doToast,
|
||||
setCommentReply,
|
||||
} = props;
|
||||
const buttonRef: ElementRef<any> = React.useRef();
|
||||
const {
|
||||
@@ -80,7 +82,7 @@ export function CommentCreate(props: Props) {
|
||||
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
||||
const [commentFailure, setCommentFailure] = React.useState(false);
|
||||
const [successTip, setSuccessTip] = React.useState({ txid: undefined, tipAmount: undefined });
|
||||
const { claim_id: claimId } = claim;
|
||||
const claimId = claim && claim.claim_id;
|
||||
const [isSupportComment, setIsSupportComment] = React.useState();
|
||||
const [isReviewingSupportComment, setIsReviewingSupportComment] = React.useState();
|
||||
const [tipAmount, setTipAmount] = React.useState(1);
|
||||
@@ -244,6 +246,7 @@ export function CommentCreate(props: Props) {
|
||||
createComment(commentValue, claimId, parentId, txid, payment_intent_id, environment)
|
||||
.then((res) => {
|
||||
setIsSubmitting(false);
|
||||
setCommentReply(res);
|
||||
|
||||
if (res && res.signature) {
|
||||
setCommentValue('');
|
||||
@@ -330,9 +333,21 @@ export function CommentCreate(props: Props) {
|
||||
? __('Re-submit')
|
||||
: __('Send')
|
||||
}
|
||||
onClick={handleSupportComment}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
handleSupportComment();
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
button="link"
|
||||
label={__('Cancel')}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
setIsReviewingSupportComment(false);
|
||||
}}
|
||||
/>
|
||||
<Button button="link" label={__('Cancel')} onClick={() => setIsReviewingSupportComment(false)} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -371,6 +386,10 @@ export function CommentCreate(props: Props) {
|
||||
onChange={handleCommentChange}
|
||||
autoFocus={isReply}
|
||||
textAreaMaxLength={livestream ? FF_MAX_CHARS_IN_LIVESTREAM_COMMENT : FF_MAX_CHARS_IN_COMMENT}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}}
|
||||
/>
|
||||
{isSupportComment && (
|
||||
<WalletTipAmountSelector
|
||||
@@ -391,10 +410,23 @@ export function CommentCreate(props: Props) {
|
||||
button="primary"
|
||||
icon={activeTab === TAB_LBC ? ICONS.LBC : ICONS.FINANCE}
|
||||
label={__('Review')}
|
||||
onClick={() => setIsReviewingSupportComment(true)}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
setIsReviewingSupportComment(true);
|
||||
}}
|
||||
/>
|
||||
|
||||
<Button disabled={disabled} button="link" label={__('Cancel')} onClick={() => setIsSupportComment(false)} />
|
||||
<Button
|
||||
disabled={disabled}
|
||||
button="link"
|
||||
label={__('Cancel')}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
setIsSupportComment(false);
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
@@ -413,6 +445,9 @@ export function CommentCreate(props: Props) {
|
||||
: __('Comment --[button to submit something]--')
|
||||
}
|
||||
requiresAuth={IS_WEB}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
}}
|
||||
/>
|
||||
{!claimIsMine && (
|
||||
<Button
|
||||
@@ -420,7 +455,9 @@ export function CommentCreate(props: Props) {
|
||||
button="alt"
|
||||
className="thatButton"
|
||||
icon={ICONS.LBC}
|
||||
onClick={() => {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
setIsSupportComment(true);
|
||||
setActiveTab(TAB_LBC);
|
||||
}}
|
||||
@@ -432,7 +469,9 @@ export function CommentCreate(props: Props) {
|
||||
button="alt"
|
||||
className="thisButton"
|
||||
icon={ICONS.FINANCE}
|
||||
onClick={() => {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
setIsSupportComment(true);
|
||||
setActiveTab(TAB_FIAT);
|
||||
}}
|
||||
@@ -442,7 +481,9 @@ export function CommentCreate(props: Props) {
|
||||
<Button
|
||||
button="link"
|
||||
label={__('Cancel')}
|
||||
onClick={() => {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if (onCancelReplying) {
|
||||
onCancelReplying();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ type Props = {
|
||||
moderationDelegatorsById: { [string]: { global: boolean, delegators: { name: string, claimId: string } } },
|
||||
openModal: (id: string, {}) => void,
|
||||
supportAmount?: any,
|
||||
setCommentReply: (any) => void,
|
||||
};
|
||||
|
||||
function CommentMenuList(props: Props) {
|
||||
@@ -56,6 +57,7 @@ function CommentMenuList(props: Props) {
|
||||
moderationDelegatorsById,
|
||||
openModal,
|
||||
supportAmount,
|
||||
setCommentReply,
|
||||
} = props;
|
||||
|
||||
const contentChannelClaim = !claim
|
||||
@@ -83,7 +85,7 @@ function CommentMenuList(props: Props) {
|
||||
if (playingUri && playingUri.source === 'comment') {
|
||||
clearPlayingUri();
|
||||
}
|
||||
openModal(MODALS.CONFIRM_REMOVE_COMMENT, { commentId, commentIsMine, contentChannelPermanentUrl, supportAmount });
|
||||
openModal(MODALS.CONFIRM_REMOVE_COMMENT, { commentId, commentIsMine, contentChannelPermanentUrl, supportAmount, setCommentReply });
|
||||
}
|
||||
|
||||
function handleCommentBlock() {
|
||||
|
||||
@@ -91,7 +91,11 @@ export default function CommentReactions(props: Props) {
|
||||
className={classnames('comment__action', {
|
||||
'comment__action--active': myReacts && myReacts.includes(REACTION_TYPES.LIKE),
|
||||
})}
|
||||
onClick={handleCommentLike}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
handleCommentLike();
|
||||
}}
|
||||
label={<span className="comment__reaction-count">{getCountForReact(REACTION_TYPES.LIKE)}</span>}
|
||||
/>
|
||||
<Button
|
||||
@@ -101,7 +105,11 @@ export default function CommentReactions(props: Props) {
|
||||
className={classnames('comment__action', {
|
||||
'comment__action--active': myReacts && myReacts.includes(REACTION_TYPES.DISLIKE),
|
||||
})}
|
||||
onClick={handleCommentDislike}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
handleCommentDislike();
|
||||
}}
|
||||
label={<span className="comment__reaction-count">{getCountForReact(REACTION_TYPES.DISLIKE)}</span>}
|
||||
/>
|
||||
|
||||
@@ -113,7 +121,11 @@ export default function CommentReactions(props: Props) {
|
||||
title={claimIsMine ? __('You loved this') : __('Creator loved this')}
|
||||
icon={creatorLiked ? ICONS.CREATOR_LIKE : ICONS.SUBSCRIBE}
|
||||
className={classnames('comment__action comment__action--creator-like')}
|
||||
onClick={() => react(commentId, REACTION_TYPES.CREATOR_LIKE)}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
react(commentId, REACTION_TYPES.CREATOR_LIKE);
|
||||
}}
|
||||
>
|
||||
{creatorLiked && (
|
||||
<ChannelThumbnail xsmall uri={authorUri} hideStakedIndicator className="comment__creator-like" />
|
||||
|
||||
@@ -13,7 +13,6 @@ import usePersistedState from 'effects/use-persisted-state';
|
||||
import { ENABLE_COMMENT_REACTIONS } from 'config';
|
||||
import Empty from 'component/common/empty';
|
||||
import debounce from 'util/debounce';
|
||||
import { useIsMobile } from 'effects/use-screensize';
|
||||
|
||||
const DEBOUNCE_SCROLL_HANDLER_MS = 200;
|
||||
|
||||
@@ -75,8 +74,6 @@ function CommentList(props: Props) {
|
||||
const DEFAULT_SORT = ENABLE_COMMENT_REACTIONS ? SORT_BY.POPULARITY : SORT_BY.NEWEST;
|
||||
const [sort, setSort] = usePersistedState('comment-sort-by', DEFAULT_SORT);
|
||||
const [page, setPage] = React.useState(0);
|
||||
const isMobile = useIsMobile();
|
||||
const [expandedComments, setExpandedComments] = React.useState(!isMobile);
|
||||
const totalFetchedComments = allCommentIds ? allCommentIds.length : 0;
|
||||
|
||||
// Display comments immediately if not fetching reactions
|
||||
@@ -194,7 +191,7 @@ function CommentList(props: Props) {
|
||||
}
|
||||
|
||||
const handleCommentScroll = debounce(() => {
|
||||
if (!isMobile && shouldFetchNextPage(page, topLevelTotalPages, window, document)) {
|
||||
if (shouldFetchNextPage(page, topLevelTotalPages, window, document)) {
|
||||
setPage(page + 1);
|
||||
}
|
||||
}, DEBOUNCE_SCROLL_HANDLER_MS);
|
||||
@@ -208,7 +205,6 @@ function CommentList(props: Props) {
|
||||
}
|
||||
}
|
||||
}, [
|
||||
isMobile,
|
||||
page,
|
||||
moreBelow,
|
||||
spinnerRef,
|
||||
@@ -283,13 +279,7 @@ function CommentList(props: Props) {
|
||||
<Empty padded text={__('That was pretty deep. What do you think?')} />
|
||||
)}
|
||||
|
||||
<ul
|
||||
className={classnames({
|
||||
comments: expandedComments,
|
||||
'comments--contracted': !expandedComments,
|
||||
})}
|
||||
ref={commentRef}
|
||||
>
|
||||
<ul className="comments" ref={commentRef}>
|
||||
{topLevelComments &&
|
||||
displayedComments &&
|
||||
displayedComments.map((comment) => {
|
||||
@@ -317,36 +307,7 @@ function CommentList(props: Props) {
|
||||
})}
|
||||
</ul>
|
||||
|
||||
{isMobile && (
|
||||
<div className="card__bottom-actions--comments">
|
||||
{moreBelow && (
|
||||
<Button
|
||||
button="link"
|
||||
title={!expandedComments ? __('Expand Comments') : __('Load More')}
|
||||
label={!expandedComments ? __('Expand') : __('More')}
|
||||
onClick={() => {
|
||||
if (!expandedComments) {
|
||||
setExpandedComments(true);
|
||||
} else {
|
||||
setPage(page + 1);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{expandedComments && (
|
||||
<Button
|
||||
button="link"
|
||||
title={__('Collapse Thread')}
|
||||
label={__('Collapse')}
|
||||
onClick={() => {
|
||||
setExpandedComments(false);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{(isFetchingComments || (!isMobile && moreBelow)) && (
|
||||
{(isFetchingComments || moreBelow) && (
|
||||
<div className="main--empty" ref={spinnerRef}>
|
||||
<Spinner type="small" />
|
||||
</div>
|
||||
|
||||
@@ -283,10 +283,12 @@ export class FormField extends React.PureComponent<Props> {
|
||||
type="button"
|
||||
className="button--emoji"
|
||||
label={emoji}
|
||||
onClick={() => {
|
||||
onClick={(e) => {
|
||||
inputProps.onChange({
|
||||
target: { value: inputProps.value ? `${inputProps.value} ${emoji}` : emoji },
|
||||
});
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
|
||||
@@ -2331,11 +2331,4 @@ export const icons = {
|
||||
<path d="M4.954 14.753l3.535 3.535-1.768 1.768-3.535-3.535z" />
|
||||
</g>
|
||||
),
|
||||
[ICONS.DESKTOP]: buildIcon(
|
||||
<g>
|
||||
<rect x="2" y="3" width="20" height="14" rx="2" ry="2" />
|
||||
<line x1="8" y1="21" x2="16" y2="21" />
|
||||
<line x1="12" y1="17" x2="12" y2="21" />
|
||||
</g>
|
||||
),
|
||||
};
|
||||
|
||||
@@ -113,10 +113,6 @@ function FileActions(props: Props) {
|
||||
}
|
||||
}
|
||||
|
||||
function handleOpenInDesktop() {
|
||||
window.open(claim.permanent_url, '_top');
|
||||
}
|
||||
|
||||
const lhsSection = (
|
||||
<>
|
||||
{ENABLE_FILE_REACTIONS && !reactionsDisabled && <FileReactions uri={uri} livestream={isLivestreamClaim} />}
|
||||
@@ -192,14 +188,6 @@ function FileActions(props: Props) {
|
||||
</MenuItem>
|
||||
)}
|
||||
{/* @endif */}
|
||||
{IS_WEB && !isMobile && (
|
||||
<MenuItem className="comment__menu-option" onSelect={handleOpenInDesktop}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.DESKTOP} />
|
||||
{__('Open in Desktop')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
{!claimIsMine && (
|
||||
<MenuItem
|
||||
className="comment__menu-option"
|
||||
|
||||
@@ -31,17 +31,7 @@ export default function Logo(props: Props) {
|
||||
if (LOGO_TEXT_LIGHT) {
|
||||
return (
|
||||
<>
|
||||
<img className={'embed__overlay-logo'} src={LOGO_TEXT_LIGHT} />
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
return defaultWithLabel;
|
||||
}
|
||||
} else if (type === 'embed-ended') {
|
||||
if (LOGO_TEXT_LIGHT) {
|
||||
return (
|
||||
<>
|
||||
<img className={'embed__overlay-logo'} src={LOGO_TEXT_LIGHT} />
|
||||
<img className={'header__navigation-logo'} src={LOGO_TEXT_LIGHT} />
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { doReadNotifications, doDeleteNotification } from 'redux/actions/notifications';
|
||||
import { doResolveUri, selectMyChannelClaims } from 'lbry-redux';
|
||||
import Notification from './view';
|
||||
|
||||
export default connect(null, {
|
||||
const select = (state) => ({
|
||||
myChannels: selectMyChannelClaims(state),
|
||||
});
|
||||
|
||||
export default connect(select, {
|
||||
doReadNotifications,
|
||||
doDeleteNotification,
|
||||
doResolveUri,
|
||||
})(Notification);
|
||||
|
||||
@@ -16,6 +16,11 @@ import FileThumbnail from 'component/fileThumbnail';
|
||||
import { Menu, MenuList, MenuButton, MenuItem } from '@reach/menu-button';
|
||||
import NotificationContentChannelMenu from 'component/notificationContentChannelMenu';
|
||||
import LbcMessage from 'component/common/lbc-message';
|
||||
import UriIndicator from 'component/uriIndicator';
|
||||
import CommentReactions from 'component/commentReactions';
|
||||
import CommentCreate from 'component/commentCreate';
|
||||
import CommentView from 'component/comment';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
|
||||
type Props = {
|
||||
notification: WebNotification,
|
||||
@@ -23,19 +28,33 @@ type Props = {
|
||||
children: any,
|
||||
doReadNotifications: ([number]) => void,
|
||||
doDeleteNotification: (number) => void,
|
||||
doResolveUri: (string) => void,
|
||||
myChannels: ?Array<ChannelClaim>,
|
||||
};
|
||||
|
||||
export default function Notification(props: Props) {
|
||||
const { notification, menuButton = false, doReadNotifications, doDeleteNotification } = props;
|
||||
const { notification, menuButton = false, doReadNotifications, doDeleteNotification, doResolveUri, myChannels } = props;
|
||||
const { push } = useHistory();
|
||||
const { notification_rule, notification_parameters, is_read, id } = notification;
|
||||
const [isReplying, setReplying] = React.useState(false);
|
||||
const [commentReply, setCommentReply] = React.useState();
|
||||
|
||||
const isMyComment = (channelId: string): boolean => {
|
||||
if (myChannels != null && channelId != null) {
|
||||
for (let i = 0; i < myChannels.length; i++) {
|
||||
if (myChannels[i].claim_id === channelId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const isCommentNotification =
|
||||
notification_rule === RULE.COMMENT ||
|
||||
notification_rule === RULE.COMMENT_REPLY ||
|
||||
notification_rule === RULE.CREATOR_COMMENT;
|
||||
const commentText = isCommentNotification && notification_parameters.dynamic.comment;
|
||||
const channelUrl =
|
||||
(notification_rule === RULE.NEW_CONTENT && notification.notification_parameters.dynamic.channel_url) || '';
|
||||
|
||||
let notificationTarget;
|
||||
switch (notification_rule) {
|
||||
@@ -51,21 +70,20 @@ export default function Notification(props: Props) {
|
||||
notificationTarget = notification_parameters.device.target;
|
||||
}
|
||||
|
||||
let notificationLink = formatLbryUrlForWeb(notificationTarget);
|
||||
let urlParams = new URLSearchParams();
|
||||
if (isCommentNotification && notification_parameters.dynamic.hash) {
|
||||
urlParams.append('lc', notification_parameters.dynamic.hash);
|
||||
}
|
||||
|
||||
try {
|
||||
const { isChannel } = parseURI(notificationTarget);
|
||||
if (isChannel) {
|
||||
urlParams.append(PAGE_VIEW_QUERY, DISCUSSION_PAGE);
|
||||
React.useEffect(() => {
|
||||
if (isReplying && notificationTarget) {
|
||||
doResolveUri(notificationTarget);
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
notificationLink += `?${urlParams.toString()}`;
|
||||
}, [doResolveUri, isReplying, notificationTarget]);
|
||||
|
||||
const creatorIcon = (channelUrl) => {
|
||||
return (
|
||||
<UriIndicator uri={channelUrl} link>
|
||||
<ChannelThumbnail small uri={channelUrl} />
|
||||
</UriIndicator>
|
||||
);
|
||||
};
|
||||
let channelUrl;
|
||||
let icon;
|
||||
switch (notification_rule) {
|
||||
case RULE.CREATOR_SUBSCRIBER:
|
||||
@@ -73,16 +91,20 @@ export default function Notification(props: Props) {
|
||||
break;
|
||||
case RULE.COMMENT:
|
||||
case RULE.CREATOR_COMMENT:
|
||||
icon = <ChannelThumbnail small uri={notification_parameters.dynamic.comment_author} />;
|
||||
channelUrl = notification_parameters.dynamic.comment_author;
|
||||
icon = creatorIcon(channelUrl);
|
||||
break;
|
||||
case RULE.COMMENT_REPLY:
|
||||
icon = <ChannelThumbnail small uri={notification_parameters.dynamic.reply_author} />;
|
||||
channelUrl = notification_parameters.dynamic.reply_author;
|
||||
icon = creatorIcon(channelUrl);
|
||||
break;
|
||||
case RULE.NEW_CONTENT:
|
||||
icon = <ChannelThumbnail small uri={notification_parameters.dynamic.channel_url} />;
|
||||
channelUrl = notification_parameters.dynamic.channel_url;
|
||||
icon = creatorIcon(channelUrl);
|
||||
break;
|
||||
case RULE.NEW_LIVESTREAM:
|
||||
icon = <ChannelThumbnail small uri={notification_parameters.dynamic.channel_url} />;
|
||||
channelUrl = notification_parameters.dynamic.channel_url;
|
||||
icon = creatorIcon(channelUrl);
|
||||
break;
|
||||
case RULE.DAILY_WATCH_AVAILABLE:
|
||||
case RULE.DAILY_WATCH_REMIND:
|
||||
@@ -97,6 +119,51 @@ export default function Notification(props: Props) {
|
||||
icon = <Icon icon={ICONS.NOTIFICATION} sectionIcon />;
|
||||
}
|
||||
|
||||
let notificationLink = formatLbryUrlForWeb(notificationTarget);
|
||||
let urlParams = new URLSearchParams();
|
||||
if (isCommentNotification && notification_parameters.dynamic.hash) {
|
||||
urlParams.append('lc', notification_parameters.dynamic.hash);
|
||||
}
|
||||
|
||||
let channelName = channelUrl && ('@' + channelUrl.split('@')[1].split('#')[0]);
|
||||
|
||||
const notificationTitle = notification_parameters.device.title;
|
||||
const titleSplit = notificationTitle.split(' ');
|
||||
let fullTitle = [' '];
|
||||
let uriIndicator;
|
||||
const title = titleSplit.map((message, index) => {
|
||||
if (channelName === message) {
|
||||
uriIndicator = (
|
||||
<UriIndicator uri={channelUrl} link />
|
||||
);
|
||||
fullTitle.push(' ');
|
||||
const resultTitle = fullTitle;
|
||||
fullTitle = [' '];
|
||||
|
||||
return [resultTitle.join(' '), uriIndicator];
|
||||
} else {
|
||||
fullTitle.push(message);
|
||||
|
||||
if (index === (titleSplit.length - 1)) {
|
||||
return (
|
||||
<LbcMessage>{fullTitle.join(' ')}</LbcMessage>
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
const { isChannel } = parseURI(notificationTarget);
|
||||
if (isChannel) {
|
||||
urlParams.append(PAGE_VIEW_QUERY, DISCUSSION_PAGE);
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
notificationLink += `?${urlParams.toString()}`;
|
||||
const navLinkProps = {
|
||||
to: notificationLink,
|
||||
};
|
||||
|
||||
function handleNotificationClick() {
|
||||
if (!is_read) {
|
||||
doReadNotifications([id]);
|
||||
@@ -112,6 +179,10 @@ export default function Notification(props: Props) {
|
||||
doReadNotifications([id]);
|
||||
}
|
||||
|
||||
function handleCommentReply() {
|
||||
setReplying(!isReplying);
|
||||
}
|
||||
|
||||
const Wrapper = menuButton
|
||||
? (props: { children: any }) => (
|
||||
<MenuItem className="menu__link--notification" onSelect={handleNotificationClick}>
|
||||
@@ -120,9 +191,11 @@ export default function Notification(props: Props) {
|
||||
)
|
||||
: notificationLink
|
||||
? (props: { children: any }) => (
|
||||
<NavLink {...navLinkProps}>
|
||||
<a className="menu__link--notification" onClick={handleNotificationClick}>
|
||||
{props.children}
|
||||
</a>
|
||||
</NavLink>
|
||||
)
|
||||
: (props: { children: any }) => (
|
||||
<span
|
||||
@@ -146,16 +219,12 @@ export default function Notification(props: Props) {
|
||||
<div className="notification__content">
|
||||
<div className="notification__text-wrapper">
|
||||
{!isCommentNotification && (
|
||||
<div className="notification__title">
|
||||
<LbcMessage>{notification_parameters.device.title}</LbcMessage>
|
||||
</div>
|
||||
<div className="notification__title">{title}</div>
|
||||
)}
|
||||
|
||||
{isCommentNotification && commentText ? (
|
||||
<>
|
||||
<div className="notification__title">
|
||||
<LbcMessage>{notification_parameters.device.title}</LbcMessage>
|
||||
</div>
|
||||
<div className="notification__title">{title}</div>
|
||||
<div title={commentText} className="notification__text mobile-hidden">
|
||||
{commentText}
|
||||
</div>
|
||||
@@ -170,6 +239,55 @@ export default function Notification(props: Props) {
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
{isCommentNotification && (
|
||||
<>
|
||||
<div className="notification__reactions">
|
||||
<Button
|
||||
label={__('Reply')}
|
||||
className="comment__action"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
handleCommentReply();
|
||||
}}
|
||||
icon={ICONS.REPLY}
|
||||
/>
|
||||
<CommentReactions uri={notificationTarget} commentId={notification_parameters.dynamic.hash} />
|
||||
</div>
|
||||
|
||||
{isReplying && (
|
||||
<CommentCreate
|
||||
isReply
|
||||
uri={notificationTarget}
|
||||
parentId={notification_parameters.dynamic.hash}
|
||||
onDoneReplying={() => setReplying(false)}
|
||||
onCancelReplying={() => setReplying(false)}
|
||||
setCommentReply={setCommentReply}
|
||||
/>
|
||||
)}
|
||||
|
||||
{commentReply && (
|
||||
<CommentView
|
||||
key={commentReply.comment_id}
|
||||
uri={notificationTarget}
|
||||
authorUri={commentReply.channel_url}
|
||||
author={commentReply.channel_name}
|
||||
claimId={commentReply.claim_id}
|
||||
commentId={commentReply.comment_id}
|
||||
message={commentReply.comment}
|
||||
timePosted={commentReply.timestamp * 1000}
|
||||
commentIsMine={commentReply.channel_id && isMyComment(commentReply.channel_id)}
|
||||
isPinned={commentReply.is_pinned}
|
||||
supportAmount={commentReply.support_amount}
|
||||
numDirectReplies={commentReply.replies}
|
||||
isFiat={commentReply.is_fiat}
|
||||
setCommentReply={setCommentReply}
|
||||
commentReply={commentReply}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{notification_rule === RULE.NEW_CONTENT && (
|
||||
@@ -193,7 +311,10 @@ export default function Notification(props: Props) {
|
||||
|
||||
<div className="notification__menu">
|
||||
<Menu>
|
||||
<MenuButton className={'menu__button notification__menu-button'} onClick={(e) => e.stopPropagation()}>
|
||||
<MenuButton onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}}>
|
||||
<Icon size={18} icon={ICONS.MORE_VERTICAL} />
|
||||
</MenuButton>
|
||||
<MenuList className="menu__list">
|
||||
|
||||
@@ -38,6 +38,10 @@ function SelectChannel(props: Props) {
|
||||
onChange={handleChannelChange}
|
||||
value={activeChannelClaim && activeChannelClaim.claim_id}
|
||||
disabled={fetchingChannels}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}}
|
||||
>
|
||||
{fetchingChannels ? (
|
||||
<option>{__('Loading your channels...')}</option>
|
||||
|
||||
@@ -165,4 +165,3 @@ export const GLOBE = 'globe';
|
||||
export const RSS = 'rss';
|
||||
export const STAR = 'star';
|
||||
export const MUSIC = 'MusicCategory';
|
||||
export const DESKTOP = 'desktop';
|
||||
|
||||
@@ -11,10 +11,11 @@ type Props = {
|
||||
closeModal: () => void,
|
||||
deleteComment: (string, ?string) => void,
|
||||
supportAmount?: any,
|
||||
setCommentReply: (any) => void,
|
||||
};
|
||||
|
||||
function ModalRemoveComment(props: Props) {
|
||||
const { commentId, commentIsMine, contentChannelPermanentUrl, closeModal, deleteComment, supportAmount } = props;
|
||||
const { commentId, commentIsMine, contentChannelPermanentUrl, closeModal, deleteComment, supportAmount, setCommentReply } = props;
|
||||
|
||||
return (
|
||||
<Modal isOpen contentLabel={__('Confirm Comment Deletion')} type="card" onAborted={closeModal}>
|
||||
@@ -36,6 +37,7 @@ function ModalRemoveComment(props: Props) {
|
||||
label={__('Remove')}
|
||||
onClick={() => {
|
||||
deleteComment(commentId, commentIsMine ? undefined : contentChannelPermanentUrl);
|
||||
setCommentReply(undefined);
|
||||
closeModal();
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -7,6 +7,8 @@ import {
|
||||
selectUnseenNotificationCount,
|
||||
selectNotificationCategories,
|
||||
} from 'redux/selectors/notifications';
|
||||
import { selectIsFetchingReacts } from 'redux/selectors/comments';
|
||||
import { doCommentReactList } from 'redux/actions/comments';
|
||||
import { doReadNotifications, doNotificationList, doSeeAllNotifications } from 'redux/actions/notifications';
|
||||
import NotificationsPage from './view';
|
||||
|
||||
@@ -17,10 +19,12 @@ const select = (state) => ({
|
||||
fetching: selectIsFetchingNotifications(state),
|
||||
unreadCount: selectUnreadNotificationCount(state),
|
||||
unseenCount: selectUnseenNotificationCount(state),
|
||||
isFetchingReacts: selectIsFetchingReacts(state),
|
||||
});
|
||||
|
||||
export default connect(select, {
|
||||
doReadNotifications,
|
||||
doNotificationList,
|
||||
doSeeAllNotifications,
|
||||
doCommentReactList,
|
||||
})(NotificationsPage);
|
||||
|
||||
@@ -10,6 +10,7 @@ import usePersistedState from 'effects/use-persisted-state';
|
||||
import Yrbl from 'component/yrbl';
|
||||
import * as NOTIFICATIONS from 'constants/notifications';
|
||||
import useFetched from 'effects/use-fetched';
|
||||
import { RULE } from 'constants/notifications';
|
||||
|
||||
type Props = {
|
||||
notifications: Array<Notification>,
|
||||
@@ -21,6 +22,8 @@ type Props = {
|
||||
doSeeAllNotifications: () => void,
|
||||
doReadNotifications: () => void,
|
||||
doNotificationList: (?Array<string>) => void,
|
||||
isFetchingReacts: boolean,
|
||||
doCommentReactList: (Array<string>) => Promise<any>,
|
||||
};
|
||||
|
||||
export default function NotificationsPage(props: Props) {
|
||||
@@ -34,11 +37,41 @@ export default function NotificationsPage(props: Props) {
|
||||
doReadNotifications,
|
||||
doNotificationList,
|
||||
notificationCategories,
|
||||
isFetchingReacts,
|
||||
doCommentReactList,
|
||||
} = props;
|
||||
const initialFetchDone = useFetched(fetching);
|
||||
const [name, setName] = usePersistedState('notifications--rule', NOTIFICATIONS.NOTIFICATION_NAME_ALL);
|
||||
const isFiltered = name !== NOTIFICATIONS.NOTIFICATION_NAME_ALL;
|
||||
const list = isFiltered ? notificationsFiltered : notifications;
|
||||
const [reactsFetched, setReactsFetched] = React.useState(false);
|
||||
|
||||
// Fetch reacts
|
||||
React.useEffect(() => {
|
||||
if (!fetching && !isFetchingReacts && !reactsFetched) {
|
||||
let idsForReactionFetch = [];
|
||||
list.map((notification) => {
|
||||
const { notification_rule, notification_parameters } = notification;
|
||||
const isComment =
|
||||
notification_rule === RULE.COMMENT ||
|
||||
notification_rule === RULE.COMMENT_REPLY ||
|
||||
notification_rule === RULE.CREATOR_COMMENT;
|
||||
const commentId = isComment && notification_parameters && notification_parameters.dynamic && notification_parameters.dynamic.hash;
|
||||
|
||||
if (commentId) {
|
||||
idsForReactionFetch.push(commentId);
|
||||
}
|
||||
});
|
||||
|
||||
if (idsForReactionFetch.length !== 0) {
|
||||
doCommentReactList(idsForReactionFetch)
|
||||
.then(() => {
|
||||
setReactsFetched(true);
|
||||
})
|
||||
.catch(() => setReactsFetched(true));
|
||||
}
|
||||
}
|
||||
}, [isFetchingReacts, fetching, doCommentReactList, list, reactsFetched]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (unseenCount > 0 || unreadCount > 0) {
|
||||
@@ -106,7 +139,7 @@ export default function NotificationsPage(props: Props) {
|
||||
{list && list.length > 0 && !(isFiltered && fetching) ? (
|
||||
<div className="card">
|
||||
<div className="notification_list">
|
||||
{list.map((notification, index) => {
|
||||
{list.map((notification) => {
|
||||
return <Notification key={notification.id} notification={notification} />;
|
||||
})}
|
||||
</div>
|
||||
|
||||
@@ -391,11 +391,6 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card__bottom-actions--comments {
|
||||
@extend .card__bottom-actions;
|
||||
margin-top: var(--spacing-s);
|
||||
}
|
||||
|
||||
.card__multi-pane {
|
||||
display: flex;
|
||||
|
||||
|
||||
@@ -7,14 +7,6 @@ $thumbnailWidthSmall: 1rem;
|
||||
margin-top: var(--spacing-l);
|
||||
}
|
||||
|
||||
.comments--contracted {
|
||||
@extend .comments;
|
||||
max-height: 5rem;
|
||||
overflow: hidden;
|
||||
-webkit-mask-image: -webkit-gradient(linear, left 30%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.comments--replies {
|
||||
list-style-type: none;
|
||||
margin-left: var(--spacing-s);
|
||||
@@ -226,6 +218,7 @@ $thumbnailWidthSmall: 1rem;
|
||||
.comment__message {
|
||||
word-break: break-word;
|
||||
max-width: 35rem;
|
||||
color: var(--color-text);
|
||||
|
||||
ul li,
|
||||
ol li {
|
||||
@@ -275,6 +268,7 @@ $thumbnailWidthSmall: 1rem;
|
||||
|
||||
.comment__char-count {
|
||||
font-size: var(--font-xsmall);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.comment__char-count-mde {
|
||||
|
||||
@@ -60,8 +60,3 @@
|
||||
font-size: var(--font-large);
|
||||
}
|
||||
}
|
||||
|
||||
.embed__overlay-logo {
|
||||
max-height: 3.5rem;
|
||||
max-width: 12rem;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ $contentMaxWidth: 60rem;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding: var(--spacing-m) 0;
|
||||
justify-content: space-between;
|
||||
|
||||
.channel-thumbnail {
|
||||
@include handleChannelGif(3rem);
|
||||
@@ -60,6 +61,7 @@ $contentMaxWidth: 60rem;
|
||||
|
||||
.notification__wrapper--unread {
|
||||
background-color: var(--color-card-background-highlighted);
|
||||
justify-content: space-between;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-button-secondary-bg);
|
||||
@@ -120,6 +122,7 @@ $contentMaxWidth: 60rem;
|
||||
}
|
||||
|
||||
.notification__title {
|
||||
position: relative;
|
||||
font-size: var(--font-small);
|
||||
color: var(--color-text);
|
||||
margin-bottom: var(--spacing-s);
|
||||
@@ -135,6 +138,7 @@ $contentMaxWidth: 60rem;
|
||||
|
||||
.notification__text {
|
||||
font-size: var(--font-body);
|
||||
color: var(--color-text);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
@@ -158,6 +162,19 @@ $contentMaxWidth: 60rem;
|
||||
}
|
||||
}
|
||||
|
||||
.notification__reactions {
|
||||
display: flex;
|
||||
margin-top: var(--spacing-s);
|
||||
|
||||
> *:not(:last-of-type) {
|
||||
margin-right: var(--spacing-m);
|
||||
}
|
||||
|
||||
.button__label {
|
||||
margin-left: var(--spacing-xs);
|
||||
}
|
||||
}
|
||||
|
||||
.notification__bubble {
|
||||
height: 1.5rem;
|
||||
width: 1.5rem;
|
||||
|
||||
@@ -178,7 +178,6 @@ const sharedStateFilters = {
|
||||
app_welcome_version: { source: 'app', property: 'welcomeVersion' },
|
||||
sharing_3P: { source: 'app', property: 'allowAnalytics' },
|
||||
builtinCollections: { source: 'collections', property: 'builtin' },
|
||||
editedCollections: { source: 'collections', property: 'edited' },
|
||||
// savedCollections: { source: 'collections', property: 'saved' },
|
||||
unpublishedCollections: { source: 'collections', property: 'unpublished' },
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ function FileViewerEmbeddedEnded(props: Props) {
|
||||
<div className="file-viewer__overlay">
|
||||
<div className="file-viewer__overlay-secondary">
|
||||
<Button className="file-viewer__overlay-logo" href={URL}>
|
||||
<Logo type={'embed-ended'} />
|
||||
<Logo type={'embed'} />
|
||||
</Button>
|
||||
</div>
|
||||
<div className="file-viewer__overlay-title">{prompt}</div>
|
||||
|
||||
@@ -23,17 +23,13 @@ const { getJsBundleId } = require('../bundle-id.js');
|
||||
const jsBundleId = getJsBundleId();
|
||||
|
||||
function insertToHead(fullHtml, htmlToInsert) {
|
||||
const beginStr = '<!-- VARIABLE_HEAD_BEGIN -->';
|
||||
const finalStr = '<!-- VARIABLE_HEAD_END -->';
|
||||
|
||||
const beginIndex = fullHtml.indexOf(beginStr);
|
||||
const finalIndex = fullHtml.indexOf(finalStr);
|
||||
|
||||
if (beginIndex > -1 && finalIndex > -1 && finalIndex > beginIndex) {
|
||||
return `${fullHtml.slice(0, beginIndex)}${
|
||||
htmlToInsert || buildOgMetadata()
|
||||
}<script src="/public/ui-${jsBundleId}.js" async></script>${fullHtml.slice(finalIndex + finalStr.length)}`;
|
||||
}
|
||||
return fullHtml.replace(
|
||||
/<!-- VARIABLE_HEAD_BEGIN -->.*<!-- VARIABLE_HEAD_END -->/s,
|
||||
`
|
||||
${htmlToInsert || buildOgMetadata()}
|
||||
<script src="/public/ui-${jsBundleId}.js" async></script>
|
||||
`
|
||||
);
|
||||
}
|
||||
|
||||
function truncateDescription(description) {
|
||||
|
||||
@@ -10136,9 +10136,9 @@ lazy-val@^1.0.4:
|
||||
yargs "^13.2.2"
|
||||
zstd-codec "^0.1.1"
|
||||
|
||||
lbry-redux@lbryio/lbry-redux#7cc9923ed9ff1940b508842af6be44c8da906a60:
|
||||
lbry-redux@lbryio/lbry-redux#a327385cdf71568dbd15a17f3dcf5f4b83e0966d:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/7cc9923ed9ff1940b508842af6be44c8da906a60"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/a327385cdf71568dbd15a17f3dcf5f4b83e0966d"
|
||||
dependencies:
|
||||
proxy-polyfill "0.1.6"
|
||||
reselect "^3.0.0"
|
||||
|
||||
Reference in New Issue
Block a user