Compare commits
2 Commits
develop
...
2021.10.20
Author | SHA1 | Date | |
---|---|---|---|
7eb45f2bc9 | |||
5837885653 |
@ -22,7 +22,7 @@ namespace IW4MAdmin.Application.API.Master
|
|||||||
public int Uptime { get; set; }
|
public int Uptime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specifices the version of the instance
|
/// Specifies the version of the instance
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("version")]
|
[JsonProperty("version")]
|
||||||
[JsonConverter(typeof(BuildNumberJsonConverter))]
|
[JsonConverter(typeof(BuildNumberJsonConverter))]
|
||||||
@ -33,5 +33,11 @@ namespace IW4MAdmin.Application.API.Master
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("servers")]
|
[JsonProperty("servers")]
|
||||||
public List<ApiServer> Servers { get; set; }
|
public List<ApiServer> Servers { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Url IW4MAdmin is listening on
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("webfront_url")]
|
||||||
|
public string WebfrontUrl { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,8 @@ namespace IW4MAdmin.Application.Misc
|
|||||||
Id = s.EndPoint,
|
Id = s.EndPoint,
|
||||||
Port = (short)s.Port,
|
Port = (short)s.Port,
|
||||||
IPAddress = s.IP
|
IPAddress = s.IP
|
||||||
}).ToList()
|
}).ToList(),
|
||||||
|
WebfrontUrl = _appConfig.WebfrontUrl
|
||||||
};
|
};
|
||||||
|
|
||||||
Response<ResultMessage> response = null;
|
Response<ResultMessage> response = null;
|
||||||
|
@ -162,15 +162,29 @@ namespace SharedLibraryCore.Services
|
|||||||
.Where(p => p.LinkId == linkId)
|
.Where(p => p.LinkId == linkId)
|
||||||
.Where(filter);
|
.Where(filter);
|
||||||
|
|
||||||
var iqIpPenalties = _appConfig.EnableImplicitAccountLinking
|
IQueryable<EFPenalty> iqIpPenalties;
|
||||||
? context.Aliases
|
|
||||||
|
if (_appConfig.EnableImplicitAccountLinking)
|
||||||
|
{
|
||||||
|
iqIpPenalties = context.Aliases
|
||||||
.Where(a => a.IPAddress != null && a.IPAddress == ip)
|
.Where(a => a.IPAddress != null && a.IPAddress == ip)
|
||||||
.SelectMany(a => a.Link.ReceivedPenalties)
|
.SelectMany(a => a.Link.ReceivedPenalties)
|
||||||
.Where(filter)
|
|
||||||
: context.Penalties.Where(penalty =>
|
|
||||||
penalty.Offender.CurrentAlias.IPAddress != null &&
|
|
||||||
penalty.Offender.CurrentAlias.IPAddress == ip)
|
|
||||||
.Where(filter);
|
.Where(filter);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var aliasIps = await context.Aliases.Where(alias => alias.LinkId == linkId && alias.IPAddress != null)
|
||||||
|
.Select(alias => alias.IPAddress)
|
||||||
|
.ToListAsync();
|
||||||
|
if (ip != null)
|
||||||
|
{
|
||||||
|
aliasIps.Add(ip);
|
||||||
|
}
|
||||||
|
|
||||||
|
iqIpPenalties = context.Penalties
|
||||||
|
.Where(penalty => aliasIps.Contains(penalty.Offender.CurrentAlias.IPAddress))
|
||||||
|
.Where(filter);
|
||||||
|
}
|
||||||
|
|
||||||
var activePenalties = (await iqLinkPenalties.ToListAsync())
|
var activePenalties = (await iqLinkPenalties.ToListAsync())
|
||||||
.Union(await iqIpPenalties.ToListAsync())
|
.Union(await iqIpPenalties.ToListAsync())
|
||||||
|
@ -202,6 +202,6 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@await RenderSectionAsync("scripts", required: false)
|
@await RenderSectionAsync("scripts", required: false)
|
||||||
@Html.Raw(ViewBag.ScriptInjection);
|
@Html.Raw(ViewBag.ScriptInjection)
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -78,10 +78,6 @@
|
|||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Remove="Views\Plugins\**" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Remove="Views\Plugins\**" />
|
<EmbeddedResource Remove="Views\Plugins\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@ -96,7 +92,7 @@
|
|||||||
<Exec Command="if $(ConfigurationName) == Debug ( 
powershell -Command wget https://raw.githubusercontent.com/iconic/open-iconic/master/font/css/open-iconic-bootstrap.scss -o $(ProjectDir)wwwroot\lib\open-iconic\font\css\open-iconic-bootstrap.scss
echo d | xcopy /f /y $(ProjectDir)wwwroot\lib\open-iconic\font\fonts $(ProjectDir)wwwroot\font\
)" />
|
<Exec Command="if $(ConfigurationName) == Debug ( 
powershell -Command wget https://raw.githubusercontent.com/iconic/open-iconic/master/font/css/open-iconic-bootstrap.scss -o $(ProjectDir)wwwroot\lib\open-iconic\font\css\open-iconic-bootstrap.scss
echo d | xcopy /f /y $(ProjectDir)wwwroot\lib\open-iconic\font\fonts $(ProjectDir)wwwroot\font\
)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="MyPreCompileTarget" BeforeTargets="Build">
|
<Target Name="MyPreCompileTarget" BeforeTargets="Build" Condition="'$(Configuration)'!='Debug'">
|
||||||
<Exec Command="dotnet bundle" />
|
<Exec Command="dotnet bundle" />
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
Reference in New Issue
Block a user