Skip to content

Commit

Permalink
https://github.com/Portree-Kid/flightgear-airports/issues/49
Browse files Browse the repository at this point in the history
  • Loading branch information
Portree-Kid committed Jul 12, 2020
1 parent d61dc7c commit 82f88d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 9 additions & 2 deletions src/renderer/components/DirectorySelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/components/SettingsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 82f88d1

Please sign in to comment.