diff --git a/CHANGELOG.md b/CHANGELOG.md index f22fa8404..c91d955b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 * diff --git a/ui/js/component/fileDetails/view.jsx b/ui/js/component/fileDetails/view.jsx index c2cfda468..aaa6ab24e 100644 --- a/ui/js/component/fileDetails/view.jsx +++ b/ui/js/component/fileDetails/view.jsx @@ -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 { {__("License")}{license} - {directory && + {downloadPath && {__("Downloaded to")} - openFolder(directory)}> - {directory} + openFolder(downloadPath)}> + {downloadPath} } diff --git a/ui/js/component/publishForm/view.jsx b/ui/js/component/publishForm/view.jsx index b502f4add..0337aeba9 100644 --- a/ui/js/component/publishForm/view.jsx +++ b/ui/js/component/publishForm/view.jsx @@ -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); } diff --git a/ui/js/page/file/view.jsx b/ui/js/page/file/view.jsx index 8f3bb8168..f502d583f 100644 --- a/ui/js/page/file/view.jsx +++ b/ui/js/page/file/view.jsx @@ -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 ( - - - - - - - - - - - - - - - -
{__("Published on")}
{__("Content-Type")}{mediaType}
{__("Language")}{language}
{__("License")}{license}
- ); -}; - class FilePage extends React.PureComponent { componentDidMount() { this.fetchFileInfo(this.props); @@ -109,7 +79,8 @@ class FilePage extends React.PureComponent { {!fileInfo || fileInfo.written_bytes <= 0 ? - {isRewardContent && {" "}} + {isRewardContent && + {" "}} : null}

{title}