mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-24 07:02:51 +08:00
chore: 🔨 npm update
This commit is contained in:
parent
f50dfc8f19
commit
72cc3c42fd
@ -138,6 +138,8 @@ public abstract class RepositoryService<TEntity, TPrimary, TLogger>(BasicReposit
|
||||
{
|
||||
var ret = includeFields!.ToDictionary(
|
||||
x => x, x => typeof(TEntity).GetProperty(x, BindingFlags.Public | BindingFlags.Instance)!.GetValue(entity));
|
||||
|
||||
// ReSharper disable once ConvertIfStatementToSwitchStatement
|
||||
if (entity is IFieldModifiedUser) {
|
||||
var userInfo = App.GetService<ContextUserInfo>();
|
||||
if (userInfo == null) {
|
||||
@ -148,6 +150,7 @@ public abstract class RepositoryService<TEntity, TPrimary, TLogger>(BasicReposit
|
||||
ret.Add(nameof(IFieldModifiedUser.ModifiedUserName), userInfo.UserName);
|
||||
}
|
||||
|
||||
// ReSharper disable once SuspiciousTypeConversion.Global
|
||||
if (entity is IFieldModifiedClientIp) {
|
||||
ret.Add(nameof(IFieldModifiedClientIp.ModifiedClientIp), App.HttpContext?.GetRealIpAddress()?.MapToIPv4().ToString().IpV4ToInt32());
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
namespace NetAdmin.Host.Middlewares;
|
||||
|
||||
/// <summary>
|
||||
/// 输出环境信息到 http header
|
||||
/// </summary>
|
||||
public sealed class EnvironmentInfoMiddleware(RequestDelegate next)
|
||||
{
|
||||
/// <summary>
|
||||
/// 主函数
|
||||
/// </summary>
|
||||
public Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
context.Response.Headers.Append("X-Node", Environment.MachineName);
|
||||
return next(context);
|
||||
}
|
||||
}
|
@ -37,12 +37,12 @@ public static class CaptchaImageHelper
|
||||
await using var tranStream = resAsm.GetManifestResourceStream($"{tempPath}._{templateIndex}.transparent.png");
|
||||
|
||||
// 底图
|
||||
using var backgroundImage = await Image.LoadAsync<Rgba32>(bgStream).ConfigureAwait(false);
|
||||
using var backgroundImage = await Image.LoadAsync<Rgba32>(bgStream!).ConfigureAwait(false);
|
||||
|
||||
using var darkTemplateImage = await Image.LoadAsync<Rgba32>(darkStream).ConfigureAwait(false);
|
||||
using var darkTemplateImage = await Image.LoadAsync<Rgba32>(darkStream!).ConfigureAwait(false);
|
||||
|
||||
// 透明模板图
|
||||
using var transparentTemplateImage = await Image.LoadAsync<Rgba32>(tranStream).ConfigureAwait(false);
|
||||
using var transparentTemplateImage = await Image.LoadAsync<Rgba32>(tranStream!).ConfigureAwait(false);
|
||||
|
||||
// 调整模板图大小
|
||||
darkTemplateImage.Mutate(x => x.Resize(sliderSize));
|
||||
|
@ -49,8 +49,10 @@ public sealed class RedisLocker : IAsyncDisposable
|
||||
return new RedisLocker(redisDatabase, lockerName);
|
||||
}
|
||||
|
||||
if (retryCount > 1) {
|
||||
await Task.Delay(retryDelay).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
throw new NetAdminGetLockerException(lockerName);
|
||||
}
|
||||
|
@ -10,12 +10,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "2.3.1",
|
||||
"ace-builds": "1.37.1",
|
||||
"aieditor": "1.3.3",
|
||||
"ace-builds": "1.37.4",
|
||||
"aieditor": "1.3.4",
|
||||
"axios": "1.7.9",
|
||||
"crypto-js": "4.2.0",
|
||||
"echarts": "5.6.0",
|
||||
"element-plus": "2.9.1",
|
||||
"element-plus": "2.9.3",
|
||||
"json-bigint": "1.0.0",
|
||||
"markdown-it": "14.1.0",
|
||||
"markdown-it-emoji": "3.0.0",
|
||||
@ -34,9 +34,9 @@
|
||||
"@vitejs/plugin-vue": "5.2.1",
|
||||
"prettier": "3.4.2",
|
||||
"prettier-plugin-organize-attributes": "1.0.0",
|
||||
"sass": "1.83.0",
|
||||
"sass": "1.83.1",
|
||||
"terser": "5.37.0",
|
||||
"vite": "6.0.6"
|
||||
"vite": "6.0.7"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
|
Loading…
x
Reference in New Issue
Block a user