Skip to content

Commit

Permalink
修复刷新页面时多次闪烁的bug,换回原本的字体,修复表格组件异常崩溃导致整个服务崩溃的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleFish-233 committed Sep 24, 2023
1 parent 309ddbe commit b444658
Show file tree
Hide file tree
Showing 89 changed files with 407 additions and 521 deletions.
47 changes: 24 additions & 23 deletions CnGalWebSite/CnGalWebSite.APIServer/CnGalWebSite.APIServer.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
Expand All @@ -13,12 +13,16 @@

<ItemGroup>
<Compile Remove="Development\**" />
<Compile Remove="wwwroot\temp\**" />
<Compile Remove="wwwroot\testfiles\**" />
<Content Remove="Development\**" />
<Content Remove="wwwroot\temp\**" />
<Content Remove="wwwroot\testfiles\**" />
<EmbeddedResource Remove="Development\**" />
<EmbeddedResource Remove="wwwroot\temp\**" />
<EmbeddedResource Remove="wwwroot\testfiles\**" />
<None Remove="Development\**" />
<None Remove="wwwroot\temp\**" />
<None Remove="wwwroot\testfiles\**" />
</ItemGroup>

Expand All @@ -27,40 +31,37 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AlibabaCloud.SDK.Dysmsapi20170525" Version="2.0.23" />
<PackageReference Include="htmldiff.net" Version="1.4.0" />
<PackageReference Include="IdentityModel" Version="6.0.0" />
<PackageReference Include="Markdig" Version="0.30.4" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Rewrite" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.3">
<PackageReference Include="AlibabaCloud.SDK.Dysmsapi20170525" Version="2.0.24" />
<PackageReference Include="htmldiff.net" Version="1.4.1" />
<PackageReference Include="IdentityModel" Version="6.2.0" />
<PackageReference Include="Markdig" Version="0.33.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0-beta3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0-rc.1.23421.29" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.11">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="7.0.3" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="7.0.11" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.0-rc.1.23461.3" />
<PackageReference Include="NEST" Version="7.17.5" />
<PackageReference Include="NetCore.AutoRegisterDi" Version="2.1.0" />
<PackageReference Include="NETCore.MailKit" Version="2.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.2.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.4" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
<PackageReference Include="ReverseMarkdown" Version="3.24.0" />
<PackageReference Include="Senparc.Weixin.MP" Version="16.18.10.6" />
<PackageReference Include="Senparc.Weixin.MP.Middleware" Version="0.8.5.7" />
<PackageReference Include="Senparc.Weixin.MP.MVC" Version="7.12.5.7" />
<PackageReference Include="ReverseMarkdown" Version="3.25.0" />
<PackageReference Include="Senparc.Weixin.MP" Version="16.19.3" />
<PackageReference Include="Senparc.Weixin.MP.Middleware" Version="1.0.6-beta1" />
<PackageReference Include="Senparc.Weixin.MP.MVC" Version="7.12.13" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.6" />
<PackageReference Include="Typesense" Version="6.3.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.11" />
<PackageReference Include="Typesense" Version="6.5.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="Application\Disambigs\Dtos\" />
<Folder Include="wwwroot\temp\images\" />
<Folder Include="wwwroot\temp\imageprogress\" />
</ItemGroup>

<ItemGroup>
Expand Down
Expand Up @@ -21,7 +21,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": "true",
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5003"
},
"Docker": {
Expand Down
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand All @@ -13,8 +13,8 @@

<ItemGroup>
<PackageReference Include="Masa.Blazor" Version="1.0.0-preview.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.10" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0-rc.1.23421.29" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0-rc.1.23419.4" />
</ItemGroup>

<ItemGroup>
Expand Down
36 changes: 16 additions & 20 deletions CnGalWebSite/CnGalWebSite.Components/DataTables/DataTableCard.razor
Expand Up @@ -2,7 +2,7 @@

@inject IHttpService _httpService
@inject IQueryService _queryService
@using OneOf;
@using OneOf;

<MDataTable Headers="Headers"
Items="_items"
Expand All @@ -14,8 +14,7 @@
ServerItemsLength="_totalDesserts"
Loading="_loading"
Class="@Class"
LoadingText="@LoadingText"
@ref="_dataTable">
LoadingText="@LoadingText">
<TopContent>
<MToolbar Flat>
<MToolbarTitle> @Title</MToolbarTitle>
Expand All @@ -31,7 +30,6 @@
<MIcon Left>mdi-plus</MIcon>
添加
</MButton>

}

