mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-28 16:01:26 +00:00
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
|
||||||
*
|
* Changed the File page to make it clearer how to to open the folder for a file
|
||||||
*
|
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* Improve layout (and implementation) of the icon panel in file tiles and cards
|
* 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)
|
* 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
|
### Deprecated
|
||||||
*
|
*
|
||||||
|
|
|
@ -29,8 +29,9 @@ class FileDetails extends React.PureComponent {
|
||||||
const { description, language, license } = metadata;
|
const { description, language, license } = metadata;
|
||||||
const { height } = claim;
|
const { height } = claim;
|
||||||
const mediaType = lbry.getMediaType(contentType);
|
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;
|
: null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -59,12 +60,12 @@ class FileDetails extends React.PureComponent {
|
||||||
<tr>
|
<tr>
|
||||||
<td>{__("License")}</td><td>{license}</td>
|
<td>{__("License")}</td><td>{license}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{directory &&
|
{downloadPath &&
|
||||||
<tr>
|
<tr>
|
||||||
<td>{__("Downloaded to")}</td>
|
<td>{__("Downloaded to")}</td>
|
||||||
<td>
|
<td>
|
||||||
<Link onClick={() => openFolder(directory)}>
|
<Link onClick={() => openFolder(downloadPath)}>
|
||||||
{directory}
|
{downloadPath}
|
||||||
</Link>
|
</Link>
|
||||||
</td>
|
</td>
|
||||||
</tr>}
|
</tr>}
|
||||||
|
|
|
@ -20,6 +20,7 @@ class PublishForm extends React.PureComponent {
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
id: null,
|
id: null,
|
||||||
|
uri: null,
|
||||||
rawName: "",
|
rawName: "",
|
||||||
name: "",
|
name: "",
|
||||||
bid: 10,
|
bid: 10,
|
||||||
|
@ -166,7 +167,6 @@ class PublishForm extends React.PureComponent {
|
||||||
claim() {
|
claim() {
|
||||||
const { claimsByUri } = this.props;
|
const { claimsByUri } = this.props;
|
||||||
const { uri } = this.state;
|
const { uri } = this.state;
|
||||||
|
|
||||||
return claimsByUri[uri];
|
return claimsByUri[uri];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -437,9 +437,10 @@ class PublishForm extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
onFileChange() {
|
onFileChange() {
|
||||||
|
const { mode } = this.state;
|
||||||
if (this.refs.file.getValue()) {
|
if (this.refs.file.getValue()) {
|
||||||
this.setState({ hasFile: true });
|
this.setState({ hasFile: true });
|
||||||
if (!this.state.customUrl) {
|
if (!this.state.customUrl && mode !== "edit") {
|
||||||
let fileName = this._getFileName(this.refs.file.getValue());
|
let fileName = this._getFileName(this.refs.file.getValue());
|
||||||
this.nameChanged(fileName);
|
this.nameChanged(fileName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,36 +11,6 @@ import WalletSendTip from "component/walletSendTip";
|
||||||
import DateTime from "component/dateTime";
|
import DateTime from "component/dateTime";
|
||||||
import * as icons from "constants/icons";
|
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 {
|
class FilePage extends React.PureComponent {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.fetchFileInfo(this.props);
|
this.fetchFileInfo(this.props);
|
||||||
|
@ -109,7 +79,8 @@ class FilePage extends React.PureComponent {
|
||||||
{!fileInfo || fileInfo.written_bytes <= 0
|
{!fileInfo || fileInfo.written_bytes <= 0
|
||||||
? <span style={{ float: "right" }}>
|
? <span style={{ float: "right" }}>
|
||||||
<FilePrice uri={lbryuri.normalize(uri)} />
|
<FilePrice uri={lbryuri.normalize(uri)} />
|
||||||
{isRewardContent && <span>{" "}<Icon icon={icons.FEATURED} /></span>}
|
{isRewardContent &&
|
||||||
|
<span>{" "}<Icon icon={icons.FEATURED} /></span>}
|
||||||
</span>
|
</span>
|
||||||
: null}
|
: null}
|
||||||
<h1>{title}</h1>
|
<h1>{title}</h1>
|
||||||
|
|
Loading…
Add table
Reference in a new issue