Quellcode durchsuchen

Use separate routes for each tab

sbkwgh vor 8 Jahren
Ursprung
Commit
f0a411cbac

+ 30 - 0
src/assets/scss/variables.scss

@@ -122,4 +122,34 @@ $color__lightblue--primary: #03A9F4;
 }
 .shadow_border--hover {
 	box-shadow: 0 0 0.3rem rgba(175, 175, 175, 0.25), 0 0.2rem 0.35rem rgba(175, 175, 175, 0.25);
+}
+
+
+.tab_button {
+	padding: 0.5rem 1rem;
+	border-radius: 0.2rem;
+	cursor: pointer;
+	transition: all 0.2s;
+	margin-right: 0.5rem;
+	border-bottom: #d4d4d4 0.2rem solid;
+	display: inline-block;
+
+	@include user-select(none);
+
+	&:hover {
+		background-color: $color__lightgray--darker;
+	}
+	&:active {
+		background-color: #dcdcdc;
+	}
+
+	@at-root #{&}--selected {
+		border-bottom: #c1c1c1 0.2rem solid;
+		background-color: $color__lightgray--darker;
+		cursor: default;
+
+		&:active {
+			background-color: $color__lightgray--darker;
+		}
+	}
 }

+ 2 - 2
src/components/routes/Admin.vue

@@ -4,7 +4,7 @@
 			<div 
 				class='admin__menu__item'
 				v-for='route in routes'
-				:class='{ "admin__menu__item--selected" : route.route === selected }'
+				:class='{ "admin__menu__item--selected" : route.route.includes(selected) }'
 				@click='$router.push("/admin/" + route.route)'
 			>
 				<div>
@@ -32,7 +32,7 @@
 				selected: null,
 				routes: [
 					{ title: 'Dashboard', route: 'dashboard', description: 'Quick links and stats about your forum', icon: 'fa-home' },
-					{ title: 'Moderation', route: 'moderation', description: 'View and respond to user reports', icon: 'fa-exclamation-circle' },
+					{ title: 'Moderation', route: 'moderation/reports', description: 'View and respond to user reports', icon: 'fa-exclamation-circle' },
 					{ title: 'Categories', route: 'categories', description: 'Add and remove thread categories', icon: 'fa-th' },
 					{ title: 'Back-up', route: 'backup', description: 'Download and restore forum data', icon: 'fa-cloud-download' }
 				]

+ 5 - 368
src/components/routes/AdminModeration.vue

@@ -1,243 +1,19 @@
 <template>
 	<div class='admin_moderation'>
