Browse Source

前端优化

懒得勤快 5 years ago
parent
commit
b3db008c04
28 changed files with 111 additions and 97 deletions
  1. 1 1
      src/Masuit.MyBlogs.Core/Configs/MappingProfile.cs
  2. 7 7
      src/Masuit.MyBlogs.Core/Controllers/CommentController.cs
  3. 6 6
      src/Masuit.MyBlogs.Core/Controllers/HomeController.cs
  4. 7 7
      src/Masuit.MyBlogs.Core/Controllers/MsgController.cs
  5. 13 13
      src/Masuit.MyBlogs.Core/Controllers/PostController.cs
  6. 1 1
      src/Masuit.MyBlogs.Core/Controllers/SeminarController.cs
  7. 4 4
      src/Masuit.MyBlogs.Core/Controllers/SubscribeController.cs
  8. 3 3
      src/Masuit.MyBlogs.Core/Extensions/Hangfire/HangfireBackJob.cs
  9. 10 10
      src/Masuit.MyBlogs.Core/Infrastructure/Repository/BaseRepository.cs
  10. 3 3
      src/Masuit.MyBlogs.Core/Infrastructure/Services/PostService.cs
  11. 1 1
      src/Masuit.MyBlogs.Core/Models/Enum/Status.cs
  12. 1 1
      src/Masuit.MyBlogs.Core/Properties/launchSettings.json
  13. 5 4
      src/Masuit.MyBlogs.Core/Views/Home/Index.cshtml
  14. 4 3
      src/Masuit.MyBlogs.Core/Views/Post/CompareVersion.cshtml
  15. 6 5
      src/Masuit.MyBlogs.Core/Views/Post/Details.cshtml
  16. 6 5
      src/Masuit.MyBlogs.Core/Views/Post/Details_Admin.cshtml
  17. 3 2
      src/Masuit.MyBlogs.Core/Views/Post/HistoryVersion.cshtml
  18. 3 2
      src/Masuit.MyBlogs.Core/Views/Post/HistoryVersion_Admin.cshtml
  19. 5 4
      src/Masuit.MyBlogs.Core/Views/Shared/_ArticleListAdvertisement.cshtml
  20. 4 3
      src/Masuit.MyBlogs.Core/Views/Shared/_Aside.cshtml
  21. 6 0
      src/Masuit.MyBlogs.Core/bundleconfig.json
  22. 6 2
      src/Masuit.MyBlogs.Core/wwwroot/Content/common/articlestyle.css
  23. 1 5
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/merge.js
  24. 0 0
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/merge.min.js
  25. 2 2
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/css/app.css
  26. 0 0
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/css/app.min.css
  27. 1 1
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/template/sidebar-left.html
  28. 2 2
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/views/post/postlist.html

+ 1 - 1
src/Masuit.MyBlogs.Core/Configs/MappingProfile.cs

@@ -56,7 +56,7 @@ namespace Masuit.MyBlogs.Core.Configs
             CreateMap<Post, PostCommand>().ReverseMap();
             CreateMap<Post, PostModelBase>();
             CreateMap<Post, PostHistoryVersion>().ForMember(p => p.Id, e => e.Ignore()).ForMember(v => v.PostId, e => e.MapFrom(p => p.Id));
-            CreateMap<Post, PostDto>().ForMember(p => p.CategoryName, e => e.MapFrom(p => p.Category.Name)).ForMember(p => p.CommentCount, e => e.MapFrom(p => p.Comment.Count(c => c.Status == Status.Pended))).ReverseMap();
+            CreateMap<Post, PostDto>().ForMember(p => p.CategoryName, e => e.MapFrom(p => p.Category.Name)).ForMember(p => p.CommentCount, e => e.MapFrom(p => p.Comment.Count(c => c.Status == Status.Published))).ReverseMap();
             CreateMap<PostCommand, PostDto>().ReverseMap();
             CreateMap<PostHistoryVersion, PostDto>().ForMember(p => p.CategoryName, e => e.MapFrom(p => p.Category.Name)).ReverseMap();
             CreateMap<Post, PostViewModel>().ForMember(p => p.CategoryName, e => e.MapFrom(p => p.Category.Name)).ForMember(p => p.PostDate, e => e.MapFrom(p => p.PostDate.ToString("yyyy-MM-dd HH:mm:ss"))).ForMember(p => p.ModifyDate, e => e.MapFrom(p => p.ModifyDate.ToString("yyyy-MM-dd HH:mm:ss"))).ReverseMap();

+ 7 - 7
src/Masuit.MyBlogs.Core/Controllers/CommentController.cs

@@ -63,7 +63,7 @@ namespace Masuit.MyBlogs.Core.Controllers
             var comment = dto.Mapper<Comment>();
             if (Regex.Match(dto.Content, CommonHelper.ModRegex).Length <= 0)
             {
-                comment.Status = Status.Pended;
+                comment.Status = Status.Published;
             }
 
             comment.CommentDate = DateTime.Now;
@@ -75,7 +75,7 @@ namespace Masuit.MyBlogs.Core.Controllers
                 comment.Email = user.Email;
                 if (user.IsAdmin)
                 {
-                    comment.Status = Status.Pended;
+                    comment.Status = Status.Published;
                     comment.IsMaster = true;
                 }
             }
@@ -98,7 +98,7 @@ namespace Masuit.MyBlogs.Core.Controllers
                 .Replace("{{time}}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))
                 .Replace("{{nickname}}", comment.NickName)
                 .Replace("{{content}}", comment.Content);
-            if (comment.Status == Status.Pended)
+            if (comment.Status == Status.Published)
             {
                 if (!comment.IsMaster)
                 {
@@ -158,7 +158,7 @@ namespace Masuit.MyBlogs.Core.Controllers
                 return ResultData(null, false, "您刚才已经投过票了,感谢您的参与!");
             }
 
-            var cm = await CommentService.GetAsync(c => c.Id == id && c.Status == Status.Pended) ?? throw new NotFoundException("评论不存在!");
+            var cm = await CommentService.GetAsync(c => c.Id == id && c.Status == Status.Published) ?? throw new NotFoundException("评论不存在!");
             cm.VoteCount++;
             bool b = CommentService.SaveChanges() > 0;
             if (b)
@@ -198,13 +198,13 @@ namespace Masuit.MyBlogs.Core.Controllers
                     });
                 }
             }
