mirror of https://github.com/Kylart/KawAnime.git
Typo on function name + added a alreadyLoaded token on localPage
This commit is contained in:
parent
434af64850
commit
c5c1a92bce
|
@ -104,7 +104,8 @@ exports.delFile = (object, name) => {
|
|||
})
|
||||
}
|
||||
|
||||
exports.changePathDiaog = (object) => {
|
||||
exports.changePathDialog = (object) => {
|
||||
// TODO: Find a way to catch TypeError on escape press of Dialog.
|
||||
dialog.showOpenDialog({properties: ['openDirectory']}, (dirPath) => {
|
||||
object.files = []
|
||||
object.currentDir = dirPath[0]
|
||||
|
|
|
@ -91,6 +91,7 @@ Vue.component('local-page', {
|
|||
return {
|
||||
files: [],
|
||||
currentDir: functions.DIR,
|
||||
alreadyLoaded: false,
|
||||
elemStyle: {
|
||||
marginBottom: '1.5%'
|
||||
},
|
||||
|
@ -122,7 +123,7 @@ Vue.component('local-page', {
|
|||
functions.delFile(this, name)
|
||||
},
|
||||
changeDir: function () {
|
||||
functions.changePathDiaog(this)
|
||||
functions.changePathDialog(this)
|
||||
},
|
||||
refreshDir: function () {
|
||||
this.files = []
|
||||
|
@ -130,6 +131,10 @@ Vue.component('local-page', {
|
|||
}
|
||||
},
|
||||
created: function () {
|
||||
this.findFiles()
|
||||
if (!this.alreadyLoaded)
|
||||
{
|
||||
this.findFiles()
|
||||
this.alreadyloaded = true
|
||||
}
|
||||
}
|
||||
})
|
Loading…
Reference in New Issue