Prechádzať zdrojové kódy

Update RemotePost.vue, fix content warning button

Daniel Supernault 4 rokov pred
rodič
commit
7647e724bc

+ 3 - 3
resources/assets/js/components/RemotePost.vue

@@ -46,7 +46,7 @@
 					<div class="col-12 col-md-8 px-0 mx-0">
 							<div class="postPresenterContainer d-none d-flex justify-content-center align-items-center" style="background: #000;">
 								<div v-if="status.pf_type === 'photo'" class="w-100">
-									<photo-presenter :status="status"></photo-presenter>
+									<photo-presenter :status="status" v-on:togglecw="status.sensitive = false"></photo-presenter>
 								</div>
 
 								<div v-else-if="status.pf_type === 'video'" class="w-100">
@@ -106,12 +106,12 @@
 							<div class="card-body status-comments pt-0">
 								<div class="status-comment">
 									<div v-if="status.content.length" class="pt-3">
-										<div v-if="showCaption != true">
+										<div v-if="status.sensitive">
 											<span class="py-3">
 												<a class="text-dark font-weight-bold mr-1" :href="profileUrl" v-bind:title="status.account.username">{{truncate(status.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="showCaption = true">Show</span>
+													<span class="text-primary cursor-pointer pl-1" @click="status.sensitive = false">Show</span>
 												</span>
 											</span>
 										</div>