From 95311ebcff5953201199ac6d2c10c136bd7a5384 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Mon, 16 Nov 2020 21:32:25 +0100 Subject: [PATCH] fix and style sidebar --- src/components/Main.vue | 11 ++-- src/components/Sidebar.vue | 122 ++++++++++++++++++++++++++++++++++--- 2 files changed, 120 insertions(+), 13 deletions(-) diff --git a/src/components/Main.vue b/src/components/Main.vue index 1f52a01..5752541 100644 --- a/src/components/Main.vue +++ b/src/components/Main.vue @@ -34,6 +34,9 @@ + @@ -47,6 +50,7 @@ import axios from '@nextcloud/axios' import Navigation from './Navigation' import Table from './Table' +import Sidebar from './Sidebar' import { Howl, Howler } from 'howler' @@ -60,6 +64,7 @@ export default { AppContent, Table, EmptyContent, + Sidebar, }, data: () => ({ tableData: [], @@ -73,12 +78,6 @@ export default { player() { return this.$store.state.player }, - stationTags() { - if (this.sidebarStation.tags) { - return this.sidebarStation.tags.replaceAll(',', ', ') - } - return '' - }, }, watch: { $route: 'onRoute', diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index f3bf9e6..f775ca8 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -1,14 +1,62 @@ @@ -24,5 +72,65 @@ export default { Actions, ActionButton, }, + props: { + showSidebar: { + type: Boolean, + default() { return false }, + }, + sidebarStation: { + type: Array, + default() { return [] }, + }, + }, + computed: { + stationTags() { + if (this.sidebarStation.tags) { + return this.sidebarStation.tags.replaceAll(',', ', ') + } + return '' + }, + }, } + +