Sfoglia il codice sorgente

Only show reply thread button and reply post links if thread is not locked

sbkwgh 8 anni fa
parent
commit
985340c65f
1 ha cambiato i file con 8 aggiunte e 2 eliminazioni
  1. 8 2
      src/components/routes/Thread.vue

+ 8 - 2
src/components/routes/Thread.vue

@@ -14,7 +14,13 @@
 					Manage thread
 				</button>
 			</menu-button>
-			<button class='button' @click='replyThread' v-if='$store.state.username'>Reply to thread</button>
+			<button
+				class='button'
+				@click='replyThread'
+				v-if='$store.state.username && !$store.state.thread.locked'
+			>
+					Reply to thread
+			</button>
 			<post-scrubber
 				:posts='$store.state.thread.totalPostsCount'
 				:value='$route.params.post_number || 0'
@@ -67,7 +73,7 @@
 					@reply='replyUser'
 					@goToPost='goToPost'
 					:post='post'
-					:show-reply='true'
+					:show-reply='!$store.state.thread.locked'
 					:highlight='highlightedPostIndex === index'
 					:class='{"post--last": index === posts.length-1}'
 					ref='posts'