-		<tab-view
-			:transparent='true'
-			:padding='true'
-			:tabs='["User reports", "Banned users"]'
-			v-model='showTab'
-		>
-			<div slot='User reports' class='admin_moderation__tab admin_moderation__tab--boom'>
-				Below are posts reported by users - to remove the thread or block the user, click 'More options&hellip;'
-
-				<confirm-modal v-model='removePostObj.showConfirmModal' @confirm='removePost' color='red'>
-					Are you sure you want to remove this post?
-				</confirm-modal>
-
-				<div class='admin_moderation__reports' v-if='reports.length'>
-
-					<div class='admin_moderation__report admin_moderation__report--header'>
-						<div class='admin_moderation__report__post admin_moderation__report--cell_border admin_moderation__report--cell_border-hidden'>
-							Post and thread reported
-						</div>
-						<div class='admin_moderation__report__reason admin_moderation__report--cell_border admin_moderation__report--cell_border-hidden'>Report reason</div>
-						<div class='admin_moderation__report__flagged_by admin_moderation__report--cell_border admin_moderation__report--cell_border-hidden'>
-							Reported by user
-						</div>
-						<div class='admin_moderation__report__actions'>
-							Actions
-						</div>
-					</div>				
-
-					<div class='admin_moderation__report' v-for='(report, $index) in reports'>
-						<div class='admin_moderation__report__post admin_moderation__report--cell_border'>
-							<div class='admin_moderation__report__post__header'>
-								<div class='admin_moderation__report__post__thread'>{{report.Post.Thread.name}}</div>
-								<div class='admin_moderation__report__post__user'>{{report.Post.User.username}}</div>
-							</div>
-							<div class='admin_moderation__report__post__content'>{{report.Post.content | stripTags | truncate(150)}}</div>
-						</div>
-						<div class='admin_moderation__report__reason admin_moderation__report--cell_border'>{{report.reason}}</div>
-						<div class='admin_moderation__report__flagged_by admin_moderation__report--cell_border'>
-							<avatar-icon class='admin_moderation__report__flagged_by__avatar' :user='report.FlaggedByUser'></avatar-icon>
-							<div class='admin_moderation__report__flagged_by__text_info'>
-								<div class='admin_moderation__report__flagged_by__user'>{{report.FlaggedByUser.username}}</div>
-								<div class='admin_moderation__report__flagged_by__date'>{{report.createdAt| formatDate}}</div>
-							</div>
-						</div>
-						<div class='admin_moderation__report__actions'>
-							<button class='button button--red' @click='removePost(report, $index)'>Remove post</button>
-							<menu-button
-								@delete='deleteReport(report.id, $index)'
-								:options='reportMenuOptions'
-							>
-								<button class='button'>More options&hellip;</button>
-							</menu-button>
-						</div>
-					</div>
-				</div>
-				<div class='admin_moderation__no_reports' v-else>
-					<span class='fa fa-hand-peace-o'></span>
-					No user reports
-				</div>
-			</div>
-			<div slot='Banned users' class='admin_moderation__tab'>
-
-				<div class='admin_moderation__header'>
-					<div>
-						Remove or edit banned users below, or add a new ban
-					</div>
-					<button class='button button--blue' @click='toggleShowAddNewBanModal'>Add new ban</button>
-				</div>
-
-				<table class='admin_moderation__table'>
-					<tr>
-						<th>User</th>
-						<th>Ban type</th>
-						<th>Date banned</th>
-						<th>Message</th>
-					</tr>
-					<tr v-for='ban in bans'>
-						<td>{{ban.user}}</td>
-						<td>{{ban.type}}</td>
-						<td>{{ban.date | formatDate}}</td>
-						<td>
-							<template v-if='ban.message'>{{ban.message}}</template>
-							<i v-else>No message given</i>
-						</td>
-					</tr>
-				</table>
-
-				<modal-window v-model='showAddNewBanModal' width='30rem'>
-					<div class='admin_moderation__add_new_ban_modal'>
-						<h2>Ban or block a user</h2>
-						<p>Search for the user to ban, then select the relevant ban type for the user</p>
-
-						<div>
-							<fancy-input placeholder='Username to ban' v-model='username' width='15rem' :large='true'></fancy-input>
-						</div>
-
-						<div>
-							<fancy-input placeholder='Message to user (optional)' v-model='message' width='15rem' :large='true'></fancy-input>
-						</div>
-
-						<div>
-							<select-button
-								:options='options'
-								name='test'
-								v-model='selectedOption'
-							>
-							</select-button>
-						</div>
-
-						<div>
-							<button class='button button--modal' @click='toggleShowAddNewBanModal'>Cancel</button>
-							<button class='button button--modal button--green'>Add ban</button>
-						</div>
-					</div>
-				</modal-window>
-			</div>
-		</tab-view>
+		
+		<router-view></router-view>
 	</div>
 </template>
 
 <script>
