Skip to content

Commit

Permalink
fix: better navigation when clicking on viz thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
billyc committed Jul 26, 2021
1 parent 8a4beef commit d5a7892
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/views/ScreenSplitter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class MyComponent extends Vue {
}
private buildLayoutFromURL() {
console.log(this.$route)
const pathMatch = this.$route.params.pathMatch
if (!pathMatch) return
Expand Down Expand Up @@ -170,7 +169,15 @@ class MyComponent extends Vue {
if (this.panels.length === 1) {
const root = this.panels[0].props.root || ''
const xsubfolder = this.panels[0].props.xsubfolder || ''
this.$router.push(`/${root}/${xsubfolder}`)
const yaml = this.panels[0].props.yamlConfig || ''
if (yaml) {
const base64 = btoa(JSON.stringify(this.panels))
this.$router.push(`/split/${base64}`)
} else {
console.log('boop')
this.$router.push(`/${root}/${xsubfolder}`)
}
} else {
const base64 = btoa(JSON.stringify(this.panels))
this.$router.push(`/split/${base64}`)
Expand Down

0 comments on commit d5a7892

Please sign in to comment.