Skip to content

Commit

Permalink
Merge pull request #102 from LCOGT/feature/header-modal-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
timbeccue authored Sep 28, 2023
2 parents 7035693 + 87ad96c commit 931b544
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions src/components/ImageDisplay/FitsHeaderModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
:data="fitsHeaderTable"
:columns="columns"
style="width: auto; flex: 0"
:loading="headerIsLoading"
/>
</div>
</div>
Expand All @@ -76,9 +75,7 @@ export default {
},
data () {
return {
fitsHeader: {},
showFitsHeaderModal: false,
headerIsLoading: false,
columns: [
{
field: 'key',
Expand All @@ -94,41 +91,22 @@ export default {
]
}
},
watch: {
image () {
if (this.showFitsHeaderModal) {
this.refreshFitsHeader()
}
}
},
computed: {
fitsHeaderTable () {
const tableData = []
for (const property in this.fitsHeader) {
for (const property in this.image.header) {
tableData.push({
key: property.toLowerCase(),
val: this.fitsHeader[property]
val: this.image.header[property]
})
}
return tableData
}
},
methods: {
refreshFitsHeader () {
this.fitsHeader = {}
this.headerIsLoading = true
this.$store.dispatch('images/loadCurrentImageFitsHeader').then(header => {
this.fitsHeader = header
}).finally(() => {
this.headerIsLoading = false
})
},
showFitsHeader () {
this.refreshFitsHeader()
this.showFitsHeaderModal = true
}
}
}
</script>
<style lang="scss" scoped>
</style>

0 comments on commit 931b544

Please sign in to comment.