懒得勤快 3 vuotta sitten
vanhempi
sitoutus
feda4b512e

+ 0 - 0
src/Masuit.MyBlogs.Core/ueconfig.json → src/Masuit.MyBlogs.Core/App_Data/ueconfig.json


+ 3 - 1
src/Masuit.MyBlogs.Core/Controllers/PostController.cs

@@ -1041,12 +1041,14 @@ namespace Masuit.MyBlogs.Core.Controllers
                 Title = p.Title,
                 ViewCount = p.PostVisitRecordStats.Where(t => t.Date >= DateTime.Today).Sum(e => e.Count)
             }).OrderByDescending(p => p.ViewCount).Take(10).Cacheable().ToListAsync(cancellationToken);
+            var readCount = PostVisitRecordService.Count(e => e.Time >= DateTime.Today);
             return ResultData(new
             {
                 mostHots,
                 mostView,
                 mostAverage,
-                trending
+                trending,
+                readCount
             });
         }
 

+ 1 - 1
src/Masuit.MyBlogs.Core/Extensions/UEditor/UeditorConfig.cs

@@ -7,7 +7,7 @@ namespace Masuit.MyBlogs.Core.Extensions.UEditor
     /// </summary>
     public static class UeditorConfig
     {
-        public static JObject Items => JObject.Parse(File.ReadAllText(AppContext.BaseDirectory + "ueconfig.json"));
+        public static JObject Items => JObject.Parse(File.ReadAllText(AppContext.BaseDirectory + "App_Data/ueconfig.json"));
 
         public static T GetValue<T>(string key)
         {

+ 8 - 44
src/Masuit.MyBlogs.Core/Masuit.MyBlogs.Core.csproj

@@ -55,11 +55,11 @@
         <PackageReference Include="Karambolo.AspNetCore.Bundling.NUglify" Version="3.5.1" />
         <PackageReference Include="Masuit.Tools.Excel" Version="1.1.2.2" />
         <PackageReference Include="MaxMind.GeoIP2" Version="5.1.0" />
-        <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.4" />
-        <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.4" />
-        <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.4" />
-        <PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.4" />
-        <PackageReference Include="Microsoft.Graph" Version="4.27.0" />
+        <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.5" />
+        <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.5" />
+        <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.5" />
+        <PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.5" />
+        <PackageReference Include="Microsoft.Graph" Version="4.28.0" />
         <PackageReference Include="Microsoft.Graph.Auth" Version="1.0.0-preview.7" />
         <PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.2.22" />
         <PackageReference Include="OpenXmlPowerTools-NetStandard" Version="4.6.23-alpha4" />
@@ -69,53 +69,17 @@
         <PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.18" />
         <PackageReference Include="TimeZoneConverter" Version="5.0.0" />
         <PackageReference Include="WilderMinds.RssSyndication" Version="1.7.0" />
-        <PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="6.13.18" />
+        <PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="6.13.19" />
     </ItemGroup>
     <ItemGroup>
         <Content Update="appsettings.json">
             <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
         </Content>
-        <Content Update="ueconfig.json">
-            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </Content>
-        <None Update="App_Data\ban.txt">
-            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </None>
-        <None Update="App_Data\cert\server.pfx">
-          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </None>
-        <None Update="App_Data\CustomKeywords.txt">
-            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </None>
-        <None Update="App_Data\CustomSynonym.txt">
-          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </None>
-        <None Update="App_Data\denyip.txt">
-            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </None>
-        <None Update="App_Data\DenyIPRange.txt">
+        <None Update="App_Data\*">
             <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
         </None>
-        <None Update="App_Data\email-bounces.txt">
+        <None Update="App_Data\*\*">
           <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
         </None>
-        <None Update="App_Data\GeoLite2-ASN.mmdb">
-          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </None>
-        <None Update="App_Data\GeoLite2-City.mmdb">
-          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </None>
-        <None Update="App_Data\ip2region.db">
-            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </None>
-        <None Update="App_Data\mod.txt">
-            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </None>
-        <None Update="App_Data\OneDrive.template.db">
-          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </None>
-        <None Update="App_Data\whitelist.txt">
-            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-        </None>
     </ItemGroup>
 </Project>

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

@@ -28,7 +28,6 @@
             <div class="form-control" id="orderby" style="width: 200px"></div>
             </div>
         </div>
-    </div>
     <table ng-table="list.tableParams" class="table table-striped table-vmiddle table-bordered table-hover table-condensed">
         <tr ng-repeat="row in $data">
             <td data-title="'标题'">
@@ -129,7 +128,7 @@
 <div class="row">
     <div class="col-md-6" ng-if="agg.trending.length>0">
         <div class="page-header">
-            <h3 class="text-center">今日热榜</h3>
+            <h3 class="text-center">今日热榜(总阅读量:{{agg.readCount}})</h3>
         </div>
         <table class="table table-bordered table-condensed table-responsive">
             <thead>