From 148e691199c5449360786103e3056fb24cd39938 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Wed, 25 Apr 2018 17:35:25 +0300
Subject: initial vers

---
 src/components/status/status.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/status/status.vue')

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index f88c810d..be4b9f18 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -8,7 +8,7 @@
       </div>
     </template>
     <template v-else>
-      <div v-if="retweet && !noHeading" class="media container retweet-info">
+      <div v-if="retweet && !noHeading" :class="[userClass]" class="media container retweet-info">
         <StillImage v-if="retweet" class='avatar' :src="statusoid.user.profile_image_url_original"/>
         <div class="media-body faint">
           <a :href="statusoid.user.statusnet_profile_url" style="font-weight: bold;" :title="'@'+statusoid.user.screen_name">{{retweeter}}</a>
@@ -17,7 +17,7 @@
         </div>
       </div>
 
-      <div class="media status">
+      <div :class="[userClass]" class="media status">
         <div v-if="!noHeading" class="media-left">
           <a :href="status.user.statusnet_profile_url" @click.stop.prevent.capture="toggleUserExpanded">
             <StillImage class='avatar' :class="{'avatar-compact': compact}"  :src="status.user.profile_image_url_original"/>
-- 
cgit v1.2.3-70-g09d2


From f911182a2f608bc0589fc16210fdbc9673f6cc4e Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Mon, 18 Jun 2018 11:36:58 +0300
Subject: working, somewhat

---
 src/components/status/status.js                    | 42 +++++++++++++++++++---
 src/components/status/status.vue                   |  9 +++--
 .../user_card_content/user_card_content.js         | 42 +++++++++++++++++++---
 .../user_card_content/user_card_content.vue        | 11 +++++-
 src/main.js                                        |  1 +
 src/modules/users.js                               |  8 +++++
 6 files changed, 99 insertions(+), 14 deletions(-)

(limited to 'src/components/status/status.vue')

diff --git a/src/components/status/status.js b/src/components/status/status.js
index f33293f4..f4d0aecb 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -6,6 +6,7 @@ import PostStatusForm from '../post_status_form/post_status_form.vue'
 import UserCardContent from '../user_card_content/user_card_content.vue'
 import StillImage from '../still-image/still-image.vue'
 import { filter, find } from 'lodash'
+import { hex2rgb } from '../../services/color_convert/color_convert.js'
 
 const Status = {
   name: 'Status',
@@ -34,12 +35,21 @@ const Status = {
     muteWords () {
       return this.$store.state.config.muteWords
     },
+    repeaterClass () {
+      const user = this.statusoid.user
+      return this.highlightClass(user)
+    },
     userClass () {
-      console.log(this.statusoid.user)
-      console.log(this.statusoid.user.screen_name)
-      return 'USER____' + this.statusoid.user.screen_name
-        .replace(/\./g,'_')
-        .replace(/\@/g,'_AT_')
+      const user = this.retweet ? (this.statusoid.retweeted_status.user) : this.statusoid.user
+      return this.highlightClass(user)
+    },
+    repeaterStyle () {
+      const user = this.statusoid.user
+      return this.highlightStyle(user)
+    },
+    userStyle () {
+      const user = this.retweet ? (this.statusoid.retweeted_status.user) : this.statusoid.user
+      return this.highlightStyle(user)
     },
     hideAttachments () {
       return (this.$store.state.config.hideAttachments && !this.inConversation) ||
@@ -172,6 +182,28 @@ const Status = {
     },
     replyLeave () {
       this.showPreview = false
+    },
+    highlightStyle (user) {
+      const color = this.$store.state.config.highlight[user.screen_name]
+      if (!color) return
+      const rgb = hex2rgb(color)
+      const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .1)`
+      const tintColor2 = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .2)`
+      return {
+        backgroundImage: [
+          'repeating-linear-gradient(-45deg,',
+          tintColor, ',',
+          tintColor, '20px,',
+          tintColor2, '20px,',
+          tintColor2, '40px',
+        ].join(' '),
+        backgroundPosition: '0 0'
+      }
+    },
+    highlightClass (user) {
+      return 'USER____' + user.screen_name
+        .replace(/\./g,'_')
+        .replace(/\@/g,'_AT_')
     }
   },
   watch: {
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index be4b9f18..97b6d39f 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -8,7 +8,7 @@
       </div>
     </template>
     <template v-else>
-      <div v-if="retweet && !noHeading" :class="[userClass]" class="media container retweet-info">
+      <div v-if="retweet && !noHeading" :class="[repeaterClass, { highlighted: repeaterStyle }]" :style="[repeaterStyle]" class="media container retweet-info">
         <StillImage v-if="retweet" class='avatar' :src="statusoid.user.profile_image_url_original"/>
         <div class="media-body faint">
           <a :href="statusoid.user.statusnet_profile_url" style="font-weight: bold;" :title="'@'+statusoid.user.screen_name">{{retweeter}}</a>
@@ -17,7 +17,7 @@
         </div>
       </div>
 
-      <div :class="[userClass]" class="media status">
+      <div :class="[userClass, { highlighted: userStyle, 'is-retweet': retweet }]" :style="[ userStyle ]" class="media status">
         <div v-if="!noHeading" class="media-left">
           <a :href="status.user.statusnet_profile_url" @click.stop.prevent.capture="toggleUserExpanded">
             <StillImage class='avatar' :class="{'avatar-compact': compact}"  :src="status.user.profile_image_url_original"/>
@@ -315,7 +315,7 @@
 
   .retweet-info {
     padding: 0.4em 0.6em 0 0.6em;
-    margin: 0 0 -0.5em 0;
+    margin: 0;
     .avatar {
       border-radius: $fallback--avatarAltRadius;
       border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
@@ -427,6 +427,9 @@
 .status {
   display: flex;
   padding: 0.6em;
+  &.is-retweet {
+    padding-top: 0.1em;
+  }
 }
 
 .status-conversation:last-child {
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js
index 4d4266cb..7e0ea0da 100644
--- a/src/components/user_card_content/user_card_content.js
+++ b/src/components/user_card_content/user_card_content.js
@@ -3,17 +3,22 @@ import { hex2rgb } from '../../services/color_convert/color_convert.js'
 
 export default {
   props: [ 'user', 'switcher', 'selected', 'hideBio' ],
+  data() {
+    return {
+      userHighlightLocal: ''
+    }
+  },
+  mounted () {
+    const config = this.$store.state.config
+    config.highlight = config.highlight || {}
+    this.userHighlightLocal = config.highlight[this.user.screen_name]
+  },
   computed: {
     headingStyle () {
       const color = this.$store.state.config.colors.bg
       if (color) {
         const rgb = hex2rgb(color)
         const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .5)`
-        console.log(rgb)
-        console.log([
-          `url(${this.user.cover_photo})`,
-          `linear-gradient(to bottom, ${tintColor}, ${tintColor})`
-        ].join(', '))
         return {
           backgroundColor: `rgb(${Math.floor(rgb.r * 0.53)}, ${Math.floor(rgb.g * 0.56)}, ${Math.floor(rgb.b * 0.59)})`,
           backgroundImage: [
@@ -37,6 +42,33 @@ export default {
     dailyAvg () {
       const days = Math.ceil((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000))
       return Math.round(this.user.statuses_count / days)
+    },
+    userHighlightEnabled: {
+      get () {
+        return this.userHighlightLocal
+      },
+      set (value) {
+        const config = this.$store.state.config
+        config.highlight = config.highlight || {}
+        if (value) {
+          this.userHighlightLocal = config.highlight[this.user.screen_name] = '#FFFFFF'
+        } else {
+          this.userHighlightLocal = undefined
+          delete config.highlight[this.user.screen_name]
+        }
+      }
+    },
+    userHighlightColor: {
+      get () {
+        const config = this.$store.state.config
+        config.highlight = config.highlight || {}
+        return config.highlight[this.user.screen_name]
+      },
+      set (value) {
+        const config = this.$store.state.config
+        config.highlight = config.highlight || {}
+        config.highlight[this.user.screen_name] = value
+      }
     }
   },
   components: {
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index 09e91271..7d48870b 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -5,9 +5,14 @@
         <router-link to='/user-settings' style="float: right; margin-top:16px;" v-if="!isOtherUser">
           <i class="icon-cog usersettings"></i>
         </router-link>
-        <a :href="user.statusnet_profile_url" target="_blank" style="float: right; margin-top:16px;" v-if="isOtherUser">
+        <a :href="user.statusnet_profile_url" target="_blank" class="floater" v-if="isOtherUser">
           <i class="icon-link-ext usersettings"></i>
         </a>
+        <div class="floater" v-if="switcher || isOtherUser">
+          <input type="checkbox" id="userHighlightCheck" v-model="userHighlightEnabled">
+          <label :title="$t('settings.highlight')" for="userHighlightCheck"></label>
+          <input type="color" id="userHighlightColor" v-if="userHighlightLocal" v-model="userHighlightColor"/>
+        </div>
         <div class='container'>
           <router-link :to="{ name: 'user-profile', params: { id: user.id } }">
             <StillImage class="avatar" :src="user.profile_image_url_original"/>
@@ -278,4 +283,8 @@
   font-size: 0.7em;
   color: #CCC;
 }
+.floater {
+  float: right;
+  margin-top: 16px;
+}
 </style>
diff --git a/src/main.js b/src/main.js
index bacd7f6d..37a187c7 100644
--- a/src/main.js
+++ b/src/main.js
@@ -53,6 +53,7 @@ const persistedStateOptions = {
     'config.streaming',
     'config.muteWords',
     'config.customTheme',
+    'config.highlight',
     'users.lastLoginName'
   ]
 }
diff --git a/src/modules/users.js b/src/modules/users.js
index 8303ecc1..740ffdf6 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -42,6 +42,14 @@ export const mutations = {
   },
   setUserForStatus (state, status) {
     status.user = state.usersObject[status.user.id]
+  },
+  setHighlighted (state, { user: {id}, color }) {
+    const user = state.usersObject[id]
+    set(user, 'color', color)
+  },
+  setColor (state, { user: {id}, highlighted }) {
+    const user = state.usersObject[id]
+    set(user, 'highlight', highlighted)
   }
 }
 
-- 
cgit v1.2.3-70-g09d2


From da36cd11e8e7b5a1cefafb71e622ebbeb494d8ae Mon Sep 17 00:00:00 2001
From: dtluna <dtluna@waifu.club>
Date: Mon, 6 Aug 2018 11:57:27 +0300
Subject: Hide all status actions if not logged in

---
 src/components/status/status.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/status/status.vue')

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index f88c810d..13fb9b7d 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -82,8 +82,8 @@
             </attachment>
           </div>
 
-          <div v-if="!noHeading && !noReplyLinks" class='status-actions media-body'>
-            <div v-if="loggedIn">
+          <div v-if="loggedIn && !noHeading && !noReplyLinks" class='status-actions media-body'>
+            <div>
               <a href="#" v-on:click.prevent="toggleReplying">
                 <i class="icon-reply" :class="{'icon-reply-active': replying}"></i>
               </a>
-- 
cgit v1.2.3-70-g09d2


From 5cfc247c6b7f5dcdf7ef7e552d85f31615129eab Mon Sep 17 00:00:00 2001
From: dtluna <dtluna@waifu.club>
Date: Mon, 6 Aug 2018 09:08:50 +0000
Subject: Revert "Merge branch
 'feature/hide-all-status-actions-if-not-logged-in' into 'develop'"

This reverts merge request !301
---
 src/components/status/status.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/status/status.vue')

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 13fb9b7d..f88c810d 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -82,8 +82,8 @@
             </attachment>
           </div>
 
-          <div v-if="loggedIn && !noHeading && !noReplyLinks" class='status-actions media-body'>
-            <div>
+          <div v-if="!noHeading && !noReplyLinks" class='status-actions media-body'>
+            <div v-if="loggedIn">
               <a href="#" v-on:click.prevent="toggleReplying">
                 <i class="icon-reply" :class="{'icon-reply-active': replying}"></i>
               </a>
-- 
cgit v1.2.3-70-g09d2


From e60fde233b50ee1b2ed273f49f3fc5831508143c Mon Sep 17 00:00:00 2001
From: Toromino <d.buchholz@toromino.de>
Date: Wed, 8 Aug 2018 14:39:22 +0000
Subject: Update status.vue

---
 src/components/status/status.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/status/status.vue')

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index f88c810d..11865d0f 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -88,7 +88,7 @@
                 <i class="icon-reply" :class="{'icon-reply-active': replying}"></i>
               </a>
             </div>
-            <retweet-button :loggedIn='loggedIn' :status='status'></retweet-button>
+            <retweet-button v-if="status.visibility !== 'private' && status.visibility !== 'direct'" :loggedIn='loggedIn' :status='status'></retweet-button>
             <favorite-button :loggedIn='loggedIn' :status='status'></favorite-button>
             <delete-button :status='status'></delete-button>
           </div>
-- 
cgit v1.2.3-70-g09d2


From 876f7633fe34039c6f25831fa63ecc55d99081ff Mon Sep 17 00:00:00 2001
From: eal <eal@waifu.club>
Date: Thu, 9 Aug 2018 12:52:34 +0300
Subject: Use serverside html rendering in usernames and bios if available.

---
 src/components/notification/notification.vue           |  3 ++-
 src/components/status/status.js                        |  1 +
 src/components/status/status.vue                       |  6 ++++--
 src/components/user_card/user_card.vue                 | 10 ++++++++--
 src/components/user_card_content/user_card_content.vue |  6 ++++--
 5 files changed, 19 insertions(+), 7 deletions(-)

(limited to 'src/components/status/status.vue')

diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue
index eed598a8..208e389c 100644
--- a/src/components/notification/notification.vue
+++ b/src/components/notification/notification.vue
@@ -10,7 +10,8 @@
       </div>
       <span class="notification-details">
         <div class="name-and-action">
-          <span class="username" :title="'@'+notification.action.user.screen_name">{{ notification.action.user.name }}</span>
+          <span class="username" v-if="!!notification.action.user.name_html" :title="'@'+notification.action.user.screen_name" v-html="notification.action.user.name_html"></span>
+          <span class="username" v-else :title="'@'+notification.action.user.screen_name">{{ notification.action.user.name }}</span>
           <span v-if="notification.type === 'favorite'">
             <i class="fa icon-star lit"></i>
             <small>{{$t('notifications.favorited_you')}}</small>
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 87ef90d8..eb7d24d6 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -40,6 +40,7 @@ const Status = {
     },
     retweet () { return !!this.statusoid.retweeted_status },
     retweeter () { return this.statusoid.user.name },
+    retweeterHtml () { return this.statusoid.user.name_html },
     status () {
       if (this.retweet) {
         return this.statusoid.retweeted_status
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index f88c810d..e49958aa 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -11,7 +11,8 @@
       <div v-if="retweet && !noHeading" class="media container retweet-info">
         <StillImage v-if="retweet" class='avatar' :src="statusoid.user.profile_image_url_original"/>
         <div class="media-body faint">
-          <a :href="statusoid.user.statusnet_profile_url" style="font-weight: bold;" :title="'@'+statusoid.user.screen_name">{{retweeter}}</a>
+          <a v-if="retweeterHtml" :href="statusoid.user.statusnet_profile_url" style="font-weight: bold;" :title="'@'+statusoid.user.screen_name" v-html="retweeterHtml"></a>
+          <a v-else :href="statusoid.user.statusnet_profile_url" style="font-weight: bold;" :title="'@'+statusoid.user.screen_name">{{retweeter}}</a>
           <i class='fa icon-retweet retweeted'></i>
           {{$t('timeline.repeated')}}
         </div>
@@ -30,7 +31,8 @@
           <div v-if="!noHeading" class="media-body container media-heading">
             <div class="media-heading-left">
               <div class="name-and-links">
-                <h4 class="user-name">{{status.user.name}}</h4>
+                <h4 class="user-name" v-if="status.user.name_html" v-html="status.user.name_html"></h4>
+                <h4 class="user-name" v-else>{{status.user.name}}</h4>
                 <span class="links">
                   <router-link :to="{ name: 'user-profile', params: { id: status.user.id } }">{{status.user.screen_name}}</router-link>
                   <span v-if="status.in_reply_to_screen_name" class="faint reply-info">
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue
index 6478a65f..7e3e0afe 100644
--- a/src/components/user_card/user_card.vue
+++ b/src/components/user_card/user_card.vue
@@ -7,10 +7,16 @@
       <user-card-content :user="user" :switcher="false"></user-card-content>
     </div>
     <div class="name-and-screen-name" v-else>
-      <div :title="user.name" class="user-name">
+      <div :title="user.name" v-if="user.name_html" class="user-name">
+        <span v-html="user.name_html"></span>
+        <span class="follows-you" v-if="!userExpanded && showFollows && user.follows_you">
+          {{ $t('user_card.follows_you') }}
+        </span>
+      </div>
+      <div :title="user.name" v-else class="user-name">
         {{ user.name }}
         <span class="follows-you" v-if="!userExpanded && showFollows && user.follows_you">
-            {{ $t('user_card.follows_you') }}
+          {{ $t('user_card.follows_you') }}
         </span>
       </div>
       <a :href="user.statusnet_profile_url" target="blank"><div class="user-screen-name">@{{ user.screen_name }}</div></a>
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index 09e91271..96923786 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -13,7 +13,8 @@
             <StillImage class="avatar" :src="user.profile_image_url_original"/>
           </router-link>
           <div class="name-and-screen-name">
-            <div :title="user.name" class='user-name'>{{user.name}}</div>
+            <div :title="user.name" class='user-name' v-if="user.name_html" v-html="user.name_html"></div>
+            <div :title="user.name" class='user-name' v-else>{{user.name}}</div>
             <router-link class='user-screen-name':to="{ name: 'user-profile', params: { id: user.id } }">
               <span>@{{user.screen_name}}</span><span v-if="user.locked"><i class="icon icon-lock"></i></span>
               <span class="dailyAvg">{{dailyAvg}} {{ $t('user_card.per_day') }}</span>
@@ -88,7 +89,8 @@
           <span>{{user.followers_count}}</span>
         </div>
       </div>
-      <p v-if="!hideBio">{{user.description}}</p>
+      <p v-if="!hideBio && user.description_html" v-html="user.description_html"></p>
+      <p v-else-if="!hideBio">{{ user.description }}</p>
     </div>
   </div>
 </template>
-- 
cgit v1.2.3-70-g09d2


From 895ef525d2f0121d69f2267f72a4420009fb95ec Mon Sep 17 00:00:00 2001
From: Toromino <d.buchholz@toromino.de>
Date: Thu, 9 Aug 2018 16:47:08 +0000
Subject: Update status.vue

---
 src/components/status/status.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/status/status.vue')

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 11865d0f..7fff9fd7 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -88,7 +88,7 @@
                 <i class="icon-reply" :class="{'icon-reply-active': replying}"></i>
               </a>
             </div>
-            <retweet-button v-if="status.visibility !== 'private' && status.visibility !== 'direct'" :loggedIn='loggedIn' :status='status'></retweet-button>
+            <retweet-button :visibility='status.visibility' :loggedIn='loggedIn' :status='status'></retweet-button>
             <favorite-button :loggedIn='loggedIn' :status='status'></favorite-button>
             <delete-button :status='status'></delete-button>
           </div>
-- 
cgit v1.2.3-70-g09d2