-            var parent = CommentService.GetPagesFromCache(page, size, c => c.PostId == id && c.ParentId == 0 && (c.Status == Status.Pended || CurrentUser.IsAdmin), c => c.CommentDate, false);
+            var parent = CommentService.GetPagesFromCache(page, size, c => c.PostId == id && c.ParentId == 0 && (c.Status == Status.Published || CurrentUser.IsAdmin), c => c.CommentDate, false);
             if (!parent.Data.Any())
             {
                 return ResultData(null, false, "没有评论");
             }
             total = parent.TotalCount;
-            var result = parent.Data.SelectMany(c => CommentService.GetSelfAndAllChildrenCommentsByParentId(c.Id).Where(x => (x.Status == Status.Pended || CurrentUser.IsAdmin))).ToList();
+            var result = parent.Data.SelectMany(c => CommentService.GetSelfAndAllChildrenCommentsByParentId(c.Id).Where(x => (x.Status == Status.Published || CurrentUser.IsAdmin))).ToList();
             if (total > 0)
             {
                 return ResultData(new
@@ -228,7 +228,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         public async Task<ActionResult> Pass(int id)
         {
             Comment comment = await CommentService.GetByIdAsync(id) ?? throw new NotFoundException("评论不存在!");
-            comment.Status = Status.Pended;
+            comment.Status = Status.Published;
             Post post = await PostService.GetByIdAsync(comment.PostId);
             bool b = await CommentService.SaveChangesAsync() > 0;
             if (b)

+ 6 - 6
src/Masuit.MyBlogs.Core/Controllers/HomeController.cs

@@ -55,7 +55,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         {
             var banners = AdsService.GetsByWeightedPrice(8, AdvertiseType.Banner).OrderBy(a => Guid.NewGuid()).ToList();
             var fastShares = FastShareService.GetAllFromCache(s => s.Sort).ToList();
-            var postsQuery = PostService.GetQuery<PostDto>(p => (p.Status == Status.Pended || CurrentUser.IsAdmin)); //准备文章的查询
+            var postsQuery = PostService.GetQuery<PostDto>(p => (p.Status == Status.Published || CurrentUser.IsAdmin)); //准备文章的查询
             var posts = postsQuery.Where(p => !p.IsFixedTop).OrderBy(OrderBy.ModifyDate.GetDisplay() + " desc").ToCachedPagedList(1, 15);
             posts.Data.InsertRange(0, postsQuery.Where(p => p.IsFixedTop).OrderByDescending(p => p.ModifyDate).ToList());
             var viewModel = GetIndexPageViewModel();
@@ -77,7 +77,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         public ActionResult Post([Optional]OrderBy? orderBy, [Range(1, int.MaxValue, ErrorMessage = "页码必须大于0")]int page = 1, [Range(1, 50, ErrorMessage = "页大小必须在0到50之间")]int size = 15)
         {
             var viewModel = GetIndexPageViewModel();
-            var postsQuery = PostService.GetQuery<PostDto>(p => (p.Status == Status.Pended || CurrentUser.IsAdmin)); //准备文章的查询
+            var postsQuery = PostService.GetQuery<PostDto>(p => (p.Status == Status.Published || CurrentUser.IsAdmin)); //准备文章的查询
             var posts = postsQuery.Where(p => !p.IsFixedTop).OrderBy((orderBy ?? OrderBy.ModifyDate).GetDisplay() + " desc").ToCachedPagedList(page, size);
             if (page == 1)
             {
@@ -100,7 +100,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         [Route("tag/{id}/{page:int?}/{size:int?}/{orderBy:int?}"), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "id", "page", "size", "orderBy" }, VaryByHeader = "Cookie")]
         public ActionResult Tag(string id, [Optional]OrderBy? orderBy, [Range(1, int.MaxValue, ErrorMessage = "页码必须大于0")]int page = 1, [Range(1, 50, ErrorMessage = "页大小必须在0到50之间")]int size = 15)
         {
-            var posts = PostService.GetQuery<PostDto>(p => p.Label.Contains(id) && (p.Status == Status.Pended || CurrentUser.IsAdmin)).OrderBy($"{nameof(PostDto.IsFixedTop)} desc,{(orderBy ?? OrderBy.ModifyDate).GetDisplay()} desc").ToCachedPagedList(page, size);
+            var posts = PostService.GetQuery<PostDto>(p => p.Label.Contains(id) && (p.Status == Status.Published || CurrentUser.IsAdmin)).OrderBy($"{nameof(PostDto.IsFixedTop)} desc,{(orderBy ?? OrderBy.ModifyDate).GetDisplay()} desc").ToCachedPagedList(page, size);
             var viewModel = GetIndexPageViewModel();
             ViewBag.Tag = id;
             viewModel.Posts = posts;
@@ -120,7 +120,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         public ActionResult Author(string author, [Optional]OrderBy? orderBy, [Range(1, int.MaxValue, ErrorMessage = "页码必须大于0")]int page = 1, [Range(1, 50, ErrorMessage = "页大小必须在0到50之间")]int size = 15)
         {
             Expression<Func<Post, bool>> where = p => p.Author.Equals(author) || p.Modifier.Equals(author) || p.Email.Equals(author) || p.PostHistoryVersion.Any(v => v.Modifier.Equals(author) || v.ModifierEmail.Equals(author));
-            where = where.And(p => p.Status == Status.Pended || CurrentUser.IsAdmin);
+            where = where.And(p => p.Status == Status.Published || CurrentUser.IsAdmin);
             var posts = PostService.GetQuery<PostDto>(where).OrderBy($"{nameof(PostDto.IsFixedTop)} desc,{(orderBy ?? OrderBy.ModifyDate).GetDisplay()} desc").ToCachedPagedList(page, size);
             var viewModel = GetIndexPageViewModel();
             ViewBag.Author = author;
@@ -143,7 +143,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         public async Task<ActionResult> Category(int id, [Optional]OrderBy? orderBy, [Range(1, int.MaxValue, ErrorMessage = "页码必须大于0")]int page = 1, [Range(1, 50, ErrorMessage = "页大小必须在0到50之间")]int size = 15)
         {
             var cat = await CategoryService.GetByIdAsync(id) ?? throw new NotFoundException("文章分类未找到");
-            var posts = PostService.GetQuery<PostDto>(p => p.CategoryId == cat.Id && (p.Status == Status.Pended || CurrentUser.IsAdmin)).OrderBy($"{nameof(PostDto.IsFixedTop)} desc,{(orderBy ?? OrderBy.ModifyDate).GetDisplay()} desc").ToCachedPagedList(page, size);
+            var posts = PostService.GetQuery<PostDto>(p => p.CategoryId == cat.Id && (p.Status == Status.Published || CurrentUser.IsAdmin)).OrderBy($"{nameof(PostDto.IsFixedTop)} desc,{(orderBy ?? OrderBy.ModifyDate).GetDisplay()} desc").ToCachedPagedList(page, size);
             var viewModel = GetIndexPageViewModel();
             viewModel.Posts = posts;
             ViewBag.Category = cat;
@@ -157,7 +157,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// <returns></returns>
         private HomePageViewModel GetIndexPageViewModel()
         {
-            var postsQuery = PostService.GetQuery<PostDto>(p => (p.Status == Status.Pended || CurrentUser.IsAdmin)); //准备文章的查询
+            var postsQuery = PostService.GetQuery<PostDto>(p => (p.Status == Status.Published || CurrentUser.IsAdmin)); //准备文章的查询
             var notices = NoticeService.GetPagesFromCache<DateTime, NoticeDto>(1, 5, n => (n.Status == Status.Display || CurrentUser.IsAdmin), n => n.ModifyDate, false); //加载前5条公告
             var cats = CategoryService.GetQueryFromCache<string, CategoryDto>(c => c.Status == Status.Available, c => c.Name).ToList(); //加载分类目录
             var hotSearches = RedisHelper.Get<List<KeywordsRank>>("SearchRank:Week").Take(10).ToList(); //热词统计

+ 7 - 7
src/Masuit.MyBlogs.Core/Controllers/MsgController.cs

@@ -47,7 +47,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         [ResponseCache(Duration = 600, VaryByHeader = "Cookie"), Route("msg")]
         public ActionResult Index()
         {
-            ViewBag.TotalCount = LeaveMessageService.Count(m => m.ParentId == 0 && m.Status == Status.Pended);
+            ViewBag.TotalCount = LeaveMessageService.Count(m => m.ParentId == 0 && m.Status == Status.Published);
             return CurrentUser.IsAdmin ? View("Index_Admin") : View();
         }
 
@@ -78,13 +78,13 @@ namespace Masuit.MyBlogs.Core.Controllers
                     });
                 }
             }
-            var parent = LeaveMessageService.GetPagesNoTracking(page, size, m => m.ParentId == 0 && (m.Status == Status.Pended || CurrentUser.IsAdmin), m => m.PostDate, false);
+            var parent = LeaveMessageService.GetPagesNoTracking(page, size, m => m.ParentId == 0 && (m.Status == Status.Published || CurrentUser.IsAdmin), m => m.PostDate, false);
             if (!parent.Data.Any())
             {
                 return ResultData(null, false, "没有留言");
             }
             total = parent.TotalCount;
-            var qlist = parent.Data.SelectMany(c => LeaveMessageService.GetSelfAndAllChildrenMessagesByParentId(c.Id)).Where(c => c.Status == Status.Pended || CurrentUser.IsAdmin);
+            var qlist = parent.Data.SelectMany(c => LeaveMessageService.GetSelfAndAllChildrenMessagesByParentId(c.Id)).Where(c => c.Status == Status.Published || CurrentUser.IsAdmin);
             if (total > 0)
             {
                 return ResultData(new
@@ -122,7 +122,7 @@ namespace Masuit.MyBlogs.Core.Controllers
             var msg = dto.Mapper<LeaveMessage>();
             if (Regex.Match(dto.Content, CommonHelper.ModRegex).Length <= 0)
             {
-                msg.Status = Status.Pended;
+                msg.Status = Status.Published;
             }
 
             msg.PostDate = DateTime.Now;
@@ -134,7 +134,7 @@ namespace Masuit.MyBlogs.Core.Controllers
                 msg.Email = user.Email;
                 if (user.IsAdmin)
                 {
-                    msg.Status = Status.Pended;
+                    msg.Status = Status.Published;
                     msg.IsMaster = true;
                 }
             }
@@ -152,7 +152,7 @@ namespace Masuit.MyBlogs.Core.Controllers
             HttpContext.Session.Set("msg", msg.Content.RemoveHtmlTag().Trim());
             var email = CommonHelper.SystemSettings["ReceiveEmail"];
             var content = System.IO.File.ReadAllText(HostEnvironment.WebRootPath + "/template/notify.html").Replace("{{title}}", "网站留言板").Replace("{{time}}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")).Replace("{{nickname}}", msg.NickName).Replace("{{content}}", msg.Content);
-            if (msg.Status == Status.Pended)
+            if (msg.Status == Status.Published)
             {
                 if (!msg.IsMaster)
                 {
@@ -200,7 +200,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         public ActionResult Pass(int id)
         {
             var msg = LeaveMessageService.GetById(id);
-            msg.Status = Status.Pended;
+            msg.Status = Status.Published;
             bool b = LeaveMessageService.SaveChanges() > 0;
 #if !DEBUG
             var pid = msg.ParentId == 0 ? msg.Id : LeaveMessageService.GetParentMessageIdByChildId(id);

+ 13 - 13
src/Masuit.MyBlogs.Core/Controllers/PostController.cs

@@ -62,11 +62,11 @@ namespace Masuit.MyBlogs.Core.Controllers
         [Route("{id:int}/{kw}"), Route("{id:int}"), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "id" }, VaryByHeader = "Cookie")]
         public async Task<ActionResult> Details(int id, string kw)
         {
-            var post = await PostService.GetAsync(p => p.Id == id && (p.Status == Status.Pended || CurrentUser.IsAdmin)) ?? throw new NotFoundException("文章未找到");
+            var post = await PostService.GetAsync(p => p.Id == id && (p.Status == Status.Published || CurrentUser.IsAdmin)) ?? throw new NotFoundException("文章未找到");
             ViewBag.Keyword = post.Keyword + "," + post.Label;
             var modifyDate = post.ModifyDate;
-            ViewBag.Next = PostService.GetFromCache<DateTime, PostModelBase>(p => p.ModifyDate > modifyDate && (p.Status == Status.Pended || CurrentUser.IsAdmin), p => p.ModifyDate);
-            ViewBag.Prev = PostService.GetFromCache<DateTime, PostModelBase>(p => p.ModifyDate < modifyDate && (p.Status == Status.Pended || CurrentUser.IsAdmin), p => p.ModifyDate, false);
+            ViewBag.Next = PostService.GetFromCache<DateTime, PostModelBase>(p => p.ModifyDate > modifyDate && (p.Status == Status.Published || CurrentUser.IsAdmin), p => p.ModifyDate);
+            ViewBag.Prev = PostService.GetFromCache<DateTime, PostModelBase>(p => p.ModifyDate < modifyDate && (p.Status == Status.Published || CurrentUser.IsAdmin), p => p.ModifyDate, false);
             if (!string.IsNullOrEmpty(kw))
             {
                 ViewData["keywords"] = post.Content.Contains(kw) ? $"['{kw}']" : SearchEngine.LuceneIndexSearcher.CutKeywords(kw).ToJsonString();
@@ -97,7 +97,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         [Route("{id:int}/history"), Route("{id:int}/history/{page:int}/{size:int}"), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "id", "page", "size" }, VaryByHeader = "Cookie")]
         public async Task<ActionResult> History(int id, [Range(1, int.MaxValue, ErrorMessage = "页码必须大于0")]int page = 1, [Range(1, 50, ErrorMessage = "页大小必须在0到50之间")]int size = 20)
         {
-            var post = await PostService.GetAsync(p => p.Id == id && (p.Status == Status.Pended || CurrentUser.IsAdmin)) ?? throw new NotFoundException("文章未找到");
+            var post = await PostService.GetAsync(p => p.Id == id && (p.Status == Status.Published || CurrentUser.IsAdmin)) ?? throw new NotFoundException("文章未找到");
             ViewBag.Primary = post;
             var list = PostHistoryVersionService.GetPages(page, size, v => v.PostId == id, v => v.ModifyDate, false);
             ViewBag.Ads = AdsService.GetByWeightedPrice(AdvertiseType.InPage, post.CategoryId);
@@ -130,7 +130,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         [Route("{id:int}/history/{v1:int}-{v2:int}"), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "id", "v1", "v2" }, VaryByHeader = "Cookie")]
         public async Task<ActionResult> CompareVersion(int id, int v1, int v2)
         {
-            var post = PostService.Get(p => p.Id == id && (p.Status == Status.Pended || CurrentUser.IsAdmin));
+            var post = PostService.Get(p => p.Id == id && (p.Status == Status.Published || CurrentUser.IsAdmin));
             var main = post.Mapper<PostHistoryVersion>() ?? throw new NotFoundException("文章未找到");
             var left = v1 <= 0 ? main : await PostHistoryVersionService.GetAsync(v => v.Id == v1) ?? throw new NotFoundException("文章未找到");
             var right = v2 <= 0 ? main : await PostHistoryVersionService.GetAsync(v => v.Id == v2) ?? throw new NotFoundException("文章未找到");
@@ -273,13 +273,13 @@ namespace Masuit.MyBlogs.Core.Controllers
             {
                 Id = c.Id,
                 Name = c.Name,
-                Count = c.Post.Count(p => p.Status == Status.Pended || CurrentUser.IsAdmin)
+                Count = c.Post.Count(p => p.Status == Status.Published || CurrentUser.IsAdmin)
             }).ToList(); //category
             ViewBag.seminars = SeminarService.GetAll(c => c.Post.Count, false).Select(c => new TagCloudViewModel
             {
                 Id = c.Id,
                 Name = c.Title,
-                Count = c.Post.Count(p => p.Post.Status == Status.Pended || CurrentUser.IsAdmin)
+                Count = c.Post.Count(p => p.Post.Status == Status.Published || CurrentUser.IsAdmin)
             }).ToList(); //seminars
             return View();
         }
@@ -476,7 +476,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         public ActionResult Pass(int id)
         {
             Post post = PostService.GetById(id) ?? throw new NotFoundException("文章未找到");
-            post.Status = Status.Pended;
+            post.Status = Status.Published;
             post.ModifyDate = DateTime.Now;
             post.PostDate = DateTime.Now;
             bool b = PostService.SaveChanges() > 0;
@@ -539,7 +539,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         public ActionResult Restore(int id)
         {
             var post = PostService.GetById(id) ?? throw new NotFoundException("文章未找到");
-            post.Status = Status.Pended;
+            post.Status = Status.Published;
             bool b = PostService.SaveChanges() > 0;
             SearchEngine.LuceneIndexer.Add(post);
             return ResultData(null, b, b ? "恢复成功!" : "恢复失败!");
@@ -641,8 +641,8 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// 编辑
         /// </summary>
         /// <param name="post"></param>
-        /// <param name="notify"></param>
-        /// <param name="reserve"></param>
+        /// <param name="notify">是否通知订阅</param>
+        /// <param name="reserve">是否保留历史版本</param>
         /// <returns></returns>
         [HttpPost, MyAuthorize]
         public async Task<ActionResult> Edit(PostCommand post, bool notify = true, bool reserve = true)
@@ -673,7 +673,7 @@ namespace Masuit.MyBlogs.Core.Controllers
             }
 
             Post p = PostService.GetById(post.Id);
-            if (reserve)
+            if (reserve && p.Status == Status.Published)
             {
                 var history = p.Mapper<PostHistoryVersion>();
                 p.PostHistoryVersion.Add(history);
@@ -775,7 +775,7 @@ namespace Masuit.MyBlogs.Core.Controllers
                 post.ProtectContent = null;
             }
 
-            post.Status = Status.Pended;
+            post.Status = Status.Published;
             Post p = post.Mapper<Post>();
             p.Modifier = p.Author;
             p.ModifierEmail = p.Email;

+ 1 - 1
src/Masuit.MyBlogs.Core/Controllers/SeminarController.cs

@@ -47,7 +47,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         public ActionResult Index(int id, [Optional]OrderBy? orderBy, [Range(1, int.MaxValue, ErrorMessage = "页码必须大于0")]int page = 1, [Range(1, 50, ErrorMessage = "页大小必须在0到50之间")]int size = 15)
         {
             var s = SeminarService.GetById(id) ?? throw new NotFoundException("文章未找到");
-            var posts = PostService.GetQuery<PostDto>(p => p.Seminar.Any(x => x.SeminarId == id) && (p.Status == Status.Pended || CurrentUser.IsAdmin)).OrderBy($"{nameof(Post.IsFixedTop)} desc,{(orderBy ?? OrderBy.ModifyDate).GetDisplay()} desc").ToPagedList(page, size);
+            var posts = PostService.GetQuery<PostDto>(p => p.Seminar.Any(x => x.SeminarId == id) && (p.Status == Status.Published || CurrentUser.IsAdmin)).OrderBy($"{nameof(Post.IsFixedTop)} desc,{(orderBy ?? OrderBy.ModifyDate).GetDisplay()} desc").ToPagedList(page, size);
             ViewBag.Title = s.Title;
             ViewBag.Desc = s.Description;
             ViewBag.SubTitle = s.SubTitle;

+ 4 - 4
src/Masuit.MyBlogs.Core/Controllers/SubscribeController.cs

@@ -73,7 +73,7 @@ namespace Masuit.MyBlogs.Core.Controllers
             var time = DateTime.Today.AddDays(-1);
             string scheme = Request.Scheme;
             var host = Request.Host;
-            var posts = PostService.GetQueryNoTracking(p => p.Status == Status.Pended && p.ModifyDate >= time, p => p.ModifyDate, false).Select(p => new Item()
+            var posts = PostService.GetQueryNoTracking(p => p.Status == Status.Published && p.ModifyDate >= time, p => p.ModifyDate, false).Select(p => new Item()
             {
                 Author = new Author
                 {
@@ -119,7 +119,7 @@ namespace Masuit.MyBlogs.Core.Controllers
             string scheme = Request.Scheme;
             var host = Request.Host;
             var category = CategoryService.GetById(id) ?? throw new NotFoundException("分类未找到");
-            var posts = PostService.GetQueryNoTracking(p => p.CategoryId == id && p.Status == Status.Pended && p.ModifyDate >= time, p => p.ModifyDate, false).Select(p => new Item()
+            var posts = PostService.GetQueryNoTracking(p => p.CategoryId == id && p.Status == Status.Published && p.ModifyDate >= time, p => p.ModifyDate, false).Select(p => new Item()
             {
                 Author = new Author
                 {
@@ -163,7 +163,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         {
             string scheme = Request.Scheme;
             var host = Request.Host;
-            var p = PostService.Get(p => p.Status == Status.Pended && p.Id == id) ?? throw new NotFoundException("文章未找到");
+            var p = PostService.Get(p => p.Status == Status.Published && p.Id == id) ?? throw new NotFoundException("文章未找到");
             var summary = p.Content.GetSummary(300, 50);
             var item = new Item()
             {
@@ -209,7 +209,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         {
             string scheme = Request.Scheme;
             var host = Request.Host;
-            var post = PostService.Get(p => p.Status == Status.Pended && p.Id == id) ?? throw new NotFoundException("文章不存在");
+            var post = PostService.Get(p => p.Status == Status.Published && p.Id == id) ?? throw new NotFoundException("文章不存在");
             var start = DateTime.Today.AddDays(-7);
             var comments = CommentService.GetQuery(c => c.PostId == post.Id && c.CommentDate > start).Select(c => new Item()
             {

+ 3 - 3
src/Masuit.MyBlogs.Core/Extensions/Hangfire/HangfireBackJob.cs

@@ -97,7 +97,7 @@ namespace Masuit.MyBlogs.Core.Extensions.Hangfire
         /// <param name="p"></param>
         public void PublishPost(Post p)
         {
-            p.Status = Status.Pended;
+            p.Status = Status.Published;
             p.PostDate = DateTime.Now;
             p.ModifyDate = DateTime.Now;
             var post = _postService.GetById(p.Id);
@@ -107,7 +107,7 @@ namespace Masuit.MyBlogs.Core.Extensions.Hangfire
             }
             else
             {
-                post.Status = Status.Pended;
+                post.Status = Status.Published;
                 post.PostDate = DateTime.Now;
                 post.ModifyDate = DateTime.Now;
                 _postService.SaveChanges();
@@ -226,7 +226,7 @@ namespace Masuit.MyBlogs.Core.Extensions.Hangfire
             {
                 nameof(DataContext.Post),
             });
-            var list = _searchEngine.Context.Post.Where(i => i.Status != Status.Pended).ToList();
+            var list = _searchEngine.Context.Post.Where(i => i.Status != Status.Published).ToList();
             _searchEngine.LuceneIndexer.Delete(list);
         }
 

+ 10 - 10
src/Masuit.MyBlogs.Core/Infrastructure/Repository/BaseRepository.cs

@@ -52,7 +52,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         {
             return DataContext.Set<T>().FromCache(new MemoryCacheEntryOptions()
             {
-                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5)
+                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1)
             });
         }
 
@@ -75,7 +75,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         {
             return DataContext.Set<T>().AsNoTracking().ProjectTo<TDto>(MapperConfig).FromCache(new MemoryCacheEntryOptions()
             {
-                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5)
+                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1)
             });
         }
 
@@ -114,7 +114,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         {
             return GetAll(orderby, isAsc).FromCache(new MemoryCacheEntryOptions()
             {
-                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5)
+                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1)
             });
         }
 
@@ -143,7 +143,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         {
             return GetAllNoTracking(orderby, isAsc).ProjectTo<TDto>(MapperConfig).FromCache(new MemoryCacheEntryOptions()
             {
-                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5)
+                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1)
             });
         }
 
@@ -179,7 +179,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         {
             return DataContext.Set<T>().Where(@where).FromCache(new MemoryCacheEntryOptions()
             {
-                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5)
+                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1)
             });
         }
 
@@ -195,7 +195,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         {
             return GetQuery(where, orderby, isAsc).FromCache(new MemoryCacheEntryOptions()
             {
-                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5)
+                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1)
             });
         }
 
@@ -255,7 +255,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         {
             return DataContext.Set<T>().Where(@where).AsNoTracking().ProjectTo<TDto>(MapperConfig).FromCache(new MemoryCacheEntryOptions()
             {
-                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5)
+                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1)
             });
         }
 
@@ -272,7 +272,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         {
             return GetQueryNoTracking(where, orderby, isAsc).ProjectTo<TDto>(MapperConfig).FromCache(new MemoryCacheEntryOptions()
             {
-                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5)
+                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1)
             });
         }
 
@@ -731,7 +731,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
 
             var list = query.Skip(size * (page - 1)).Take(size).FromCache(new MemoryCacheEntryOptions()
             {
-                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5)
+                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1)
             }).ToList();
             return new PagedList<T>(list, page, size, totalCount);
         }