-	import TabView from '../TabView'
-	import ModalWindow from '../ModalWindow'
-	import FancyInput from '../FancyInput'
-	import SelectButton from '../SelectButton'
-	import MenuButton from '../MenuButton'
-	import AvatarIcon from '../AvatarIcon'
-	import ConfirmModal from '../ConfirmModal'
-
-	import AjaxErrorHandler from '../../assets/js/errorHandler'
-
 	export default {
-		name: 'AdminDashboard',
-		components: {
-			TabView,
-			ModalWindow,
-			FancyInput,
-			SelectButton,
-			MenuButton,
-			AvatarIcon,
-			ConfirmModal
-		},
+		name: 'AdminModeration',
 		data () {
-			return {
-				showTab: 0,
-				showAddNewBanModal: false,
-				username: '',
-				message: '',
-				options: [
-					{ name: "Select a ban type", disabled: true },
-					{ name: "Block user's known ip addresses", value: "ip" },
-					{ name: "Ban from creating new threads", value: "thread"},
-					{ name: "Ban from replying to threads", value: "post"}
-				],
-				selectedOption: 0,
-
-				reportMenuOptions: [
-					{ value: "Delete report", event: 'delete' },
-					{ value: "Ban or block user" },
-					{ value: "Remove thread" }
-				],
-
-				user: {
-					username: 'Username',
-					color: '#9bd0eb'
-				},
-
-				bans_: [],
-				reports: [],
-
-				removePostObj: {
-					showConfirmModal: false,
-					report: null,
-					index: null
-				}
-			}
-		},
-		computed: {
-			bans () {
-				return this.bans_.map(ban => {
-					let type = ban.type
-
-					if(type === 'ip') {
-						ban.type = 'IP block'
-					} else if (type === 'thread') {
-						ban.type = 'New threads'
-					} else {
-						ban.type = 'New threads and replies'
-					}
-
-					return ban
-				})
-			}
-		},
-		methods: {
-			toggleShowAddNewBanModal () {
-				this.showAddNewBanModal = !this.showAddNewBanModal
-			},
-			deleteReport (id, index) {
-				this.axios
-					.delete('/api/v1/report/' + id)
-					.then(_ => {
-						this.reports.splice(index, 1)
-					})
-					.catch(AjaxErrorHandler())
-			},
-			removePost (report, index) {
-				if(report) {
-					this.removePostObj.report = report
-					this.removePostObj.index = index
-
-					this.removePostObj.showConfirmModal = true
-				} else {
-					this.axios
-						.delete('/api/v1/post/' + this.removePostObj.report.Post.id)
-						.then(_ => {
-							return this.axios.delete('/api/v1/report/' + this.removePostObj.report.id)
-						})
-						.then(_ => {
-							this.reports.splice(this.removePostObj.index, 1)
-						})
-						.catch(AjaxErrorHandler())
-				}
-			
-			},
-			emit () {
-				console.log(arguments)
-			}
+			return {}
 		},
+		methods: {},
 		mounted () {
 			this.$store.dispatch('setTitle', 'admin | moderation')
-
-			this.axios
-				.get('/api/v1/report')
-				.then(res => {
-					this.reports = res.data
-				})
-				.catch(AjaxErrorHandler())
 		}
 	}
 </script>
