Parcourir la source

Add admin forum info component

sbkwgh il y a 8 ans
Parent
commit
170a3a1016

+ 24 - 1
src/components/AdminForumInfo.vue

@@ -3,6 +3,9 @@
 		<div class='cateogry_widget__text'>
 			<div class='category_widget__text__title'>Forum info</div>
 		</div>
+		<fancy-input placeholder='Forum name' v-model='name'></fancy-input>
+		<fancy-input placeholder='Forum description' v-model='description'></fancy-input>
+		<loading-button :loading='loading'>Save settings</loading-button>
 	</div>
 </template>
 
@@ -13,7 +16,27 @@
 	import AjaxErrorHandler from '../assets/js/errorHandler'
 
 	export default {
-		name: 'AdminForumInfo'
+		name: 'AdminForumInfo',
+		components: {
+			FancyInput,
+			LoadingButton
+		},
+		data () {
+			return {
+				name: '',
+				description: '',
+				loading: false
+			}
+		},
+		mounted () {
+			this.axios
+				.get('/api/v1/settings')
+				.then(res => {
+					this.name = res.data.forumName
+					this.description = res.data.forumDescription
+				})
+				.catch(AjaxErrorHandler(this.$store))
+		}
 	}
 </script>
 

+ 1 - 1
src/components/routes/AdminModerationReports.vue

@@ -2,7 +2,7 @@
 	<div class='admin_moderation'>
 		<moderation-header selected-tab='reports'></moderation-header>
 
-		<confirm-modal v-model='removePostObj.showConfirmModal' @confirm='removePost' color='red'>
+		<confirm-modal v-model='removePostObj.showConfirmModal' @confirm='removePost' text='Remove' color='red'>
 			Are you sure you want to remove this post?
 		</confirm-modal>