fix toggle sidebar

This commit is contained in:
Jonas Heinrich 2020-11-17 13:32:15 +01:00
parent 95311ebcff
commit 336e51bd1d
2 changed files with 15 additions and 5 deletions

View File

@ -36,7 +36,8 @@
</AppContent>
<Sidebar
:show-sidebar="showSidebar"
:sidebar-station="sidebarStation" />
:sidebar-station="sidebarStation"
@toggleSidebar="toggleSidebar" />
</Content>
</template>
@ -332,9 +333,13 @@ export default {
})
},
toggleSidebar(station) {
toggleSidebar(station = null) {
if (station) {
this.showSidebar = true
this.sidebarStation = station
} else {
this.showSidebar = false
}
},
},
}

View File

@ -5,7 +5,7 @@
:subtitle="stationTags"
:background="sidebarStation.favicon"
class="has-preview"
@close="showSidebar=false">
@close="toggleSidebar">
<div class="configBox">
<span class="icon icon-link" />
<span class="title">
@ -90,6 +90,11 @@ export default {
return ''
},
},
methods: {
toggleSidebar(station) {
this.$emit('toggleSidebar')
},
},
}
</script>