mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-28 16:01:26 +00:00
Merge branch 'master' into feat-expandingCards
This commit is contained in:
commit
ea66c116ca
12 changed files with 42 additions and 61 deletions
|
@ -1,4 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
import * as PAGES from 'constants/pages';
|
||||||
|
import * as CS from 'constants/claim_search';
|
||||||
import React, { Fragment, PureComponent } from 'react';
|
import React, { Fragment, PureComponent } from 'react';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { makeSelectClaimForUri } from 'lbry-redux';
|
|
||||||
import ClaimUri from './view';
|
|
||||||
|
|
||||||
const select = (state, props) => ({
|
|
||||||
claim: makeSelectClaimForUri(props.uri)(state),
|
|
||||||
});
|
|
||||||
|
|
||||||
export default connect(select)(ClaimUri);
|
|
|
@ -1,32 +0,0 @@
|
||||||
// @flow
|
|
||||||
import * as PAGES from 'constants/pages';
|
|
||||||
import * as CS from 'constants/claim_search';
|
|
||||||
import React from 'react';
|
|
||||||
import ClaimUri from 'component/claimUri';
|
|
||||||
import Button from 'component/button';
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
uri: string,
|
|
||||||
claim: ?Claim,
|
|
||||||
};
|
|
||||||
|
|
||||||
function FileRenderHeader(props: Props) {
|
|
||||||
const { uri, claim } = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<ClaimUri uri={uri} />
|
|
||||||
|
|
||||||
{claim.meta.reposted > 0 && (
|
|
||||||
<Button
|
|
||||||
button="link"
|
|
||||||
className="media__uri--right"
|
|
||||||
label={__('View %count% reposts', { count: claim.meta.reposted })}
|
|
||||||
navigate={`/$/${PAGES.DISCOVER}?${CS.REPOSTED_URI_KEY}=${encodeURIComponent(uri)}`}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default FileRenderHeader;
|
|
|
@ -3,7 +3,7 @@ import * as React from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import Page from 'component/page';
|
import Page from 'component/page';
|
||||||
import * as RENDER_MODES from 'constants/file_render_modes';
|
import * as RENDER_MODES from 'constants/file_render_modes';
|
||||||
import FileRenderHeader from 'component/fileRenderHeader';
|
import ClaimUri from 'component/claimUri';
|
||||||
import FileTitle from 'component/fileTitle';
|
import FileTitle from 'component/fileTitle';
|
||||||
import FileRenderInitiator from 'component/fileRenderInitiator';
|
import FileRenderInitiator from 'component/fileRenderInitiator';
|
||||||
import FileRenderInline from 'component/fileRenderInline';
|
import FileRenderInline from 'component/fileRenderInline';
|
||||||
|
@ -81,7 +81,7 @@ class FilePage extends React.Component<Props> {
|
||||||
if (RENDER_MODES.FLOATING_MODES.includes(mode)) {
|
if (RENDER_MODES.FLOATING_MODES.includes(mode)) {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<FileRenderHeader uri={uri} />
|
<ClaimUri uri={uri} />
|
||||||
<div className={FILE_WRAPPER_CLASS}>
|
<div className={FILE_WRAPPER_CLASS}>
|
||||||
<FileRenderInitiator uri={uri} />
|
<FileRenderInitiator uri={uri} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -94,7 +94,7 @@ class FilePage extends React.Component<Props> {
|
||||||
if (RENDER_MODES.UNRENDERABLE_MODES.includes(mode)) {
|
if (RENDER_MODES.UNRENDERABLE_MODES.includes(mode)) {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<FileRenderHeader uri={uri} />
|
<ClaimUri uri={uri} />
|
||||||
<FileTitle uri={uri} />
|
<FileTitle uri={uri} />
|
||||||
<FileRenderDownload uri={uri} isFree={cost === 0} />
|
<FileRenderDownload uri={uri} isFree={cost === 0} />
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
@ -104,7 +104,7 @@ class FilePage extends React.Component<Props> {
|
||||||
if (RENDER_MODES.TEXT_MODES.includes(mode)) {
|
if (RENDER_MODES.TEXT_MODES.includes(mode)) {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<FileRenderHeader uri={uri} />
|
<ClaimUri uri={uri} />
|
||||||
<FileTitle uri={uri} />
|
<FileTitle uri={uri} />
|
||||||
<FileRenderInitiator uri={uri} />
|
<FileRenderInitiator uri={uri} />
|
||||||
<FileRenderInline uri={uri} />
|
<FileRenderInline uri={uri} />
|
||||||
|
@ -114,7 +114,7 @@ class FilePage extends React.Component<Props> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<FileRenderHeader uri={uri} />
|
<ClaimUri uri={uri} />
|
||||||
<FileRenderInitiator uri={uri} />
|
<FileRenderInitiator uri={uri} />
|
||||||
<FileRenderInline uri={uri} />
|
<FileRenderInline uri={uri} />
|
||||||
<FileTitle uri={uri} />
|
<FileTitle uri={uri} />
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
.button--primary,
|
||||||
|
.button--secondary,
|
||||||
|
.button--alt {
|
||||||
|
@media (max-width: $breakpoint-small) {
|
||||||
|
font-size: var(--font-small);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.button--uri-indicator {
|
.button--uri-indicator {
|
||||||
@extend .button--link;
|
@extend .button--link;
|
||||||
color: var(--color-text-subtitle);
|
color: var(--color-text-subtitle);
|
||||||
|
|
|
@ -8,10 +8,6 @@ $metadata-z-index: 1;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
.button--alt {
|
|
||||||
padding: 0 var(--spacing-small);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.channel-cover__custom {
|
.channel-cover__custom {
|
||||||
|
@ -144,7 +140,7 @@ $metadata-z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.channel__quick-actions {
|
.channel__quick-actions {
|
||||||
@extend .card__actions;
|
@extend .section__actions;
|
||||||
margin-left: var(--spacing-medium);
|
margin-left: var(--spacing-medium);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -152,6 +148,17 @@ $metadata-z-index: 1;
|
||||||
margin-top: var(--spacing-medium);
|
margin-top: var(--spacing-medium);
|
||||||
z-index: $metadata-z-index;
|
z-index: $metadata-z-index;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
font-size: var(--font-base);
|
||||||
|
|
||||||
|
> * {
|
||||||
|
padding: 0 var(--spacing-xsmall);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: $breakpoint-small) {
|
||||||
|
> * {
|
||||||
|
margin-bottom: var(--spacing-xsmall);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.channel-name--inline {
|
.channel-name--inline {
|
||||||
|
|
|
@ -125,6 +125,10 @@
|
||||||
|
|
||||||
.media__thumb {
|
.media__thumb {
|
||||||
width: 14rem;
|
width: 14rem;
|
||||||
|
|
||||||
|
@media (max-width: $breakpoint-small) {
|
||||||
|
width: 5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.channel-thumbnail {
|
.channel-thumbnail {
|
||||||
|
|
|
@ -70,6 +70,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.file-render__header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
.file-render__viewer {
|
.file-render__viewer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: $breakpoint-small) {
|
||||||
|
font-size: var(--font-base);
|
||||||
|
}
|
||||||
|
|
||||||
// Headers
|
// Headers
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
@media (max-width: $breakpoint-small) {
|
@media (max-width: $breakpoint-small) {
|
||||||
position: static;
|
position: static;
|
||||||
transform: none;
|
transform: none;
|
||||||
|
margin-bottom: var(--spacing-xsmall);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is terrible and should not be removed
|
// This is terrible and should not be removed
|
||||||
|
|
|
@ -31,12 +31,6 @@
|
||||||
width: 40%;
|
width: 40%;
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: $breakpoint-small) {
|
|
||||||
&.media__thumb {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.placeholder--text-document {
|
.placeholder--text-document {
|
||||||
|
|
|
@ -23,10 +23,6 @@ html {
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
|
|
||||||
@media (max-width: $breakpoint-small) {
|
|
||||||
font-size: 1.3em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
|
|
Loading…
Add table
Reference in a new issue