@@ -248,144 +24,5 @@
 	.admin_moderation {
 		padding: 1rem;
 		padding-top: 0.5rem;
-
-		@at-root #{&}__tab {
-			height: 100%;
-		}
-
-		@at-root #{&}__reports {
-			margin-top: 1rem;
-			@extend .shadow_border;
-
-			border-radius: 0.25rem;
-			&> :first-child {
-				border-radius: 0.25rem 0.25rem 0 0;
-			}
-			&> :last-child {
-				border-radius: 0 0 0.25rem 0.25rem;
-			}
-		}
-		@at-root #{&}__no_reports {
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			justify-content: center;
-			padding-top: 5rem;
-			font-size: 2rem;
-			user-select: none;
-			cursor: default;
-			transition: none;
-			color: $color__gray--darkest;
-
-			span {
-				font-size: 4rem;
-				color: $color__gray--darker;
-			}
-		}
-
-
-		@at-root #{&}__report {
-			display: flex;
-			background-color: #fff;
-			border-bottom: thin solid $color__lightgray--primary;
-			padding: 0.5rem;
-
-
-			@at-root #{&}--header {
-				font-weight: bold;
-			}
-			@at-root #{&}--cell_border {
-				padding-right: 0.5rem;
-				margin-right: 0.5rem;
-				border-right: thin solid $color__lightgray--primary;
-
-				@at-root #{&}-hidden {
-					border-right-color: transparent;
-				}
-			}
-
-			@at-root #{&}__post {
-				width: 40%;
-
-				@at-root #{&}__header {
-					display: flex;
-					justify-content: space-between;
-				}
-				@at-root #{&}__thread {
-					font-size: 1rem;
-					text-decoration: underline;
-		
-				}
-				@at-root #{&}__content {
-
-				}
-			}
-			@at-root #{&}__reason {
-				width: 15%;
-			}
-			@at-root #{&}__flagged_by {
-				width: 20%;
-				display: flex;
-
-			
-				@at-root #{&}__text_info {
-					margin-left: 0.5rem;
-					display: flex;
-					flex-direction: column;
-				}
-				@at-root #{&}__date {
-					color: $color__darkgray--primary;
-				}
-			}
-			@at-root #{&}__actions {
-				width: 25%;
-				display: flex;
-				align-items: center;
-
-				.button--red {
-					margin-right: 0.5rem;
-				}
-			}
-		}
-
-
-		@at-root #{&}__header {
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-		}
-
-		@at-root #{&}__add_new_ban_modal {
-			padding: 1rem;
-
-			h2 {
-				padding: 0;
-				margin: 0;
-				margin-bottom: -0.5rem;
-			}
-		}
-
-		@at-root #{&}__table {
-			width: calc(100%);
-			overflow: hidden;
-			margin-top: 1rem;
-			padding: 0.5rem;
-			background-color: #fff;
-			border-radius: 0.25rem;
-			border-collapse: collapse;
-
-			@extend .shadow_border;
-			
-			td, th {
-				padding: 0.5rem;
-			}
-			th {
-				text-align: left;
-			}
-			tr:nth-child(even) {
-				background-color: $color__lightgray--darker;
-			}
-			
-		}
 	}
 </style>

+ 179 - 0
src/components/routes/AdminModerationBannedUsers.vue

@@ -0,0 +1,179 @@
+<template>
+	<div class='admin_moderation'>
+		<div class='admin_moderation__tabs'>
+			<div class='tab_button' @click='$router.push("reports")'>Reports</div>
+			<div class='tab_button tab_button--selected'>Banned users</div>
+		</div>
+		<div class='admin_moderation__header'>
+			<div>
+				Remove or edit banned users below, or add a new ban
+			</div>
+			<button class='button button--blue' @click='toggleShowAddNewBanModal'>Add new ban</button>
+		</div>
+
+		<table class='admin_moderation__table'>
+			<tr>
+				<th>User</th>
+				<th>Ban type</th>
+				<th>Date banned</th>
+				<th>Message</th>
+			</tr>
+			<tr v-for='ban in bans'>
+				<td>{{ban.user}}</td>
+				<td>{{ban.type}}</td>
+				<td>{{ban.date | formatDate}}</td>
+				<td>
+					<template v-if='ban.message'>{{ban.message}}</template>
+					<i v-else>No message given</i>
+				</td>
+			</tr>
+		</table>
+
+		<modal-window v-model='showAddNewBanModal' width='30rem'>
+			<div class='admin_moderation__add_new_ban_modal'>
+				<h2>Ban or block a user</h2>
+				<p>Search for the user to ban, then select the relevant ban type for the user</p>
+
+				<div>
+					<fancy-input placeholder='Username to ban' v-model='username' width='15rem' :large='true'></fancy-input>
+				</div>
+
+				<div>
+					<fancy-input placeholder='Message to user (optional)' v-model='message' width='15rem' :large='true'></fancy-input>
+				</div>
+
+				<div>
+					<select-button
+						:options='options'
+						name='test'
+						v-model='selectedOption'
+					>
+					</select-button>
+				</div>
+
+				<div>
+					<button class='button button--modal' @click='toggleShowAddNewBanModal'>Cancel</button>
+					<button class='button button--modal button--green'>Add ban</button>
+				</div>
+			</div>
+		</modal-window>
+	</div>
+</template>
+
+<script>
+	import TabView from '../TabView'
+	import ModalWindow from '../ModalWindow'
+	import FancyInput from '../FancyInput'
+	import SelectButton from '../SelectButton'
+	import MenuButton from '../MenuButton'
+	import AvatarIcon from '../AvatarIcon'
+	import ConfirmModal from '../ConfirmModal'
+
+	import AjaxErrorHandler from '../../assets/js/errorHandler'
+
+	export default {
+		name: 'AdminDashboard',
+		components: {
+			TabView,
+			ModalWindow,
+			FancyInput,
+			SelectButton,
+			MenuButton,
+			AvatarIcon,
+			ConfirmModal
+		},
+		data () {
+			return {
+				showAddNewBanModal: false,
+				username: '',
+				message: '',
+				options: [
+					{ name: "Select a ban type", disabled: true },
+					{ name: "Block user's known ip addresses", value: "ip" },
+					{ name: "Ban from creating new threads", value: "thread"},
+					{ name: "Ban from replying to threads", value: "post"}
+				],
+				selectedOption: 0,
+
+				bans_: []
+			}
+		},
+		computed: {
+			bans () {
+				return this.bans_.map(ban => {
+					let type = ban.type
+
+					if(type === 'ip') {
+						ban.type = 'IP block'
+					} else if (type === 'thread') {
+						ban.type = 'New threads'
+					} else {
+						ban.type = 'New threads and replies'
+					}
+
+					return ban
+				})
+			}
+		},
+		methods: {
+			toggleShowAddNewBanModal () {
+				this.showAddNewBanModal = !this.showAddNewBanModal
+			}
+		},
+		mounted () {
+			this.$store.dispatch('setTitle', 'admin | moderation')
+		}
+	}
+</script>
+
+<style lang='scss' scoped>
+	@import '../../assets/scss/variables.scss';
+
+	.admin_moderation {
+		padding: 1rem;
+		padding-top: 0.5rem;
+
+		@at-root #{&}__tabs {
+			margin-bottom: 1rem;
+		}
+
+		@at-root #{&}__header {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+		}
+
+		@at-root #{&}__add_new_ban_modal {
+			padding: 1rem;
+
+			h2 {
+				padding: 0;
+				margin: 0;
+				margin-bottom: -0.5rem;
+			}
+		}
+
+		@at-root #{&}__table {
+			width: calc(100%);
+			overflow: hidden;
+			margin-top: 1rem;
+			padding: 0.5rem;
+			background-color: #fff;
+			border-radius: 0.25rem;
+			border-collapse: collapse;
+
+			@extend .shadow_border;
+			
+			td, th {
+				padding: 0.5rem;
+			}
+			th {
+				text-align: left;
+			}
+			tr:nth-child(even) {
+				background-color: $color__lightgray--darker;
+			}
+			
+		}
+	}
+</style>

+ 256 - 0
src/components/routes/AdminModerationReports.vue

@@ -0,0 +1,256 @@
+<template>
+	<div class='admin_moderation'>
+		<div class='admin_moderation__tabs'>
+			<div class='tab_button tab_button--selected'>Reports</div>
+			<div class='tab_button' @click='$router.push("bans")'>Banned users</div>
+		</div>
+
+		Below are posts reported by users - to remove the thread or block the user, click 'More options&hellip;'
+
+		<confirm-modal v-model='removePostObj.showConfirmModal' @confirm='removePost' color='red'>
+			Are you sure you want to remove this post?
+		</confirm-modal>
+
+		<div class='admin_moderation__reports' v-if='reports.length'>
+
+			<div class='admin_moderation__report admin_moderation__report--header'>
+				<div class='admin_moderation__report__post admin_moderation__report--cell_border admin_moderation__report--cell_border-hidden'>
+					Post and thread reported
+				</div>
+				<div class='admin_moderation__report__reason admin_moderation__report--cell_border admin_moderation__report--cell_border-hidden'>Report reason</div>
+				<div class='admin_moderation__report__flagged_by admin_moderation__report--cell_border admin_moderation__report--cell_border-hidden'>
+					Reported by user
+				</div>
+				<div class='admin_moderation__report__actions'>
+					Actions
+				</div>
+			</div>				
+
+			<div class='admin_moderation__report' v-for='(report, $index) in reports'>
+				<div class='admin_moderation__report__post admin_moderation__report--cell_border'>
+					<div class='admin_moderation__report__post__header'>
+						<div class='admin_moderation__report__post__thread'>{{report.Post.Thread.name}}</div>
+						<div class='admin_moderation__report__post__user'>{{report.Post.User.username}}</div>
+					</div>
+					<div class='admin_moderation__report__post__content'>{{report.Post.content | stripTags | truncate(150)}}</div>
+				</div>
+				<div class='admin_moderation__report__reason admin_moderation__report--cell_border'>{{report.reason}}</div>
+				<div class='admin_moderation__report__flagged_by admin_moderation__report--cell_border'>
+					<avatar-icon class='admin_moderation__report__flagged_by__avatar' :user='report.FlaggedByUser'></avatar-icon>
+					<div class='admin_moderation__report__flagged_by__text_info'>
+						<div class='admin_moderation__report__flagged_by__user'>{{report.FlaggedByUser.username}}</div>
+						<div class='admin_moderation__report__flagged_by__date'>{{report.createdAt| formatDate}}</div>
+					</div>
+				</div>
+				<div class='admin_moderation__report__actions'>
+					<button class='button button--red' @click='removePost(report, $index)'>Remove post</button>
+					<menu-button
+						@delete='deleteReport(report.id, $index)'
+						:options='reportMenuOptions'
+					>
+						<button class='button'>More options&hellip;</button>
+					</menu-button>
+				</div>
+			</div>
+		</div>
+		<div class='admin_moderation__no_reports' v-else>
+			<span class='fa fa-hand-peace-o'></span>
+			No user reports
+		</div>
+	</div>
+</template>
+
+<script>
+	import TabView from '../TabView'
+	import ModalWindow from '../ModalWindow'
+	import FancyInput from '../FancyInput'
+	import SelectButton from '../SelectButton'
+	import MenuButton from '../MenuButton'
+	import AvatarIcon from '../AvatarIcon'
+	import ConfirmModal from '../ConfirmModal'
+
+	import AjaxErrorHandler from '../../assets/js/errorHandler'
+
+	export default {
+		name: 'AdminDashboard',
+		components: {
+			TabView,
+			ModalWindow,
+			FancyInput,
+			SelectButton,
+			MenuButton,
+			AvatarIcon,
+			ConfirmModal
+		},
+		data () {
+			return {
+				reportMenuOptions: [
+					{ value: "Delete report", event: 'delete' },
+					{ value: "Ban or block user" },
+					{ value: "Remove thread" }
+				],
+				reports: [],
+
+				removePostObj: {
+					showConfirmModal: false,
+					report: null,
+					index: null
+				}
+			}
+		},
+		methods: {
+			deleteReport (id, index) {
+				this.axios
+					.delete('/api/v1/report/' + id)
+					.then(_ => {
+						this.reports.splice(index, 1)
+					})
+					.catch(AjaxErrorHandler())
+			},
+			removePost (report, index) {
+				if(report) {
+					this.removePostObj.report = report
+					this.removePostObj.index = index
+
+					this.removePostObj.showConfirmModal = true
+				} else {
+					this.axios
+						.delete('/api/v1/post/' + this.removePostObj.report.Post.id)
+						.then(_ => {
+							return this.axios.delete('/api/v1/report/' + this.removePostObj.report.id)
+						})
+						.then(_ => {
+							this.reports.splice(this.removePostObj.index, 1)
+						})
+						.catch(AjaxErrorHandler())
+				}
+			
+			}
+		},
+		mounted () {
+			this.$store.dispatch('setTitle', 'admin | moderation')
+
+			this.axios
+				.get('/api/v1/report')
+				.then(res => {
+					this.reports = res.data
+				})
+				.catch(AjaxErrorHandler())
+		}
+	}
+</script>
+
+<style lang='scss' scoped>
+	@import '../../assets/scss/variables.scss';
+
+	.admin_moderation {
+		padding: 1rem;
+		padding-top: 0.5rem;
+
+		@at-root #{&}__tabs {
+			margin-bottom: 1rem;
+		}
+
+		@at-root #{&}__reports {
+			margin-top: 1rem;
+			@extend .shadow_border;
+
+			border-radius: 0.25rem;
+			&> :first-child {
+				border-radius: 0.25rem 0.25rem 0 0;
+			}
+			&> :last-child {
+				border-radius: 0 0 0.25rem 0.25rem;
+			}
+		}
+		@at-root #{&}__no_reports {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			padding-top: 5rem;
+			font-size: 2rem;
+			user-select: none;
+			cursor: default;
+			transition: none;
+			color: $color__gray--darkest;
+
+			span {
+				font-size: 4rem;
+				color: $color__gray--darker;
+			}
+		}
+
+
+		@at-root #{&}__report {
+			display: flex;
+			background-color: #fff;
+			border-bottom: thin solid $color__lightgray--primary;
+			padding: 0.5rem;
+
+
+			@at-root #{&}--header {
+				font-weight: bold;
+			}
+			@at-root #{&}--cell_border {
+				padding-right: 0.5rem;
+				margin-right: 0.5rem;
+				border-right: thin solid $color__lightgray--primary;
+
+				@at-root #{&}-hidden {
+					border-right-color: transparent;
+				}
+			}
+
+			@at-root #{&}__post {
+				width: 40%;
+
+				@at-root #{&}__header {
+					display: flex;
+					justify-content: space-between;
+				}
+				@at-root #{&}__thread {
+					font-size: 1rem;
+					text-decoration: underline;
+		
+				}
+				@at-root #{&}__content {
+
+				}
+			}
+			@at-root #{&}__reason {
+				width: 15%;
+			}
+			@at-root #{&}__flagged_by {
+				width: 20%;
+				display: flex;
+
+			
+				@at-root #{&}__text_info {
+					margin-left: 0.5rem;
+					display: flex;
+					flex-direction: column;
+				}
+				@at-root #{&}__date {
+					color: $color__darkgray--primary;
+				}
+			}
+			@at-root #{&}__actions {
+				width: 25%;
+				display: flex;
+				align-items: center;
+
+				.button--red {
+					margin-right: 0.5rem;
+				}
+			}
+		}
+
+
+		@at-root #{&}__header {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+		}
+	}
+</style>

+ 5 - 2
src/main.js

@@ -27,7 +27,8 @@ import SettingsAccount from './components/routes/SettingsAccount'
 
 import Admin from './components/routes/Admin'
 import AdminDashboard from './components/routes/AdminDashboard'
-import AdminModeration from './components/routes/AdminModeration'
+import AdminModerationReports from './components/routes/AdminModerationReports'
+import AdminModerationBannedUsers from './components/routes/AdminModerationBannedUsers'
 
 let { onResize } = require('./assets/js/flexBoxGridCorrect.js')
 
@@ -56,7 +57,9 @@ const router = new VueRouter({
 		] },
 		{ path: '/admin', redirect: '/admin/dashboard', component: Admin, children: [
 			{ path: 'dashboard', component: AdminDashboard },
-			{ path: 'moderation', component: AdminModeration },
+			{ path: 'moderation', redirect: '/admin/moderation/reports' },
+			{ path: 'moderation/reports', component: AdminModerationReports },
+			{ path: 'moderation/bans', component: AdminModerationBannedUsers }
 		] }
 	],
 	mode: 'history'