portree_kid 2020-07-12 22:18:05 +02:00
parent d61dc7c955
commit 82f88d159b
2 changed files with 12 additions and 5 deletions

View File

@ -8,14 +8,21 @@
</template>
<script>
export default {
/* eslint-disable */
const path = require('path');
const fs = require('fs');
export default {
props: {
value: File
},
methods: {
handleFileChange (e) {
this.$emit('input', e.target.files[0])
var first = e.target.files[0].webkitRelativePath.split("/")[0];
var webkitdirectoryPath = e.target.files[0].path.split(first)[0] + first;
this.$emit('input', webkitdirectoryPath)
}
}
}

View File

@ -138,15 +138,15 @@
methods: {
flightgearDirectorySelect: function (flightgearDirectory) {
console.log(flightgearDirectory)
this.$store.commit('FLIGHTGEAR_DIRECTORY', flightgearDirectory.path)
this.$store.commit('FLIGHTGEAR_DIRECTORY', flightgearDirectory)
},
airportsDirectorySelect: function (flightgearDirectory) {
console.log(flightgearDirectory)
this.$store.commit('AIPORTS_DIRECTORY', flightgearDirectory.path)
this.$store.commit('AIPORTS_DIRECTORY', flightgearDirectory)
},
testDirectorySelect: function (testDirectory) {
console.log(testDirectory)
this.$store.commit('TEST_DIRECTORY', testDirectory.path)
this.$store.commit('TEST_DIRECTORY', testDirectory)
},
debug: function () {
ipcRenderer.send('OpenDebugger', 'ping')