@@ -788,7 +788,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
 
             var list = query.Skip(size * (page - 1)).Take(size).ProjectTo<TDto>(mapper).FromCache(new MemoryCacheEntryOptions()
             {
-                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5)
+                AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1)
             }).ToList();
             return new PagedList<TDto>(list, page, size, totalCount);
         }

+ 3 - 3
src/Masuit.MyBlogs.Core/Infrastructure/Services/PostService.cs

@@ -38,7 +38,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Services
             }
 
             var searchResult = SearchEngine.ScoredSearch<Post>(BuildSearchOptions(page, size, keyword));
-            var entities = searchResult.Results.Where(s => s.Entity.Status == Status.Pended).ToList();
+            var entities = searchResult.Results.Where(s => s.Entity.Status == Status.Published).ToList();
             var ids = entities.Select(s => s.Entity.Id).ToArray();
             var dic = GetQuery<PostDto>(p => ids.Contains(p.Id)).ToDictionary(p => p.Id);
             var posts = entities.Select(s =>
@@ -140,7 +140,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Services
         public override Post AddEntitySaved(Post t)
         {
             t = base.AddEntity(t);
-            SearchEngine.SaveChanges(t.Status == Status.Pended);
+            SearchEngine.SaveChanges(t.Status == Status.Published);
             return t;
         }
 
@@ -152,7 +152,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Services
         public override Task<int> AddEntitySavedAsync(Post t)
         {
             base.AddEntity(t);
-            return SearchEngine.SaveChangesAsync(t.Status == Status.Pended);
+            return SearchEngine.SaveChangesAsync(t.Status == Status.Published);
         }
 
         /// <summary>

+ 1 - 1
src/Masuit.MyBlogs.Core/Models/Enum/Status.cs

@@ -35,7 +35,7 @@ namespace Masuit.MyBlogs.Core.Models.Enum
         /// <summary>
         /// 已发表
         /// </summary>
-        [Display(Name = "已发表")] Pended,
+        [Display(Name = "已发表")] Published,
 
         /// <summary>
         /// 订阅中

+ 1 - 1
src/Masuit.MyBlogs.Core/Properties/launchSettings.json

@@ -18,7 +18,7 @@
     "Masuit.MyBlogs.Core": {
       "commandName": "Project",
       "environmentVariables": {
-        "ASPNETCORE_ENVIRONMENT": ""
+        "ASPNETCORE_ENVIRONMENT": "Development"
       },
       "applicationUrl": "http://localhost:5000"
     }

+ 5 - 4
src/Masuit.MyBlogs.Core/Views/Home/Index.cshtml

@@ -1,4 +1,5 @@
-@using Masuit.MyBlogs.Core.Common
+@using System.Diagnostics
+@using Masuit.MyBlogs.Core.Common
 @using Masuit.MyBlogs.Core.Models.DTO
 @using Masuit.MyBlogs.Core.Models.Entity
 @using Masuit.MyBlogs.Core.Models.ViewModel
@@ -14,7 +15,7 @@
 <link href="~/Assets/banner/bootstrap-touch-slider.min.css" rel="stylesheet" />
 @if (Model.Banner.Any())
 {
-    <div id="bootstrap-touch-slider" class="carousel bs-slider fade  control-round indicators-line" data-ride="carousel" data-pause="hover" data-interval="5000">
+    <div id="bootstrap-touch-slider" class="carousel bs-slider fade  control-round indicators-line" data-ride="carousel" data-pause="hover" data-interval="5000" id="@Stopwatch.GetTimestamp()">
         <ol class="carousel-indicators">
             @for (int i = 0; i < Model.Banner.Count; i++)
             {
@@ -28,13 +29,13 @@
                 }
             }
         </ol>
-        <div class="carousel-inner" role="listbox">
+        <div class="carousel-inner" role="listbox" id="@Stopwatch.GetTimestamp()">
             @for (int i = 0; i < Model.Banner.Count; i++)
             {
                 var p = Model.Banner[i];
                 string[] ani = { "zoomInRight", "flipInX", "fadeInLeft", "lightSpeedIn", "fadeInUp", "zoomInLeft", "fadeInRight" };
                 Random r = new Random();
-                <div class="item @(i == 0 ? "active" : "")" class="img-responsive">
+                <div class="item @(i == 0 ? "active" : "")" class="img-responsive" id="@Stopwatch.GetTimestamp()">
                     <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@p.Id" target="_blank" data-animation="animated @ani[r.Next(ani.Length)]">
                         <img src="@p.ImageUrl" title="@p.Title" alt="@p.Description" />
                     </a>

+ 4 - 3
src/Masuit.MyBlogs.Core/Views/Post/CompareVersion.cshtml

@@ -1,4 +1,5 @@
-@using Masuit.MyBlogs.Core.Common
+@using System.Diagnostics
+@using Masuit.MyBlogs.Core.Common
 @using Masuit.MyBlogs.Core.Models.Entity
 @model Masuit.MyBlogs.Core.Models.Entity.PostHistoryVersion[]
 @{
@@ -86,7 +87,7 @@
                             @if (ads.Any())
                             {
                                 <section class="protected">
-                                    <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ads[0].Id" target="_blank">
+                                    <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ads[0].Id" target="_blank" id="@Stopwatch.GetTimestamp()">
                                         <h3>
                                             @ads[0].Title
                                             <span class="text-red">[推广]</span>
@@ -172,7 +173,7 @@
                             @if (ads.Count > 1)
                             {
                                 <section class="protected">
-                                    <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ads[1].Id" target="_blank">
+                                    <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ads[1].Id" target="_blank" id="@Stopwatch.GetTimestamp()">
                                         <h3>
                                             @ads[1].Title
                                             <span class="text-red">[推广]</span>

+ 6 - 5
src/Masuit.MyBlogs.Core/Views/Post/Details.cshtml

@@ -1,4 +1,5 @@
-@using System.Web
+@using System.Diagnostics
+@using System.Web
 @using Masuit.MyBlogs.Core.Common
 @using Masuit.MyBlogs.Core.Configs
 @using Masuit.MyBlogs.Core.Models.Entity
@@ -143,7 +144,7 @@
                 @if (ad != null)
                 {
                     <section class="protected">
-                        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ad.Id" target="_blank">
+                        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ad.Id" target="_blank" id="@Stopwatch.GetTimestamp()">
                             <h3>
                                 @ad.Title
                                 <span class="text-red">[推广]</span>
@@ -245,7 +246,7 @@
                     </section>
                 }
                 @{
-                    var posts = Model.Category.Post.Where(p => p.Status == Status.Pended && p.Id != Model.Id).OrderBy(p => Guid.NewGuid()).ToList();
+                    var posts = Model.Category.Post.Where(p => p.Status == Status.Published && p.Id != Model.Id).OrderBy(p => Guid.NewGuid()).ToList();
                     int count = posts.Count >= 10 ? 10 : posts.Count;
                     if (posts.Any())
                     {
@@ -322,7 +323,7 @@
                             <h4>本篇文章已禁用评论和回复功能</h4>
                         }
                         <ul class="wow media-list"></ul>
-                        @if (Model.Comment.Any(c => c.Status == Status.Pended))
+                        @if (Model.Comment.Any(c => c.Status == Status.Published))
                         {
                             <div class="row">
                                 <div class="col-md-12 text-center">
@@ -398,7 +399,7 @@
         loading();
         $('#pageToolbar').Paging({ //异步加载评论
             pagesize: 10,
-            count: @Model.Comment.Count(c =>c.ParentId==0&& c.Status==Status.Pended),
+            count: @Model.Comment.Count(c =>c.ParentId==0&& c.Status==Status.Published),
             toolbar: true,
             callback: function(page, size, count) {
                 window.post("/comment/getcomments", {

+ 6 - 5
src/Masuit.MyBlogs.Core/Views/Post/Details_Admin.cshtml

@@ -1,4 +1,5 @@
-@using System.Web
+@using System.Diagnostics
+@using System.Web
 @using Masuit.MyBlogs.Core.Common
 @using Masuit.MyBlogs.Core.Models.DTO
 @using Masuit.MyBlogs.Core.Models.Entity
@@ -129,7 +130,7 @@
                 @if (ad != null)
                 {
                     <section class="protected">
-                        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ad.Id" target="_blank">
+                        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ad.Id" target="_blank" id="@Stopwatch.GetTimestamp()">
                             <h3>
                                 @ad.Title
                                 <span class="text-red">[推广]</span>
@@ -228,7 +229,7 @@
                     </p>
                 </section>
                 @{
-                    var posts = Model.Category.Post.Where(p => p.Status == Status.Pended && p.Id != Model.Id).OrderBy(p => Guid.NewGuid()).ToList();
+                    var posts = Model.Category.Post.Where(p => p.Status == Status.Published && p.Id != Model.Id).OrderBy(p => Guid.NewGuid()).ToList();
                     int count = posts.Count >= 10 ? 10 : posts.Count;
                     if (posts.Any())
                     {
@@ -270,7 +271,7 @@
                             </div>
                         </form>
                         <ul class="wow media-list"></ul>
-                        @if (Model.Comment.Any(c => c.Status == Status.Pended))
+                        @if (Model.Comment.Any(c => c.Status == Status.Published))
                         {
                             <div class="row">
                                 <div class="col-md-12 text-center">
@@ -340,7 +341,7 @@
 		loading();
 		$('#pageToolbar').Paging({ //异步加载评论
 			pagesize: 10,
-			count: @Model.Comment.Count(c =>c.ParentId==0&& c.Status==Status.Pended),
+			count: @Model.Comment.Count(c =>c.ParentId==0&& c.Status==Status.Published),
 			toolbar: true,
 			callback: function(page, size, count) {
 				window.post("/comment/getcomments", {

+ 3 - 2
src/Masuit.MyBlogs.Core/Views/Post/HistoryVersion.cshtml

@@ -1,4 +1,5 @@
-@using Masuit.MyBlogs.Core.Common
+@using System.Diagnostics
+@using Masuit.MyBlogs.Core.Common
 @using Masuit.MyBlogs.Core.Models.Entity
 @using Masuit.Tools.Core.Net
 @model Masuit.MyBlogs.Core.Models.Entity.PostHistoryVersion
@@ -162,7 +163,7 @@
                 @if (ad != null)
                 {
                     <section class="protected">
-                        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ad.Id" target="_blank">
+                        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ad.Id" target="_blank" id="@Stopwatch.GetTimestamp()">
                             <h3>
                                 @ad.Title
                                 <span class="text-red">[推广]</span>

+ 3 - 2
src/Masuit.MyBlogs.Core/Views/Post/HistoryVersion_Admin.cshtml

@@ -1,4 +1,5 @@
-@using Masuit.MyBlogs.Core.Models.Entity
+@using System.Diagnostics
+@using Masuit.MyBlogs.Core.Models.Entity
 @model Masuit.MyBlogs.Core.Models.Entity.PostHistoryVersion
 @{
     ViewBag.Title = Model.Post.Title + "于" + Model.ModifyDate.ToString("yyyy-MM-dd HH:mm:ss") + "的历史版本:" + Model.Title;
@@ -127,7 +128,7 @@
                 @if (ad != null)
                 {
                     <section class="protected">
-                        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ad.Id" target="_blank">
+                        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ad.Id" target="_blank" id="@Stopwatch.GetTimestamp()">
                             <h3>
                                 @ad.Title
                                 <span class="text-red">[推广]</span>

+ 5 - 4
src/Masuit.MyBlogs.Core/Views/Shared/_ArticleListAdvertisement.cshtml

@@ -1,13 +1,14 @@
-@model Masuit.MyBlogs.Core.Models.Entity.Advertisement
+@using System.Diagnostics
+@model Masuit.MyBlogs.Core.Models.Entity.Advertisement
 <div class="ibox">
-    <div class="ibox-content">
-        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@Model.Id" target="_blank">
+    <div class="ibox-content" id="@Stopwatch.GetTimestamp()">
+        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@Model.Id" target="_blank" id="@Stopwatch.GetTimestamp()">
             <h4>
                 <i class="text-red size18">[荐]</i>
                 @Model.Title
             </h4>
         </a>
-        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@Model.Id" target="_blank">
+        <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@Model.Id" target="_blank" id="@Stopwatch.GetTimestamp()">
             <div class="row padding-bot10">
                 @{
                     string imgSrc = Model.ThumbImgUrl;

+ 4 - 3
src/Masuit.MyBlogs.Core/Views/Shared/_Aside.cshtml

@@ -1,4 +1,5 @@
-@using Masuit.MyBlogs.Core.Common
+@using System.Diagnostics
+@using Masuit.MyBlogs.Core.Common
 @using Masuit.MyBlogs.Core.Models.DTO
 @using Masuit.Tools.Html
 @model Masuit.MyBlogs.Core.Models.ViewModel.HomePageViewModel
@@ -83,8 +84,8 @@
                 <div class="panel-heading">
                     @ad.Title
                 </div>
-                <div class="panel-body">
-                    <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ad.Id" target="_blank">
+                <div class="panel-body" id="@Stopwatch.GetTimestamp()">
+                    <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@ad.Id" target="_blank" id="@Stopwatch.GetTimestamp()">
                         <img class="img img-responsive" src="@ad.ThumbImgUrl" alt="@ad.Title" title="@ad.Title" />
                     </a>
                 </div>

+ 6 - 0
src/Masuit.MyBlogs.Core/bundleconfig.json

@@ -82,5 +82,11 @@
     "inputFiles": [
       "wwwroot/ng-views/controllers/dashboard.js"
     ]
+  },
+  {
+    "outputFileName": "wwwroot/ng-views/css/app.min.css",
+    "inputFiles": [
+      "wwwroot/ng-views/css/app.css"
+    ]
   }
 ]

+ 6 - 2
src/Masuit.MyBlogs.Core/wwwroot/Content/common/articlestyle.css

@@ -170,8 +170,12 @@ article table > tbody > tr > th.danger:hover,
 article table > tbody > tr.danger:hover > td,
 article table > tbody > tr:hover > .danger,
 article table > tbody > tr.danger:hover > th { background-color: #ebcccc; }
-
-.label a { color: white; }
+.syntaxhighlighter table {
+    margin-bottom: 0 !important;
+}
+.label a {
+    color: white;
+}
 
 .border {
     border: #ccc 1px solid;

+ 1 - 5
src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/merge.js

@@ -16,11 +16,7 @@
 	};
 	this.GetPageData = function(page, size) {
 		$scope.loading();
-		$http.get("/merge", {
-			page,
-			size,
-			search:$scope.kw
-		}).then(function(res) {
+		$http.get("/merge?page="+page+"&size="+size+"&kw="+$scope.kw).then(function(res) {
 			$scope.paginationConf.currentPage = page;
 			$scope.paginationConf.totalItems = res.data.TotalCount;
 			$("div[ng-table-pagination]").remove();

File diff suppressed because it is too large
+ 0 - 0
src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/merge.min.js


+ 2 - 2
src/Masuit.MyBlogs.Core/wwwroot/ng-views/css/app.css

@@ -10841,7 +10841,7 @@ a.lv-footer:hover {
 .table.table-inner {
   border: 0;
 }
-.table > thead > tr > th:first-child,
+/*.table > thead > tr > th:first-child,
 .table > tbody > tr > th:first-child,
 .table > tfoot > tr > th:first-child,
 .table > thead > tr > td:first-child,
@@ -10856,7 +10856,7 @@ a.lv-footer:hover {
 .table > tbody > tr > td:last-child,
 .table > tfoot > tr > td:last-child {
   padding-right: 30px;
-}
+}*/
 .table > tbody > tr.active > td,
 .table > tfoot > tr.active > td,
 .table > tbody > tr.info > td,

File diff suppressed because it is too large
+ 0 - 0
src/Masuit.MyBlogs.Core/wwwroot/ng-views/css/app.min.css


+ 1 - 1
src/Masuit.MyBlogs.Core/wwwroot/ng-views/template/sidebar-left.html

@@ -41,8 +41,8 @@
             <a toggle-submenu><i class="zmdi zmdi-view-compact"></i>文章管理</a>
             <ul>
                 <li><a data-ui-sref-active="active" data-ui-sref="write-blog" data-ng-click="mactrl.sidebarStat($event)">写文章</a></li>
-                <li><a data-ui-sref-active="active" data-ui-sref="post-pending" data-ng-click="mactrl.sidebarStat($event)">文章审核</a></li>
                 <li><a data-ui-sref-active="active" data-ui-sref="post-list" data-ng-click="mactrl.sidebarStat($event)">文章列表</a></li>
+                <li><a data-ui-sref-active="active" data-ui-sref="post-pending" data-ng-click="mactrl.sidebarStat($event)">文章审核</a></li>
                 <li><a data-ui-sref-active="active" data-ui-sref="merge-list" data-ng-click="mactrl.sidebarStat($event)">文章合并</a></li>
                 <li><a data-ui-sref-active="active" data-ui-sref="post-cat" data-ng-click="mactrl.sidebarStat($event)">文章分类管理</a></li>
                 <li><a data-ui-sref-active="active" data-ui-sref="seminar" data-ng-click="mactrl.sidebarStat($event)"><i class="zmdi zmdi-format-underlined"></i>文章专题管理</a></li>

+ 2 - 2
src/Masuit.MyBlogs.Core/wwwroot/ng-views/views/post/postlist.html

@@ -84,7 +84,7 @@
                     <span class="el-switch-style" ng-click="toggleDisableCopy(row)"></span>
                 </label>
             </td>
-            <td title="'操作'" style="width: 185px;">
+            <td title="'操作'" style="width: 126px;">
                 <div class="btn-group">
                     <button class="btn btn-default btn-sm waves-effect" ng-click="list.pass(row)" ng-if="row.Status=='审核中'">
                         <i class="icon-checkmark"></i>
@@ -101,7 +101,7 @@
                     <a class="btn btn-info btn-sm waves-effect" ng-click="list.restore(row)" ng-if="row.Status=='已删除'">
                         <i class="icon-undo2"></i>
                     </a>
-                    <a class="btn  btn-sm waves-effect" ng-class="{true:'btn-success',false:'btn-primary'}[row.IsFixedTop]" ng-click="list.fixtop(row.Id)">
+                    <a class="btn  btn-sm waves-effect" ng-class="{true:'btn-success',false:'btn-primary'}[row.IsFixedTop]" ng-click="list.fixtop(row.Id)" ng-if="row.Status!='已删除'">
                         <i class="icon-pushpin" ng-class="{true:'text-danger'}[row.IsFixedTop]"></i>
                     </a>
                 </div>

Some files were not shown because too many files changed in this diff