mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-16 03:06:27 +00:00
focus first input & fix deprecated code
This commit is contained in:
@@ -10,7 +10,7 @@ const remote = electron.remote
|
|||||||
function browseFolder () {
|
function browseFolder () {
|
||||||
let dialog = remote.dialog
|
let dialog = remote.dialog
|
||||||
|
|
||||||
let defaultPath = remote.app.getHomeDir()
|
let defaultPath = remote.app.getPath('home')
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
dialog.showOpenDialog({
|
dialog.showOpenDialog({
|
||||||
title: 'Select Directory',
|
title: 'Select Directory',
|
||||||
@@ -36,6 +36,10 @@ class NewRepositoryModal extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount () {
|
||||||
|
this.refs.nameInput.focus()
|
||||||
|
}
|
||||||
|
|
||||||
handleCloseButtonClick (e) {
|
handleCloseButtonClick (e) {
|
||||||
this.props.close()
|
this.props.close()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user