Jelajahi Sumber

Update CW for comments

Daniel Supernault 6 tahun lalu
induk
melakukan
9ccada5b0b

+ 7 - 4
resources/assets/js/components/PostComponent.vue

@@ -124,10 +124,13 @@
                       <div class="comments">
                         <div v-for="(reply, index) in results" class="pb-3" :key="'tl' + reply.id + '_' + index">
                           <div v-if="reply.sensitive == true">
-                            <div class="card card-body shadow-none border border-left-blue py-3 px-1 text-center small">
-                              <p class="mb-0">This comment may contain sensitive material</p>
-                              <p class="font-weight-bold text-primary cursor-pointer mb-0" @click="reply.sensitive = false;">Show</p>
-                            </div>
+                            <span class="py-3">
+                              <a class="text-dark font-weight-bold mr-1" :href="reply.account.url" v-bind:title="reply.account.username">{{truncate(reply.account.username,15)}}</a>
+                              <span class="text-break">
+                                <span class="font-italic text-muted">This comment may contain sensitive material</span>
+                                <span class="text-primary cursor-pointer pl-1" @click="reply.sensitive = false;">Show</span>
+                              </span>
+                            </span>
                           </div>
                           <div v-else>
                             <p class="d-flex justify-content-between align-items-top read-more" style="overflow-y: hidden;">

+ 10 - 4
resources/assets/js/components/PostMenu.vue

@@ -6,8 +6,8 @@
 			</button>
 			<div class="dropdown-menu dropdown-menu-right">
 				<a class="dropdown-item font-weight-bold text-decoration-none" :href="status.url">Go to post</a>
-				<a class="dropdown-item font-weight-bold text-decoration-none" href="#">Share</a>
-				<a class="dropdown-item font-weight-bold text-decoration-none" href="#">Embed</a>
+				<!-- <a class="dropdown-item font-weight-bold text-decoration-none" href="#">Share</a>
+				<a class="dropdown-item font-weight-bold text-decoration-none" href="#">Embed</a> -->
 				<span v-if="statusOwner(status) == false">
 					<a class="dropdown-item font-weight-bold" :href="reportUrl(status)">Report</a>
 				</span>
@@ -54,8 +54,9 @@
 						<div class="modal-body">
 							<div class="list-group">
 								<a class="list-group-item font-weight-bold text-decoration-none" :href="status.url">Go to post</a>
-								<a class="list-group-item font-weight-bold text-decoration-none" :href="status.url">Share</a>
-								<a class="list-group-item font-weight-bold text-decoration-none" :href="status.url">Embed</a>
+								<!-- <a class="list-group-item font-weight-bold text-decoration-none" :href="status.url">Share</a>
+								<a class="list-group-item font-weight-bold text-decoration-none" :href="status.url">Embed</a> -->
+								<a class="list-group-item font-weight-bold text-decoration-none" href="#" @click="hidePost(status)">Hide</a>
 								<span v-if="statusOwner(status) == false">
 									<a class="list-group-item font-weight-bold text-decoration-none" :href="reportUrl(status)">Report</a>
 									<a class="list-group-item font-weight-bold text-decoration-none" v-on:click="muteProfile(status)" href="#">Mute Profile</a>
@@ -157,6 +158,11 @@
 				$('#mt_pid_'+this.status.id).modal('hide');
 			},
 
+			hidePost(status) {
+				status.sensitive = true;
+				$('#mt_pid_'+status.id).modal('hide');
+			},
+
 			moderatePost(status, action, $event) {
 				let username = status.account.username;
 				switch(action) {