-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Think have basic flight body inputs finally working.
- Loading branch information
1 parent
84e669c
commit fa4526a
Showing
5 changed files
with
255 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<template> | ||
<div class="flight-body"> | ||
|
||
<p v-for="(para, key) in paragraphsList" :key="key"> | ||
|
||
<v-icon small color="warning" class="mr-1"> | ||
{{ infoIcon }} | ||
</v-icon> | ||
{{ para.text }} | ||
</p> | ||
|
||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mdiInformation } from '@mdi/js' | ||
export default { | ||
name: "FlightDialogBody", | ||
props: { | ||
body: { | ||
type: String, | ||
default: '' | ||
}, | ||
lang: { | ||
type: String, | ||
default: 'en' | ||
}, | ||
}, | ||
data () { | ||
return { | ||
infoIcon: mdiInformation, | ||
paragraphsList: {} | ||
} | ||
}, | ||
watch: { | ||
body () { | ||
console.log("Watching 'body'") | ||
const parasList = [] | ||
// Break double new lines into paragraphs | ||
const paras = this.body.split(/\n\n/) | ||
//console.log(paras) | ||
// Parse out the optional 'icon' type. | ||
for (const p of paras) { | ||
const iconSplit = p.split('[location]'); | ||
if (iconSplit.length > 1) { | ||
console.log("Has Location icon: " + iconSplit.length); | ||
const obj = {"icon":"location", "text":iconSplit[1]} | ||
parasList.push(obj) | ||
} | ||
} | ||
console.log(parasList) | ||
return parasList | ||
}, | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,10 +130,3 @@ export default { | |
</script> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[ | ||
{ | ||
"id":39, | ||
"name":"Scenic", | ||
"price":"190.00", | ||
"body": { | ||
"en": "[location] We fly the Scenic from both Blauherd and Riffelberg. We try and choose the location that we feel will have the best conditions for your specific booking time. \n\n[star] We fly the Scenic in the Spring, Summer and Autumn, from Riffelberg/Blauherd (there is too much snow in winter forthese lower take off areas). \n\n[info]If you book the early morning (08:00) flight, we ask that you be be fairly fit, confident and not too heavy.", | ||
"de": "[location] DE...", | ||
"fr": "[location] FR...", | ||
"ko": "[location] KO..." | ||
} | ||
}, | ||
{ | ||
"id":38, | ||
"name":"Classic High", | ||
"price":"240.00", | ||
"body": { | ||
"en": "The best time for the Classic High is in the mornings. It is often also possible to do this flight in the afternoon, but it depends on the day's conditions. \n\nWe fly the Classic High the entire year, in the summer from Rothorn and in the spring/autumn, from Gornergrat and/or Rotenboden. \n\nIf you book the early morning (08:00) flight, we ask that you be be fairly fit, confident and not too heavy.", | ||
"de": "[location] DE...", | ||
"fr": "[location] FR...", | ||
"ko": "[location] KO..." | ||
} | ||
}, | ||
{ | ||
"id":40, | ||
"name":"Elite", | ||
"price":"420.00", | ||
"body": { | ||
"en": "The Elite flight is the highest tandem take off in the Alps - this makes for an amazing flight, but also means that both weather and snow conditions have to be just right. Winds are often strong at this altitude and our take off areas are on glacier/snow - because of this we try and do this flight early in the morning when conditions are the best. \n\n[location] We fly the Elite over the entire year, when ever wind and snow conditions allow. \n\nIf you book the Elite, we ask that you are happy to do the Classic High flight as a back-up - in case the conditions don't allow us to fly from Klein Matterhorn. \n\n[star]The Elite flight also requires passengers to be fairly fit, confident and not too heavy.", | ||
"de": "[location] DE...", | ||
"fr": "[location] FR...", | ||
"ko": "[location] KO..." | ||
} | ||
} | ||
] | ||
|
Oops, something went wrong.