Add card sidebar tab navigation to router
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
<template>
|
||||
<AppSidebar v-if="currentBoard && currentCard"
|
||||
:active="tabId"
|
||||
:title="title"
|
||||
:subtitle="subtitle"
|
||||
:title-editable="titleEditable"
|
||||
@@ -65,7 +66,7 @@
|
||||
:order="2"
|
||||
:name="t('deck', 'Comments')"
|
||||
icon="icon-comment">
|
||||
<CardSidebarTabComments :card="currentCard" />
|
||||
<CardSidebarTabComments :card="currentCard" :tab-query="tabQuery" />
|
||||
</AppSidebarTab>
|
||||
|
||||
<AppSidebarTab v-if="hasActivity"
|
||||
@@ -109,6 +110,16 @@ export default {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
tabId: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
tabQuery: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -49,6 +49,11 @@ export default {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
tabQuery: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -116,7 +116,7 @@ export default new Router({
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'card/:cardId',
|
||||
path: 'card/:cardId/:tabId?/:tabQuery?',
|
||||
name: 'card',
|
||||
components: {
|
||||
sidebar: CardSidebar,
|
||||
@@ -130,6 +130,8 @@ export default new Router({
|
||||
sidebar: (route) => {
|
||||
return {
|
||||
id: parseInt(route.params.cardId, 10),
|
||||
tabId: route.params.tabId,
|
||||
tabQuery: route.params.tabQuery,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user