Merge branch 'patch_edit'
This commit is contained in:
commit
342162cfcc
4 changed files with 14 additions and 41 deletions
|
@ -12,13 +12,13 @@ Web UI version numbers should always match the corresponding version of LBRY App
|
|||
*
|
||||
|
||||
### Changed
|
||||
*
|
||||
*
|
||||
* Changed the File page to make it clearer how to to open the folder for a file
|
||||
|
||||
### Fixed
|
||||
* Improve layout (and implementation) of the icon panel in file tiles and cards
|
||||
* The folder icon representing a local download now shows up properly on Channel pages (#587)
|
||||
*
|
||||
* While editing a publish, the URL will no longer change if you select a new file. (#601)
|
||||
* Fixed issues with opening the folder for a file (#606)
|
||||
|
||||
### Deprecated
|
||||
*
|
||||
|
|
|
@ -29,8 +29,9 @@ class FileDetails extends React.PureComponent {
|
|||
const { description, language, license } = metadata;
|
||||
const { height } = claim;
|
||||
const mediaType = lbry.getMediaType(contentType);
|
||||
const directory = fileInfo && fileInfo.download_path
|
||||
? path.dirname(fileInfo.download_path)
|
||||
|
||||
const downloadPath = fileInfo
|
||||
? path.normalize(fileInfo.download_path)
|
||||
: null;
|
||||
|
||||
return (
|
||||
|
@ -59,12 +60,12 @@ class FileDetails extends React.PureComponent {
|
|||
<tr>
|
||||
<td>{__("License")}</td><td>{license}</td>
|
||||
</tr>
|
||||
{directory &&
|
||||
{downloadPath &&
|
||||
<tr>
|
||||
<td>{__("Downloaded to")}</td>
|
||||
<td>
|
||||
<Link onClick={() => openFolder(directory)}>
|
||||
{directory}
|
||||
<Link onClick={() => openFolder(downloadPath)}>
|
||||
{downloadPath}
|
||||
</Link>
|
||||
</td>
|
||||
</tr>}
|
||||
|
|
|
@ -20,6 +20,7 @@ class PublishForm extends React.PureComponent {
|
|||
|
||||
this.state = {
|
||||
id: null,
|
||||
uri: null,
|
||||
rawName: "",
|
||||
name: "",
|
||||
bid: 10,
|
||||
|
@ -166,7 +167,6 @@ class PublishForm extends React.PureComponent {
|
|||
claim() {
|
||||
const { claimsByUri } = this.props;
|
||||
const { uri } = this.state;
|
||||
|
||||
return claimsByUri[uri];
|
||||
}
|
||||
|
||||
|
@ -437,9 +437,10 @@ class PublishForm extends React.PureComponent {
|
|||
}
|
||||
|
||||
onFileChange() {
|
||||
const { mode } = this.state;
|
||||
if (this.refs.file.getValue()) {
|
||||
this.setState({ hasFile: true });
|
||||
if (!this.state.customUrl) {
|
||||
if (!this.state.customUrl && mode !== "edit") {
|
||||
let fileName = this._getFileName(this.refs.file.getValue());
|
||||
this.nameChanged(fileName);
|
||||
}
|
||||
|
|
|
@ -11,36 +11,6 @@ import WalletSendTip from "component/walletSendTip";
|
|||
import DateTime from "component/dateTime";
|
||||
import * as icons from "constants/icons";
|
||||
|
||||
const FormatItem = props => {
|
||||
const {
|
||||
publishedDate,
|
||||
contentType,
|
||||
claim: { height },
|
||||
metadata: { language, license },
|
||||
} = props;
|
||||
|
||||
const mediaType = lbry.getMediaType(contentType);
|
||||
|
||||
return (
|
||||
<table className="table-standard">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{__("Published on")}</td><td><DateTime block={height} /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{__("Content-Type")}</td><td>{mediaType}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{__("Language")}</td><td>{language}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{__("License")}</td><td>{license}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
);
|
||||
};
|
||||
|
||||
class FilePage extends React.PureComponent {
|
||||
componentDidMount() {
|
||||
this.fetchFileInfo(this.props);
|
||||
|
@ -109,7 +79,8 @@ class FilePage extends React.PureComponent {
|
|||
{!fileInfo || fileInfo.written_bytes <= 0
|
||||
? <span style={{ float: "right" }}>
|
||||
<FilePrice uri={lbryuri.normalize(uri)} />
|
||||
{isRewardContent && <span>{" "}<Icon icon={icons.FEATURED} /></span>}
|
||||
{isRewardContent &&
|
||||
<span>{" "}<Icon icon={icons.FEATURED} /></span>}
|
||||
</span>
|
||||
: null}
|
||||
<h1>{title}</h1>
|
||||
|
|
Loading…
Add table
Reference in a new issue