From 4314b489249ffa77e3eb4743b19f9b2f60a8c730 Mon Sep 17 00:00:00 2001
From: lambadalambda <gitgud@rogerbraun.net>
Date: Thu, 19 Jan 2017 11:51:27 -0500
Subject: [PATCH 1/9] Update README.md

---
 README.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/README.md b/README.md
index 117bd6ee..ee1e5ef1 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,10 @@
 
 > A Qvitter-style frontend for certain GS servers.
 
+# FOR ADMINS
+
+You don't need to build Pleroma yourself. Check out https://gitgud.io/lambadalambda/pleroma-fe/wikis/dual-boot-with-qvitter to see how to run Pleroma and Qvitter at the same time.
+
 ## Build Setup
 
 ``` bash

From e81b3ea245c650377126242d928bd96ea64ec0a4 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Fri, 20 Jan 2017 23:39:38 +0100
Subject: [PATCH 2/9] Fix style setting in Chrome.

---
 src/services/style_setter/style_setter.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js
index b8c978b4..79b68b38 100644
--- a/src/services/style_setter/style_setter.js
+++ b/src/services/style_setter/style_setter.js
@@ -22,6 +22,7 @@ const setStyle = (href) => {
 
   const setDynamic = () => {
     const baseEl = document.createElement('div')
+    body.appendChild(baseEl)
     baseEl.setAttribute('class', 'base05')
     const base05Color = window.getComputedStyle(baseEl).getPropertyValue('color')
     baseEl.setAttribute('class', 'base08')
@@ -29,6 +30,7 @@ const setStyle = (href) => {
     const styleEl = document.createElement('style')
     head.appendChild(styleEl)
     const styleSheet = styleEl.sheet
+    body.removeChild(baseEl)
 
     styleSheet.insertRule(`a { color: ${base08Color}`, 'index-max')
     styleSheet.insertRule(`body { color: ${base05Color}`, 'index-max')

From b98a6fe5bc486f07d4b8d5a9dd3fedd6bf4b7b66 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Fri, 20 Jan 2017 23:58:58 +0100
Subject: [PATCH 3/9] Fix file uploads in Chrome.

---
 .../status_poster/status_poster.service.js      | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/services/status_poster/status_poster.service.js b/src/services/status_poster/status_poster.service.js
index 850993f7..bc1fd37d 100644
--- a/src/services/status_poster/status_poster.service.js
+++ b/src/services/status_poster/status_poster.service.js
@@ -20,12 +20,23 @@ const uploadMedia = ({ store, formData }) => {
   const credentials = store.state.users.currentUser.credentials
 
   return apiService.uploadMedia({ credentials, formData }).then((xml) => {
-    return {
+    // Firefox and Chrome treat method differently...
+    let link = xml.getElementsByTagName('link')
+
+    if (link.length === 0) {
+      link = xml.getElementsByTagName('atom:link')
+    }
+
+    link = link[0]
+
+    const mediaData = {
       id: xml.getElementsByTagName('media_id')[0].textContent,
       url: xml.getElementsByTagName('media_url')[0].textContent,
-      image: xml.getElementsByTagName('atom:link')[0].getAttribute('href'),
-      mimetype: xml.getElementsByTagName('atom:link')[0].getAttribute('type')
+      image: link.getAttribute('href'),
+      mimetype: link.getAttribute('type')
     }
+
+    return mediaData
   })
 }
 

From 5a518fa817fbd64fcf9b3a18b02acefcff5fc307 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Thu, 26 Jan 2017 12:03:07 +0100
Subject: [PATCH 4/9] Break after user name in notifications.

---
 src/components/notifications/notifications.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue
index ba5d8971..0846c27b 100644
--- a/src/components/notifications/notifications.vue
+++ b/src/components/notifications/notifications.vue
@@ -9,15 +9,15 @@
           </a>
           <div class='text'>
             <div v-if="notification.type === 'favorite'">
-              <h1>{{ notification.action.user.name }}<i class="fa icon-star"></i> favorited your <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">status</h1>
+              <h1>{{ notification.action.user.name }}<br><i class="fa icon-star"></i> favorited your <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">status</h1>
               <p>{{ notification.status.text }}</p>
             </div>
             <div v-if="notification.type === 'repeat'">
-              <h1>{{ notification.action.user.name }}<i class="fa icon-retweet"></i> repeated your <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">status</h1>
+              <h1>{{ notification.action.user.name }}<br><i class="fa icon-retweet"></i> repeated your <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">status</h1>
               <p>{{ notification.status.text }}</p>
             </div>
             <div v-if="notification.type === 'mention'">
-              <h1>{{ notification.action.user.name }}<i class="fa icon-reply"></i> <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">mentioned</router-link> you</h1>
+              <h1>{{ notification.action.user.name }}<br><i class="fa icon-reply"></i> <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">mentioned</router-link> you</h1>
               <p>{{ notification.status.text }}</p>
             </div>
           </div>

From ea25708bf365e865334877c8625996f9386b44e0 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Sat, 4 Feb 2017 13:51:44 +0100
Subject: [PATCH 5/9] Set color on status instead of on timeline.

---
 src/components/friends_timeline/friends_timeline.vue            | 2 +-
 src/components/mentions/mentions.vue                            | 2 +-
 .../public_and_external_timeline.vue                            | 2 +-
 src/components/public_timeline/public_timeline.vue              | 2 +-
 src/components/status/status.vue                                | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/components/friends_timeline/friends_timeline.vue b/src/components/friends_timeline/friends_timeline.vue
index 88c477ab..afe5cc89 100644
--- a/src/components/friends_timeline/friends_timeline.vue
+++ b/src/components/friends_timeline/friends_timeline.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="timeline panel panel-default base00-background">
+  <div class="timeline panel panel-default">
     <div class="panel-heading base01-background base04">Friends Timeline</div>
     <div class="panel-body">
       <Timeline v-bind:timeline="timeline" v-bind:timeline-name="'friends'"/>
diff --git a/src/components/mentions/mentions.vue b/src/components/mentions/mentions.vue
index cf97f9ee..59f00241 100644
--- a/src/components/mentions/mentions.vue
+++ b/src/components/mentions/mentions.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="timeline panel panel-default base00-background">
+  <div class="timeline panel panel-default">
     <div class="panel-heading base01-background base04">Mentions</div>
     <div class="panel-body">
       <Timeline v-bind:timeline="timeline" v-bind:timeline-name="'mentions'"/>
diff --git a/src/components/public_and_external_timeline/public_and_external_timeline.vue b/src/components/public_and_external_timeline/public_and_external_timeline.vue
index 282bb15b..bda51153 100644
--- a/src/components/public_and_external_timeline/public_and_external_timeline.vue
+++ b/src/components/public_and_external_timeline/public_and_external_timeline.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="timeline panel panel-default base00-background">
+  <div class="timeline panel panel-default">
     <div class="panel-heading base01-background base04">THE WHOLE KNOWN NETWORK</div>
     <div class="panel-body">
       <Timeline v-bind:timeline="timeline" v-bind:timeline-name="'publicAndExternal'"/>
diff --git a/src/components/public_timeline/public_timeline.vue b/src/components/public_timeline/public_timeline.vue
index ada40005..d05695b2 100644
--- a/src/components/public_timeline/public_timeline.vue
+++ b/src/components/public_timeline/public_timeline.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="timeline panel panel-default base00-background">
+  <div class="timeline panel panel-default">
     <div class="panel-heading base01-background base04">Public Timeline</div>
     <div class="panel-body">
       <Timeline v-bind:timeline="timeline" v-bind:timeline-name="'public'"/>
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index e043f6e2..10e321a1 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="status-el" v-if="!status.deleted">
+  <div class="status-el base00-background" v-if="!status.deleted">
     <div v-if="retweet" class="media container retweet-info">
       <div class="media-left">
         <i class='fa icon-retweet retweeted'></i>

From 5ec4f1b047d798b7038ec73db86476e70d2b1888 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Sat, 4 Feb 2017 13:52:26 +0100
Subject: [PATCH 6/9] Extract conversation and create conversation page.

---
 .../conversation-page/conversation-page.js    | 19 +++++++++++++++++++
 .../conversation-page/conversation-page.vue   |  5 +++++
 src/components/conversation/conversation.js   | 14 ++++++--------
 src/components/conversation/conversation.vue  |  9 +++++++--
 src/main.js                                   |  4 ++--
 5 files changed, 39 insertions(+), 12 deletions(-)
 create mode 100644 src/components/conversation-page/conversation-page.js
 create mode 100644 src/components/conversation-page/conversation-page.vue

diff --git a/src/components/conversation-page/conversation-page.js b/src/components/conversation-page/conversation-page.js
new file mode 100644
index 00000000..beffa5bb
--- /dev/null
+++ b/src/components/conversation-page/conversation-page.js
@@ -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
diff --git a/src/components/conversation-page/conversation-page.vue b/src/components/conversation-page/conversation-page.vue
new file mode 100644
index 00000000..b03eea28
--- /dev/null
+++ b/src/components/conversation-page/conversation-page.vue
@@ -0,0 +1,5 @@
+<template>
+  <conversation :collapsable="false" :statusoid="statusoid"></conversation>
+</template>
+
+<script src="./conversation-page.js"></script>
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js
index 5d4f5d04..ecc76e71 100644
--- a/src/components/conversation/conversation.js
+++ b/src/components/conversation/conversation.js
@@ -1,4 +1,4 @@
-import { find, filter, sortBy, toInteger } from 'lodash'
+import { filter, sortBy } from 'lodash'
 import { statusType } from '../../modules/statuses.js'
 import Status from '../status/status.vue'
 
@@ -8,14 +8,12 @@ const sortAndFilterConversation = (conversation) => {
 }
 
 const conversation = {
+  props: [
+    'statusoid',
+    'collapsable'
+  ],
   computed: {
-    status () {
-      const id = toInteger(this.$route.params.id)
-      const statuses = this.$store.state.statuses.allStatuses
-      const status = find(statuses, {id})
-
-      return status
-    },
+    status () { return this.statusoid },
     conversation () {
       if (!this.status) {
         return false
diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue
index 00d3e062..9675e69f 100644
--- a/src/components/conversation/conversation.vue
+++ b/src/components/conversation/conversation.vue
@@ -1,9 +1,14 @@
 <template>
   <div class="timeline panel panel-default base00-background">
-    <div class="panel-heading base01-background base04">Status</div>
+    <div class="panel-heading base01-background base04">
+      Conversation
+      <div v-if="collapsable">
+        <small><a href="#" @click.prevent="$emit('toggleExpanded')">Collapse</a></small>
+      </div>
+    </div>
     <div class="panel-body">
       <div class="timeline">
-        <status v-for="status in conversation" :key="status.id" v-bind:statusoid="status"></status>
+        <status v-for="status in conversation" :key="status.id" v-bind:statusoid="status":expandable='false'></status>
       </div>
     </div>
   </div>
diff --git a/src/main.js b/src/main.js
index 1c24b28c..c187ffd6 100644
--- a/src/main.js
+++ b/src/main.js
@@ -5,7 +5,7 @@ import App from './App.vue'
 import PublicTimeline from './components/public_timeline/public_timeline.vue'
 import PublicAndExternalTimeline from './components/public_and_external_timeline/public_and_external_timeline.vue'
 import FriendsTimeline from './components/friends_timeline/friends_timeline.vue'
-import Conversation from './components/conversation/conversation.vue'
+import ConversationPage from './components/conversation-page/conversation-page.vue'
 import Mentions from './components/mentions/mentions.vue'
 import UserProfile from './components/user_profile/user_profile.vue'
 
@@ -39,7 +39,7 @@ const routes = [
   { path: '/main/all', component: PublicAndExternalTimeline },
   { path: '/main/public', component: PublicTimeline },
   { path: '/main/friends', component: FriendsTimeline },
-  { name: 'conversation', path: '/notice/:id', component: Conversation },
+  { name: 'conversation', path: '/notice/:id', component: ConversationPage },
   { name: 'user-profile', path: '/users/:id', component: UserProfile },
   { name: 'mentions', path: '/:username/mentions', component: Mentions }
 ]

From 800b051a166ae2ac8e0b81b022ca0058304bb915 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Sat, 4 Feb 2017 13:53:07 +0100
Subject: [PATCH 7/9] Add statusOrConversation component.

---
 .../status_or_conversation.js                 | 22 +++++++++++++++++++
 .../status_or_conversation.vue                | 14 ++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 src/components/status_or_conversation/status_or_conversation.js
 create mode 100644 src/components/status_or_conversation/status_or_conversation.vue

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>

From b420b5838ca614df1d60f8a42541cadde0fa3d98 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Sat, 4 Feb 2017 13:53:16 +0100
Subject: [PATCH 8/9] Use statusOrConversation component in timeline.

---
 src/components/timeline/timeline.js  | 4 +++-
 src/components/timeline/timeline.vue | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js
index 8799e69c..addd0255 100644
--- a/src/components/timeline/timeline.js
+++ b/src/components/timeline/timeline.js
@@ -1,5 +1,6 @@
 import Status from '../status/status.vue'
 import timelineFetcher from '../../services/timeline_fetcher/timeline_fetcher.service.js'
+import StatusOrConversation from '../status_or_conversation/status_or_conversation.vue'
 
 const Timeline = {
   props: [
@@ -7,7 +8,8 @@ const Timeline = {
     'timelineName'
   ],
   components: {
-    Status
+    Status,
+    StatusOrConversation
   },
   created () {
     const store = this.$store
diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue
index 3da31f14..45886f6c 100644
--- a/src/components/timeline/timeline.vue
+++ b/src/components/timeline/timeline.vue
@@ -7,7 +7,7 @@
         </p>
       </div>
     </a>
-    <status v-for="status in timeline.visibleStatuses" :key="status.id" v-bind:statusoid="status"></status>
+    <status-or-conversation v-for="status in timeline.visibleStatuses" :key="status.id" v-bind:statusoid="status"></status-or-conversation>
     <a href="#" v-on:click.prevent='fetchOlderStatuses()' v-if="!timeline.loading">
       <div class="base01-background base05-border new-status-notification">
         <p class="text-center" >

From 2269e815e1829558295e8c1d83ed1235644e02dd Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Sat, 4 Feb 2017 13:53:28 +0100
Subject: [PATCH 9/9] Make status expandable into conversation.

---
 src/components/status/status.js  | 11 +++++++++--
 src/components/status/status.vue | 10 ++++++----
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/components/status/status.js b/src/components/status/status.js
index 27911478..40589ea5 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -5,9 +5,13 @@ import DeleteButton from '../delete_button/delete_button.vue'
 import PostStatusForm from '../post_status_form/post_status_form.vue'
 
 const Status = {
-  props: [ 'statusoid' ],
+  props: [
+    'statusoid',
+    'expandable'
+  ],
   data: () => ({
-    replying: false
+    replying: false,
+    expanded: false
   }),
   computed: {
     retweet () { return !!this.statusoid.retweeted_status },
@@ -33,6 +37,9 @@ const Status = {
   methods: {
     toggleReplying () {
       this.replying = !this.replying
+    },
+    toggleExpanded () {
+      this.$emit('toggleExpanded')
     }
   }
 }
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 10e321a1..f113fb7e 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -30,6 +30,12 @@
                 <timeago :since="status.created_at" :auto-update="60"></timeago>
               </router-link>
             </small>
+            <template v-if="expandable">
+              -
+              <small>
+                <a href="#" @click.prevent="toggleExpanded" >Expand</a>
+              </small>
+            </template>
             <small v-if="!status.is_local" class="source_url">
               <a :href="status.external_url" target="_blank" >Source</a>
             </small>
@@ -122,8 +128,4 @@
      padding-right: 1em;
      border-bottom: 1px solid;
  }
-
- .status-el:last-child .status {
-     border-bottom: none
- }
 </style>