#90 add multiple airlines

This commit is contained in:
Keith Paterson 2021-01-02 19:51:22 +01:00
parent 67b2220bbe
commit 84fd39c3b5
3 changed files with 1165 additions and 412 deletions

1562
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -77,6 +77,7 @@
},
"nsis": {
"oneClick": false,
"perMachine": true,
"allowToChangeInstallationDirectory": true
},
"linux": {
@ -94,6 +95,7 @@
"element-ui": "^2.13.2",
"file-url": "^3.0.0",
"fs": "0.0.1-security",
"fs-extra": "^9.0.1",
"geo-coordinates-parser": "^1.2.4",
"geodesy": "^2.2.0",
"idb": "^4.0.5",
@ -143,7 +145,7 @@
"del": "^3.0.0",
"devtron": "^1.4.0",
"electron": "^7.2.4",
"electron-builder": "^21.2.0",
"electron-builder": "^22.10.4",
"electron-devtools-installer": "^2.2.4",
"eslint": "^4.19.1",
"eslint-config-standard": "^11.0.0",

View File

@ -15,13 +15,12 @@ You should have received a copy of the GNU General Public License along with FG
<el-dialog
title="Add Airline"
:visible.sync="dialogVisible"
width="20%"
width="40%"
:before-close="handleClose">
<span>Add an selectable airline to {{ icao }} {{ name }}</span>
<el-input
placeholder="Please input airline"
placeholder="Please input airline(s)"
v-model="airlineCode"
maxlength="3"
></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">Cancel</el-button>
@ -193,7 +192,11 @@ export default {
},
addAirline () {
this.dialogVisible = false
this.$store.dispatch('addAirline', this.airlineCode)
this.airlineCode.split(/[ ,]/).forEach(element => {
if (element.length === 3) {
this.$store.dispatch('addAirline', element)
}
})
},
addFrequency () {
this.$store.dispatch('addFrequency', {type: 'AWOS', value: 0})