Browse Source

Use new menu-button options parameter format, and call threadLock method

sbkwgh 8 years ago
parent
commit
befabc0972
1 changed files with 10 additions and 1 deletions
  1. 10 1
      src/components/routes/Thread.vue

+ 10 - 1
src/components/routes/Thread.vue

@@ -1,7 +1,13 @@
 <template>
 <template>
 	<div class='route_container'>
 	<div class='route_container'>
 		<div class='thread_side_bar'>
 		<div class='thread_side_bar'>
-			<menu-button :options='["Lock thread", "Remove posts"]' class=''>
+			<menu-button
+				:options='[
+					{ event: "lock_thread", value: thread.locked ? "Unlock thread" : "Lock thread" },
+					{ event: "remove_posts", value: "Remove posts" }
+				]'
+				@lock_thread='lockThread'
+			>
 				<button class='button'>
 				<button class='button'>
 					<span class='fa fa-cogs' style='margin-right: 0.25rem;'></span>
 					<span class='fa fa-cogs' style='margin-right: 0.25rem;'></span>
 					Manage thread
 					Manage thread
@@ -116,6 +122,9 @@
 			editorState () { return this.$store.state.thread.editor.show }
 			editorState () { return this.$store.state.thread.editor.show }
 		},
 		},
 		methods: {
 		methods: {
+			lockThread () {
+				
+			},
 			showEditor () {
 			showEditor () {
 				this.$store.commit('setThreadEditorState', true);
 				this.$store.commit('setThreadEditorState', true);
 			},
 			},