mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	refactor: moved ip-blacklist and post-queue styles/tpls to themes
This is a breaking change!, re: #8580
This commit is contained in:
		| @@ -16,7 +16,6 @@ | |||||||
| @import "./manage/registration"; | @import "./manage/registration"; | ||||||
| @import "./manage/users"; | @import "./manage/users"; | ||||||
| @import "./manage/admins-mods"; | @import "./manage/admins-mods"; | ||||||
| @import "../post-queue"; |  | ||||||
| @import "./appearance/customise"; | @import "./appearance/customise"; | ||||||
| @import "./appearance/themes"; | @import "./appearance/themes"; | ||||||
| @import "./extend/plugins"; | @import "./extend/plugins"; | ||||||
| @@ -30,7 +29,6 @@ | |||||||
| @import "./settings"; | @import "./settings"; | ||||||
|  |  | ||||||
| @import "../flags"; | @import "../flags"; | ||||||
| @import "./manage/ip-blacklist"; |  | ||||||
|  |  | ||||||
| @import "./modules/alerts"; | @import "./modules/alerts"; | ||||||
| @import "./modules/selectable"; | @import "./modules/selectable"; | ||||||
|   | |||||||
| @@ -1,7 +0,0 @@ | |||||||
| #blacklist-rules { |  | ||||||
| 	width: 100%; |  | ||||||
| 	height: 357px; |  | ||||||
| 	display: block; |  | ||||||
| 	border: 1px solid #eee; |  | ||||||
| 	padding: 5px 10px; |  | ||||||
| } |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| /* |  | ||||||
| 	Post queue page CSS |  | ||||||
| 	  - Originally in ACP |  | ||||||
| 	  - Now available in front-end for global mods as well |  | ||||||
| */ |  | ||||||
| .posts-list { |  | ||||||
|     .topic-title { |  | ||||||
|         word-break: break-word; |  | ||||||
|     } |  | ||||||
|     .post-content { |  | ||||||
|         word-break: break-word; |  | ||||||
|     } |  | ||||||
|     .post-content-editable { |  | ||||||
|         textarea { |  | ||||||
|             width: 100%; |  | ||||||
|             height: 300px; |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @@ -18,7 +18,7 @@ globalModsController.ipBlacklist = async function (req, res, next) { | |||||||
| 		meta.blacklist.get(), | 		meta.blacklist.get(), | ||||||
| 		analytics.getBlacklistAnalytics(), | 		analytics.getBlacklistAnalytics(), | ||||||
| 	]); | 	]); | ||||||
| 	res.render('admin/manage/ip-blacklist', { | 	res.render('ip-blacklist', { | ||||||
| 		title: '[[pages:ip-blacklist]]', | 		title: '[[pages:ip-blacklist]]', | ||||||
| 		rules: rules, | 		rules: rules, | ||||||
| 		analytics: analyticsData, | 		analytics: analyticsData, | ||||||
|   | |||||||
| @@ -221,7 +221,7 @@ modsController.postQueue = async function (req, res, next) { | |||||||
| 	const stop = start + postsPerPage - 1; | 	const stop = start + postsPerPage - 1; | ||||||
| 	postData = postData.slice(start, stop + 1); | 	postData = postData.slice(start, stop + 1); | ||||||
|  |  | ||||||
| 	res.render('admin/manage/post-queue', { | 	res.render('post-queue', { | ||||||
| 		title: '[[pages:post-queue]]', | 		title: '[[pages:post-queue]]', | ||||||
| 		posts: postData, | 		posts: postData, | ||||||
| 		allCategories: allCategories, | 		allCategories: allCategories, | ||||||
|   | |||||||
| @@ -29,8 +29,6 @@ var buildImports = { | |||||||
| 			'@import (inline) "../public/vendor/colorpicker/colorpicker.css";', | 			'@import (inline) "../public/vendor/colorpicker/colorpicker.css";', | ||||||
| 			'@import (inline) "../node_modules/cropperjs/dist/cropper.css";', | 			'@import (inline) "../node_modules/cropperjs/dist/cropper.css";', | ||||||
| 			'@import "../../public/less/flags.less";', | 			'@import "../../public/less/flags.less";', | ||||||
| 			'@import "../../public/less/post-queue.less";', |  | ||||||
| 			'@import "../../public/less/admin/manage/ip-blacklist.less";', |  | ||||||
| 			'@import "../../public/less/generics.less";', | 			'@import "../../public/less/generics.less";', | ||||||
| 			'@import "../../public/less/mixins.less";', | 			'@import "../../public/less/mixins.less";', | ||||||
| 			'@import "../../public/less/global.less";', | 			'@import "../../public/less/global.less";', | ||||||
|   | |||||||
| @@ -1,56 +0,0 @@ | |||||||
| <!-- IMPORT partials/breadcrumbs.tpl --> |  | ||||||
|  |  | ||||||
| <div class="row ip-blacklist"> |  | ||||||
| 	<div class="col-lg-12"> |  | ||||||
| 		<p class="lead"> |  | ||||||
| 			[[admin/manage/ip-blacklist:lead]] |  | ||||||
| 		</p> |  | ||||||
| 		<p> |  | ||||||
| 			[[admin/manage/ip-blacklist:description]] |  | ||||||
| 		</p> |  | ||||||
|  |  | ||||||
| 		<div class="row"> |  | ||||||
| 			<div class="col-sm-6"> |  | ||||||
| 				<div class="panel panel-default"> |  | ||||||
| 					<div class="panel-heading">[[admin/manage/ip-blacklist:active-rules]]</div> |  | ||||||
| 					<div class="panel-body"> |  | ||||||
| 						<textarea id="blacklist-rules">{rules}</textarea><br /> |  | ||||||
| 						<button type="button" class="btn btn-warning" data-action="test"> |  | ||||||
| 							<i class="fa fa-bomb"></i> [[admin/manage/ip-blacklist:validate]] |  | ||||||
| 						</button> |  | ||||||
| 						<button type="button" class="btn btn-primary" data-action="apply"> |  | ||||||
| 							<i class="fa fa-save"></i> [[admin/manage/ip-blacklist:apply]] |  | ||||||
| 						</button> |  | ||||||
| 					</div> |  | ||||||
| 				</div> |  | ||||||
| 				<div class="panel panel-default"> |  | ||||||
| 					<div class="panel-heading">[[admin/manage/ip-blacklist:hints]]</div> |  | ||||||
| 					<div class="panel-body"> |  | ||||||
| 						<p> |  | ||||||
| 							[[admin/manage/ip-blacklist:hint-1]] |  | ||||||
| 						</p> |  | ||||||
| 						<p> |  | ||||||
| 							[[admin/manage/ip-blacklist:hint-2]] |  | ||||||
| 						</p> |  | ||||||
| 					</div> |  | ||||||
| 				</div> |  | ||||||
| 			</div> |  | ||||||
| 			<div class="col-sm-6"> |  | ||||||
| 				<div class="panel panel-default"> |  | ||||||
| 					<div class="panel-body"> |  | ||||||
| 						<div><canvas id="blacklist:hourly" height="250"></canvas></div> |  | ||||||
| 					</div> |  | ||||||
| 					<div class="panel-footer"><small>[[admin/manage/ip-blacklist:analytics.blacklist-hourly]]</small></div> |  | ||||||
| 				</div> |  | ||||||
|  |  | ||||||
| 				<div class="panel panel-default"> |  | ||||||
| 					<div class="panel-body"> |  | ||||||
| 						<div><canvas id="blacklist:daily" height="250"></canvas></div> |  | ||||||
| 					</div> |  | ||||||
| 					<div class="panel-footer"><small>[[admin/manage/ip-blacklist:analytics.blacklist-daily]]</small></div> |  | ||||||
| 				</div> |  | ||||||
| 			</div> |  | ||||||
| 		</div> |  | ||||||
| 	</div> |  | ||||||
|  |  | ||||||
| </div> |  | ||||||
| @@ -1,74 +0,0 @@ | |||||||
| <!-- IMPORT partials/breadcrumbs.tpl --> |  | ||||||
|  |  | ||||||
| <div class="row"> |  | ||||||
| 	<div class="col-xs-12"> |  | ||||||
| 		<div class="post-queue panel panel-primary preventSlideout"> |  | ||||||
| 			<div class="panel-heading"> |  | ||||||
| 				[[admin/manage/post-queue:post-queue]] |  | ||||||
| 			</div> |  | ||||||
|  |  | ||||||
| 			<!-- IF !posts.length --> |  | ||||||
| 			<p class="panel-body"> |  | ||||||
| 				[[admin/manage/post-queue:description, {config.relative_path}/admin/settings/post#post-queue]] |  | ||||||
| 			</p> |  | ||||||
| 			<!-- ENDIF !posts.length --> |  | ||||||
|  |  | ||||||
| 			<div class="table-responsive"> |  | ||||||
| 				<table class="table table-striped posts-list"> |  | ||||||
| 					<thead> |  | ||||||
| 						<tr> |  | ||||||
| 							<th>[[admin/manage/post-queue:user]]</th> |  | ||||||
| 							<th>[[admin/manage/post-queue:category]] <i class="fa fa-info-circle" data-toggle="tooltip" title="[[admin/manage/post-queue:content-editable]]"></i></th> |  | ||||||
| 							<th>[[admin/manage/post-queue:title]] <i class="fa fa-info-circle" data-toggle="tooltip" title="[[admin/manage/post-queue:content-editable]]"></i></th> |  | ||||||
| 							<th>[[admin/manage/post-queue:content]] <i class="fa fa-info-circle" data-toggle="tooltip" title="[[admin/manage/post-queue:content-editable]]"></i></th> |  | ||||||
| 							<th>[[admin/manage/post-queue:posted]]</th> |  | ||||||
| 							<th></th> |  | ||||||
| 						</tr> |  | ||||||
| 					</thead> |  | ||||||
| 					<tbody> |  | ||||||
| 						<!-- BEGIN posts --> |  | ||||||
| 						<tr data-id="{posts.id}"> |  | ||||||
| 							<td class="col-md-1"> |  | ||||||
| 								<!-- IF posts.user.userslug --> |  | ||||||
| 								<a href="{config.relative_path}/uid/{posts.user.uid}">{posts.user.username}</a> |  | ||||||
| 								<!-- ELSE --> |  | ||||||
| 								{posts.user.username} |  | ||||||
| 								<!-- ENDIF posts.user.userslug --> |  | ||||||
| 							</td> |  | ||||||
| 							<td class="col-md-2 topic-category" {{{if posts.data.cid}}}data-editable="editable"{{{end}}}"> |  | ||||||
| 								<a href="{config.relative_path}/category/{posts.category.slug}"><!-- IF posts.category.icon --><span class="fa-stack"><i style="color: {posts.category.bgColor};" class="fa fa-circle fa-stack-2x"></i><i style="color: {posts.category.color};" class="fa fa-stack-1x fa-fw {posts.category.icon}"></i></span><!-- ENDIF posts.category.icon --> {posts.category.name}</a> |  | ||||||
| 							</td> |  | ||||||
| 							<td class="col-md-2 topic-title"> |  | ||||||
| 								<!-- IF posts.data.tid --> |  | ||||||
| 								<a href="{config.relative_path}/topic/{posts.data.tid}">[[admin/manage/post-queue:reply-to, {posts.topic.title}]]</a> |  | ||||||
| 								<!-- ENDIF posts.data.tid --> |  | ||||||
| 								{posts.data.title} |  | ||||||
| 							</td> |  | ||||||
| 							{{{if !posts.data.tid}}} |  | ||||||
| 							<td class="col-md-2 topic-title-editable hidden"> |  | ||||||
| 								<input class="form-control" type="text" value="{posts.data.title}"/> |  | ||||||
| 							</td> |  | ||||||
| 							{{{end}}} |  | ||||||
| 							<td class="col-md-5 post-content">{posts.data.content}</td> |  | ||||||
| 							<td class="col-md-5 post-content-editable hidden"> |  | ||||||
| 								<textarea class="form-control">{posts.data.rawContent}</textarea> |  | ||||||
| 							</td> |  | ||||||
| 							<td class="col-md-1"> |  | ||||||
| 								<span class="timeago" title={posts.data.timestampISO}></span> |  | ||||||
| 							</td> |  | ||||||
| 							<td class="col-md-1"> |  | ||||||
| 								<div class="btn-group pull-right"> |  | ||||||
| 									<button class="btn btn-success btn-xs" data-action="accept"><i class="fa fa-check"></i></button> |  | ||||||
| 									<button class="btn btn-danger btn-xs" data-action="delete"><i class="fa fa-times"></i></button> |  | ||||||
| 								</div> |  | ||||||
| 							</td> |  | ||||||
| 						</tr> |  | ||||||
| 						<!-- END posts --> |  | ||||||
| 					</tbody> |  | ||||||
| 				</table> |  | ||||||
| 			</div> |  | ||||||
|  |  | ||||||
| 			<!-- IMPORT partials/paginator.tpl --> |  | ||||||
| 		</div> |  | ||||||
| 	</div> |  | ||||||
| </div> |  | ||||||
		Reference in New Issue
	
	Block a user