<MTextField Value="_search" ValueChanged="OnSearch" TValue="string"
Expand Down Expand Up @@ -93,30 +91,29 @@
GetDataFromApi();
}

protected override void OnAfterRender(bool firstRender)
protected override void OnInitialized()
{
if (firstRender)
{
CopyOptions(Data.Parameter, _dataTable.Options);
GetDataFromApi();
}
//CopyOptions(_dataCache.Date.Parameter, new DataOptions());
GetDataFromApi();
}

public async void GetDataFromApi()
public void GetDataFromApi()
{
_loading = true;
var data = await GetDataAsync();
_items = data.items;
_totalDesserts = data.total;
_loading = false;

await InvokeAsync(StateHasChanged);
GetDataAsync().ContinueWith(task =>
{
var data = task.Result;
_items = data.items;
_totalDesserts = data.total;
_loading = false;

InvokeAsync(StateHasChanged);
});
}

public void OnSearch(string text)
{
_search = Data.Parameter.SearchText = text;
Data.Parameter.SearchText = text;
StateHasChanged();
GetDataFromApi();
}
Expand All @@ -140,7 +137,6 @@
return (new List<TModel>(), 0);
}
}

}

public void CopyOptions(QueryParameterModel parameter, DataOptions options)
Expand All @@ -154,4 +150,4 @@
parameter.ItemsPerPage = options.ItemsPerPage == 0 ? 10 : options.ItemsPerPage;
parameter.Page = options.Page == 0 ? 1 : options.Page;
}
}
}
Expand Up @@ -2,7 +2,6 @@
Loading="_loading"
Items="_items"
OnSearchInputUpdate="QuerySelections"
Class="mx-4"
ItemValue="r=>r"
ItemText="r=>r"
Label="@Label"></MAutocomplete>
Expand Down
@@ -0,0 +1,17 @@

<div class="@Class" style="@Style">
<div class="d-flex" style="justify-content: center;">
<MProgressCircular Size="40" Indeterminate Color="@Color"></MProgressCircular>
</div>
<div class="mt-3 text-center">正在加载......</div>

</div>

@code {
[Parameter]
public string Class { get; set; }
[Parameter]
public string Style { get; set; }
[Parameter]
public string Color { get; set; } = "primary";
}
4 changes: 2 additions & 2 deletions CnGalWebSite/CnGalWebSite.Core/CnGalWebSite.Core.csproj
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.4" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.5" />
</ItemGroup>

</Project>
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="7.0.10" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="8.0.0-rc.1.23421.29" />
</ItemGroup>
</Project>
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0-rc.1.23421.29" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0-rc.1.23419.4" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0-rc.1.23419.4" />
</ItemGroup>

<ItemGroup>
Expand Down
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>
Expand Down
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>1dcbfde8-0a22-4155-a546-7d381bc82e12</UserSecretsId>
Expand All @@ -22,15 +22,15 @@
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
<PackageReference Include="MediaInfo.Wrapper.Core" Version="21.9.3" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.0.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.6" />
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.34" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.11" />
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.35" />
<PackageReference Include="TweetinviAPI" Version="5.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0-rc.1.23421.29" />

<PackageReference Include="xFFmpeg.NET" Version="7.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.3">
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.11">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IdentityModel" Version="6.0.0" />
<PackageReference Include="IdentityModel" Version="6.2.0" />
</ItemGroup>

</Project>
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="7.0.3" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="8.0.0-rc.1.23421.29" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 2 additions & 4 deletions CnGalWebSite/CnGalWebSite.Helper/CnGalWebSite.Helper.csproj
@@ -1,16 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NodaTime" Version="3.1.7" />
<PackageReference Include="System.Linq" Version="4.3.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.1" />
<PackageReference Include="NodaTime" Version="3.1.9" />
</ItemGroup>

<ItemGroup>
Expand Down
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>e923589a-2369-4213-a95a-e982c8b31122</UserSecretsId>
Expand All @@ -10,11 +10,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IdentityModel" Version="6.0.0" />
<PackageReference Include="IdentityModel.AspNetCore" Version="4.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="7.0.3" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0-rc.1.23421.29" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit b444658

Please sign in to comment.