Commit 336e51bd authored by onny's avatar onny

fix toggle sidebar

parent 95311ebc
Pipeline #206 failed with stages
in 11 minutes and 54 seconds
......@@ -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) {
this.showSidebar = true
this.sidebarStation = station
toggleSidebar(station = null) {
if (station) {
this.showSidebar = true
this.sidebarStation = station
} else {
this.showSidebar = false
}
},
},
}
......
......@@ -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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment