From 6c8fc99d5a602cb0a38dc0bdbe906e228a6a7cc7 Mon Sep 17 00:00:00 2001
From: shpuld <shpuld@gmail.com>
Date: Thu, 9 Mar 2017 01:09:23 +0200
Subject: [PATCH] Make style setter create an often used base03-border class,
 use that class in notifications, navpanel and statuses.

---
 src/components/nav_panel/nav_panel.vue          | 3 ++-
 src/components/notifications/notifications.scss | 3 ++-
 src/components/notifications/notifications.vue  | 2 +-
 src/components/status/status.js                 | 7 ++++++-
 src/components/status/status.vue                | 8 ++++++--
 src/services/style_setter/style_setter.js       | 1 +
 6 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue
index 85ed163c..240d7ae3 100644
--- a/src/components/nav_panel/nav_panel.vue
+++ b/src/components/nav_panel/nav_panel.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="nav-panel">
     <div class="panel panel-default base01-background">
-      <ul>
+      <ul class="base03-border">
         <li v-if='currentUser'>
           <router-link to='/main/friends'>
             Timeline
@@ -39,6 +39,7 @@
 
  .nav-panel li {
      border-bottom: 1px solid;
+     border-color: inherit;
      padding: 0.8em 0.85em;
  }
 
diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss
index 6ad7ec1e..37ae67ef 100644
--- a/src/components/notifications/notifications.scss
+++ b/src/components/notifications/notifications.scss
@@ -33,7 +33,8 @@
     // which does not happen with 10px vs 4px + 6px.
     padding: 0.4em 0 0 10px;
     display: flex;
-    border-bottom: 1px solid silver;
+    border-bottom: 1px solid;
+    border-bottom-color: inherit;
 
 
     .text {
diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue
index 91f6cfdc..661d842c 100644
--- a/src/components/notifications/notifications.vue
+++ b/src/components/notifications/notifications.vue
@@ -6,7 +6,7 @@
         Notifications
         <button @click.prevent="markAsSeen" class="base06 base02-background read-button">Read!</button>
       </div>
-      <div class="panel-body">
+      <div class="panel-body base03-border">
         <div v-for="notification in visibleNotifications" class="notification" :class='{"unseen": !notification.seen}'>
           <a :href="notification.action.user.statusnet_profile_url">
             <img class='avatar' :src="notification.action.user.profile_image_url_original">
diff --git a/src/components/status/status.js b/src/components/status/status.js
index bc9d6e6c..3e442656 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -32,7 +32,12 @@ const Status = {
       return !!this.$store.state.users.currentUser
     },
     muted () { return !this.unmuted && this.status.user.muted },
-    isReply () { return !!this.status.in_reply_to_status_id }
+    isReply () { return !!this.status.in_reply_to_status_id },
+    borderColor () {
+      return {
+        borderBottomColor: this.$store.state.config.colors['base02'],
+      }
+    }
   },
   components: {
     Attachment,
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 6476e1e5..9b0827a7 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="status-el base00-background" v-if="!status.deleted" v-bind:class="[{ 'expanded-status': !expandable }, { 'base01-background': focused }]">
+  <div class="status-el base00-background base03-border" v-if="!status.deleted" v-bind:class="[{ 'expanded-status': !expandable }, { 'base01-background': focused }]" >
     <template v-if="muted">
       <div class="media status container muted">
         <small><router-link :to="{ name: 'user-profile', params: { id: status.user.id } }">{{status.user.screen_name}}</router-link></small>
@@ -98,6 +98,7 @@
      overflow-wrap: break-word;
      word-wrap: break-word;
      word-break: break-word;
+     border-left-width: 0px;
 
      .user-content {
        min-height: 52px;
@@ -129,7 +130,7 @@
  }
 
  .expanded-status {
-   border-left: 4px solid rgba(255, 48, 16, 0.65);
+   border-left-style: solid;
  }
 
  .status-actions {
@@ -151,6 +152,9 @@
  .status {
      padding: 0.65em 0.7em 0.8em 0.8em;
      border-bottom: 1px solid;
+     border-bottom-color: inherit;
+     border-left: 4px rgba(255, 48, 16, 0.65);
+     border-left-style: inherit;
  }
  .muted button {
    margin-left: auto;
diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js
index 7129852d..59d5a7de 100644
--- a/src/services/style_setter/style_setter.js
+++ b/src/services/style_setter/style_setter.js
@@ -45,6 +45,7 @@ const setStyle = (href, commit) => {
     styleSheet.insertRule(`a { color: ${colors['base08']}`, 'index-max')
     styleSheet.insertRule(`body { color: ${colors['base05']}`, 'index-max')
     styleSheet.insertRule(`.base05-border { border-color: ${colors['base05']}`, 'index-max')
+    styleSheet.insertRule(`.base03-border { border-color: ${colors['base03']}`, 'index-max')
     body.style.display = 'initial'
   }
   cssEl.addEventListener('load', setDynamic)