Use AppSidebar component for card sidebar

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-04-26 10:22:26 +02:00
parent 74eb579474
commit a7497aa590
2 changed files with 27 additions and 11 deletions

View File

@@ -21,13 +21,7 @@
--> -->
<template> <template>
<div id="app-sidebar">
<span class="icon-close" title="Close" @click="closeSidebar">
<span class="hidden-visually">Close</span>
</span>
<router-view name="sidebar" /> <router-view name="sidebar" />
</div>
</template> </template>
<script> <script>

View File

@@ -21,21 +21,43 @@
--> -->
<template> <template>
<div class="sidebar"> <app-sidebar
<div class="sidebar-header"> title="andy-yeo-1387151-unsplash.jpg"
<h3>Card sidebar</h3> subtitle="4,3 MB, last edited 19 days ago"
</div> :actions="[]"
</div> @close="closeSidebar">
<template #action>
</template>
<AppSidebarTab name="Description" icon="icon-description">
this is the description tab
</AppSidebarTab>
<AppSidebarTab name="Timeline" icon="icon-activity">
this is the activity tab
</AppSidebarTab>
<AppSidebarTab name="Attachments" icon="icon-files-dark">
this is the files tab
</AppSidebarTab>
</app-sidebar>
</template> </template>
<script> <script>
import { AppSidebar, AppSidebarTab } from 'nextcloud-vue'
export default { export default {
name: 'CardSidebar', name: 'CardSidebar',
components: {
AppSidebar,
AppSidebarTab
},
data() { data() {
return { return {
} }
}, },
methods: { methods: {
closeSidebar() {
this.$router.push({ name: 'board' })
}
} }
} }
</script> </script>