commit
670298cca1
@ -0,0 +1,19 @@
|
||||
import Conversation from '../conversation/conversation.vue'
|
||||
import { find, toInteger } from 'lodash'
|
||||
|
||||
const conversationPage = {
|
||||
components: {
|
||||
Conversation
|
||||
},
|
||||
computed: {
|
||||
statusoid () {
|
||||
const id = toInteger(this.$route.params.id)
|
||||
const statuses = this.$store.state.statuses.allStatuses
|
||||
const status = find(statuses, {id})
|
||||
|
||||
return status
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default conversationPage
|
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<conversation :collapsable="false" :statusoid="statusoid"></conversation>
|
||||
</template>
|
||||
|
||||
<script src="./conversation-page.js"></script>
|
@ -0,0 +1,22 @@
|
||||
import Status from '../status/status.vue'
|
||||
import Conversation from '../conversation/conversation.vue'
|
||||
|
||||
const statusOrConversation = {
|
||||
props: ['statusoid'],
|
||||
data () {
|
||||
return {
|
||||
expanded: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Status,
|
||||
Conversation
|
||||
},
|
||||
methods: {
|
||||
toggleExpanded () {
|
||||
this.expanded = !this.expanded
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default statusOrConversation
|
@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<conversation v-if="expanded" @toggleExpanded="toggleExpanded" :collapsable="true" :statusoid="statusoid"></conversation>
|
||||
<status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :statusoid="statusoid"></status>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="./status_or_conversation.js"></script>
|
||||
|
||||
<style lang="scss">
|
||||
.spacer {
|
||||
height: 1em
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue