Explorar o código

Add no bans div

sbkwgh %!s(int64=8) %!d(string=hai) anos
pai
achega
3f3e98753b
Modificáronse 1 ficheiros con 24 adicións e 1 borrados
  1. 24 1
      src/components/routes/AdminModerationBannedUsers.vue

+ 24 - 1
src/components/routes/AdminModerationBannedUsers.vue

@@ -11,7 +11,7 @@
 			<button class='button button--blue' @click='toggleShowAddNewBanModal'>Add new ban</button>
 		</div>
 
-		<table class='admin_moderation__table'>
+		<table class='admin_moderation__table' v-if='bans.length'>
 			<tr>
 				<th>User</th>
 				<th>Ban type</th>
@@ -38,6 +38,11 @@
 			</tr>
 		</table>
 
+		<div class='admin_moderation__no_bans' v-else>
+			<span class='fa fa-thumbs-up'></span>
+			No banned users
+		</div>
+
 		<modal-window v-model='$store.state.moderation.showAddNewBanModal' width='30rem'>
 			<div class='admin_moderation__add_new_ban_modal'>
 				<h2>Ban or block a user</h2>
@@ -228,5 +233,23 @@
 			}
 			
 		}
+
+		@at-root #{&}__no_bans {
+			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;
+			}
+		}
 	}
 </style>