Fix multiple dialog windows bug #1673
3 changed files with 17 additions and 11 deletions
|
@ -58,6 +58,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
||||||
* Fix Linux upgrade path and add manual installation note ([#1606](https://github.com/lbryio/lbry-app/issues/1606))
|
* Fix Linux upgrade path and add manual installation note ([#1606](https://github.com/lbryio/lbry-app/issues/1606))
|
||||||
* Fix can type in unfocused fields while publishing without selecting file ([#1456](https://github.com/lbryio/lbry-app/issues/1456))
|
* Fix can type in unfocused fields while publishing without selecting file ([#1456](https://github.com/lbryio/lbry-app/issues/1456))
|
||||||
* Fix navigation button resulting incorrect page designation ([#1502](https://github.com/lbryio/lbry-app/issues/1502))
|
* Fix navigation button resulting incorrect page designation ([#1502](https://github.com/lbryio/lbry-app/issues/1502))
|
||||||
|
* Fix shouldn't allow to open multiple export and choose file dialogs ([#1175](https://github.com/lbryio/lbry-app/issues/1175))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [0.21.6] - 2018-06-05
|
## [0.21.6] - 2018-06-05
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import parseData from 'util/parseData';
|
import parseData from 'util/parseData';
|
||||||
import * as icons from 'constants/icons';
|
import * as icons from 'constants/icons';
|
||||||
|
@ -56,7 +55,10 @@ class FileExporter extends React.PureComponent<Props> {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
remote.dialog.showSaveDialog(options, filename => {
|
remote.dialog.showSaveDialog(
|
||||||
|
remote.getCurrentWindow(),
|
||||||
|
options,
|
||||||
|
filename => {
|
||||||
// User hit cancel so do nothing:
|
// User hit cancel so do nothing:
|
||||||
if (!filename) return;
|
if (!filename) return;
|
||||||
// Get extension and remove initial dot
|
// Get extension and remove initial dot
|
||||||
|
@ -65,7 +67,8 @@ class FileExporter extends React.PureComponent<Props> {
|
||||||
const parsed = parseData(data, format, filters);
|
const parsed = parseData(data, format, filters);
|
||||||
// Write file
|
// Write file
|
||||||
parsed && this.handleFileCreation(filename, parsed);
|
parsed && this.handleFileCreation(filename, parsed);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -25,6 +25,7 @@ class FileSelector extends React.PureComponent<Props> {
|
||||||
|
|
||||||
handleButtonClick() {
|
handleButtonClick() {
|
||||||
remote.dialog.showOpenDialog(
|
remote.dialog.showOpenDialog(
|
||||||
|
remote.getCurrentWindow(),
|
||||||
{
|
{
|
||||||
properties:
|
properties:
|
||||||
this.props.type === 'file' ? ['openFile'] : ['openDirectory', 'createDirectory'],
|
this.props.type === 'file' ? ['openFile'] : ['openDirectory', 'createDirectory'],
|
||||||
|
|
Loading…
Reference in a new issue