Explorar el Código

Add conditional thread lock message

sbkwgh hace 8 años
padre
commit
80e581fc12
Se han modificado 1 ficheros con 19 adiciones y 0 borrados
  1. 19 0
      src/components/routes/Thread.vue

+ 19 - 0
src/components/routes/Thread.vue

@@ -45,6 +45,12 @@
 			v-on:submit='addPost'
 		>
 		</input-editor>
+
+		<div class='locked_thread' v-if='$store.state.thread.locked'>
+			<h1>Thread locked</h1>
+			You can't post in this thread because it has been locked by an administrator
+		</div>
+
 		<div class='posts'>
 			<scroll-load
 				@loadNext='loadNextPosts'
@@ -319,6 +325,19 @@
 		}
 	}
 
+	.locked_thread {
+		h1 {
+			margin-top: 0;
+			margin-bottom: 0.5rem;
+		}
+
+		background-color: #fff;
+		padding: 2rem;
+		margin-bottom: 1rem;
+		width: 80%;
+		border-radius: 0.25rem;
+	}
+
 	.posts {
 		width: 80%;
 		background-color: #fff;