aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-02-04 13:53:07 +0100
committerRoger Braun <roger@rogerbraun.net>2017-02-04 13:53:07 +0100
commit800b051a166ae2ac8e0b81b022ca0058304bb915 (patch)
tree5e4d018b732a33a17d4b49713eaf93c7e079b550
parent5ec4f1b047d798b7038ec73db86476e70d2b1888 (diff)
Add statusOrConversation component.
-rw-r--r--src/components/status_or_conversation/status_or_conversation.js22
-rw-r--r--src/components/status_or_conversation/status_or_conversation.vue14
2 files changed, 36 insertions, 0 deletions
diff --git a/src/components/status_or_conversation/status_or_conversation.js b/src/components/status_or_conversation/status_or_conversation.js
new file mode 100644
index 00000000..441552ca
--- /dev/null
+++ b/src/components/status_or_conversation/status_or_conversation.js
@@ -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
diff --git a/src/components/status_or_conversation/status_or_conversation.vue b/src/components/status_or_conversation/status_or_conversation.vue
new file mode 100644
index 00000000..4fabfab2
--- /dev/null
+++ b/src/components/status_or_conversation/status_or_conversation.vue
@@ -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>