diff --git a/lib/gui/app/components/source-selector/source-selector.tsx b/lib/gui/app/components/source-selector/source-selector.tsx index e83d7e5f..fbf3d963 100644 --- a/lib/gui/app/components/source-selector/source-selector.tsx +++ b/lib/gui/app/components/source-selector/source-selector.tsx @@ -439,9 +439,8 @@ export class SourceSelector extends React.Component< const hasImage = selectionState.hasImage(); - const imageBasename = hasImage - ? path.basename(selectionState.getImagePath()) - : ''; + const imagePath = selectionState.getImagePath(); + const imageBasename = hasImage ? path.basename(imagePath) : ''; const imageName = selectionState.getImageName(); const imageSize = selectionState.getImageSize(); @@ -466,7 +465,7 @@ export class SourceSelector extends React.Component< {middleEllipsis(imageName || imageBasename, 20)} @@ -533,21 +532,28 @@ export class SourceSelector extends React.Component< {showImageDetails && ( { this.setState({ showImageDetails: false }); }} > - {selectionState.getImagePath()} + + Name: + {imageName || imageBasename} + + + Path: + {imagePath} + )} {showURLSelector && ( { + done={async (imageURL: string) => { // Avoid analytics and selection state changes // if no file was resolved from the dialog. - if (!imagePath) { + if (!imageURL) { analytics.logEvent('URL selector closed'); this.setState({ showURLSelector: false, @@ -556,7 +562,7 @@ export class SourceSelector extends React.Component< } await this.selectImageByPath({ - imagePath, + imagePath: imageURL, SourceType: sourceDestination.Http, }); this.setState({