From ea80d5eac2412ff46c6771743f2b8a8c3c9d45e1 Mon Sep 17 00:00:00 2001
From: DW <36347199+chocological00@users.noreply.github.com>
Date: Sat, 16 May 2020 09:06:39 -0400
Subject: Local only indicator (#6291)

* Add Local only & public indicator

* Add local only & public indicator on renotes


remove visibility conditional

* Cleaner Style

* :v:

* Update note-header.vue

* Update note.vue

Co-authored-by: DW <chocological00@gitlab.com>
Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
---
 src/client/components/note-header.vue | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

(limited to 'src/client/components/note-header.vue')

diff --git a/src/client/components/note-header.vue b/src/client/components/note-header.vue
index 977aae10f6..93cf2cdf39 100644
--- a/src/client/components/note-header.vue
+++ b/src/client/components/note-header.vue
@@ -12,18 +12,19 @@
 		<router-link class="created-at" :to="note | notePage">
 			<mk-time :time="note.createdAt"/>
 		</router-link>
-		<span class="visibility" v-if="note.visibility != 'public'">
-			<fa v-if="note.visibility == 'home'" :icon="faHome"/>
-			<fa v-if="note.visibility == 'followers'" :icon="faUnlock"/>
-			<fa v-if="note.visibility == 'specified'" :icon="faEnvelope"/>
+		<span class="visibility" v-if="note.visibility !== 'public'">
+			<fa v-if="note.visibility === 'home'" :icon="faHome"/>
+			<fa v-if="note.visibility === 'followers'" :icon="faUnlock"/>
+			<fa v-if="note.visibility === 'specified'" :icon="faEnvelope"/>
 		</span>
+		<span class="localOnly" v-if="note.localOnly"><fa :icon="faBiohazard"/></span>
 	</div>
 </header>
 </template>
 
 <script lang="ts">
 import Vue from 'vue';
-import { faHome, faUnlock, faEnvelope, faMobileAlt, faBookmark } from '@fortawesome/free-solid-svg-icons';
+import { faHome, faUnlock, faEnvelope, faMobileAlt, faBookmark, faBiohazard } from '@fortawesome/free-solid-svg-icons';
 import { faBookmark as farBookmark } from '@fortawesome/free-regular-svg-icons';
 
 export default Vue.extend({
@@ -36,7 +37,7 @@ export default Vue.extend({
 
 	data() {
 		return {
-			faHome, faUnlock, faEnvelope, faMobileAlt, faBookmark, farBookmark
+			faHome, faUnlock, faEnvelope, faMobileAlt, faBookmark, farBookmark, faBiohazard
 		};
 	}
 });
@@ -97,6 +98,10 @@ export default Vue.extend({
 		> .visibility {
 			margin-left: 8px;
 		}
+
+		> .localOnly {
+			margin-left: 8px;
+		}
 	}
 }
 </style>
-- 
cgit v1.2.3-freya

