Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
standard
Browse files Browse the repository at this point in the history
  • Loading branch information
okdistribute committed Feb 17, 2020
1 parent 26eef7f commit 66b7885
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/actions/dat-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ export default class DatMiddleware {
await mkdirp(this.dataDir)
} catch (_) {}

const [ datOpts, paused ] = await Promise.all([
const [datOpts, paused] = await Promise.all([
readJSON(joinPath(this.dataDir, 'dats.json')),
readJSON(joinPath(this.dataDir, 'paused.json'))
])
Expand Down
22 changes: 12 additions & 10 deletions app/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@ export const closeShareDat = () => ({ type: 'DIALOGS_LINK_CLOSE' })
export const createDat = () => dispatch => {
showOpenDialog({
properties: ['openDirectory']
}).then(({ filePaths, cancelled }) => {
if (cancelled) return
if (!filePaths) {
console.error('Did not get files from the open dialog, closing')
return
}
const path = filePaths[0]
addDat({ path })(dispatch)
}).catch((err) => {
console.error(err)
})
.then(({ filePaths, cancelled }) => {
if (cancelled) return
if (!filePaths) {
console.error('Did not get files from the open dialog, closing')
return
}
const path = filePaths[0]
addDat({ path })(dispatch)
})
.catch(err => {
console.error(err)
})
}
export const requestDownload = key => ({
type: 'REQUEST_DOWNLOAD',
Expand Down
2 changes: 1 addition & 1 deletion app/components/finder-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const FinderButton = ({ dat, onClick }) => (
<Button.Icon
icon={<Icon name='open-in-finder' />}
className='row-action btn-finder'
onClick={(ev) => {
onClick={ev => {
ev.stopPropagation()
shell.openExternal(`file://${resolve(dat.path)}`, () => {})
}}
Expand Down
2 changes: 1 addition & 1 deletion app/components/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const Inspect = ({
CHANGE...
</TextButton>
</Row>
<Row label='Files:' style={{padding: 0}}>
<Row label='Files:' style={{ padding: 0 }}>
<FileList
dat={dat}
fallback={<div className='f7 f6-l pa2'>N/A</div>}
Expand Down

0 comments on commit 66b7885

Please sign in to comment.