Hide 'download' for livestreams

6517
This commit is contained in:
infinite-persistence 2021-07-18 23:10:34 +08:00
parent 5120db3f53
commit 1fa7533ee3
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -162,38 +162,42 @@ function FileActions(props: Props) {
onClick={() => openModal(MODALS.CONFIRM_FILE_REMOVE, { uri })} onClick={() => openModal(MODALS.CONFIRM_FILE_REMOVE, { uri })}
/> />
)} )}
<Menu> {(!isLivestreamClaim || !claimIsMine) && (
<MenuButton <Menu>
className="button--file-action" <MenuButton
onClick={(e) => { className="button--file-action"
e.stopPropagation(); onClick={(e) => {
e.preventDefault(); e.stopPropagation();
}} e.preventDefault();
> }}
<Icon size={20} icon={ICONS.MORE} /> >
</MenuButton> <Icon size={20} icon={ICONS.MORE} />
<MenuList className="menu__list"> </MenuButton>
{/* @if TARGET='web' */} <MenuList className="menu__list">
<MenuItem className="comment__menu-option" onSelect={handleWebDownload}> {/* @if TARGET='web' */}
<div className="menu__link"> {!isLivestreamClaim && (
<Icon aria-hidden icon={ICONS.DOWNLOAD} /> <MenuItem className="comment__menu-option" onSelect={handleWebDownload}>
{__('Download')} <div className="menu__link">
</div> <Icon aria-hidden icon={ICONS.DOWNLOAD} />
</MenuItem> {__('Download')}
{/* @endif */} </div>
{!claimIsMine && ( </MenuItem>
<MenuItem )}
className="comment__menu-option" {/* @endif */}
onSelect={() => push(`/$/${PAGES.REPORT_CONTENT}?claimId=${claimId}`)} {!claimIsMine && (
> <MenuItem
<div className="menu__link"> className="comment__menu-option"
<Icon aria-hidden icon={ICONS.REPORT} /> onSelect={() => push(`/$/${PAGES.REPORT_CONTENT}?claimId=${claimId}`)}
{__('Report content')} >
</div> <div className="menu__link">
</MenuItem> <Icon aria-hidden icon={ICONS.REPORT} />
)} {__('Report content')}
</MenuList> </div>
</Menu> </MenuItem>
)}
</MenuList>
</Menu>
)}
</> </>
); );