Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.2.5 Release #29

Merged
merged 1 commit into from
Nov 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CentCom.API/CentCom.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.2.4</Version>
<AssemblyVersion>1.2.4.0</AssemblyVersion>
<FileVersion>1.2.4.0</FileVersion>
<Version>1.2.5</Version>
<AssemblyVersion>1.2.5.0</AssemblyVersion>
<FileVersion>1.2.5.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
1 change: 1 addition & 0 deletions CentCom.API/Models/BanData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class BanData
public string BanID { get; set; }
public List<string> Jobs { get; set; }
public List<string> BanAttributes { get; set; }
public bool Active => (!Expires.HasValue || Expires.Value > DateTime.UtcNow) && UnbannedBy == null;

public static BanData FromBan(Ban ban)
{
Expand Down
1 change: 0 additions & 1 deletion CentCom.API/Services/Implemented/BanService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace CentCom.API.Services.Implemented
Expand Down
13 changes: 10 additions & 3 deletions CentCom.API/Views/Viewer/viewbans.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
{
thisBan.Insert(0, ("Jobs", string.Join(", ", b.Jobs)));
}
if (b.UnbannedBy != null)
{
thisBan.Add(("Unbanned By", b.UnbannedBy));
}
banTraits.Add(b.ID, thisBan);
}
}
Expand All @@ -47,9 +51,9 @@

@foreach (var b in Model.Bans.OrderByDescending(x => x.BannedOn))
{
<div class="ban-container @(b.Expires.HasValue && b.Expires.Value < DateTime.UtcNow ? "expired-ban" : "active-ban")">
<div class="ban-container @(b.Active ? "active-ban" : "expired-ban")">
<div class="ban-title">
<span>@(b.Type) Ban / @b.SourceName / @(b.Expires.HasValue && b.Expires.Value < DateTime.UtcNow ? "Expired" : "Active")</span>
<span>@(b.Type) Ban / @b.SourceName / @(b.Active ? "Active" : "Expired")</span>
</div>
<div class="ban-contents">
<div class="ban-reason">@b.Reason</div>
Expand All @@ -58,11 +62,14 @@
{
<span class="ban-trait"><b class="ban-trait-title">@kvp.title</b>: @kvp.value</span>
}
@if (b.BanAttributes?.Count() > 0)
{
<span class="ban-trait"><b class="ban-trait-title">CentCom Attributes</b>: @(string.Join(", ", b.BanAttributes))</span>
}
</div>
</div>
</div>
}

}
}
</div>
6 changes: 3 additions & 3 deletions CentCom.Common/CentCom.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>1.2.4</Version>
<AssemblyVersion>1.2.4.0</AssemblyVersion>
<FileVersion>1.2.4.0</FileVersion>
<Version>1.2.5</Version>
<AssemblyVersion>1.2.5.0</AssemblyVersion>
<FileVersion>1.2.5.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions CentCom.Server/CentCom.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyVersion>1.2.4.0</AssemblyVersion>
<FileVersion>1.2.4.0</FileVersion>
<Version>1.2.4</Version>
<AssemblyVersion>1.2.5.0</AssemblyVersion>
<FileVersion>1.2.5.0</FileVersion>
<Version>1.2.5</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 7 additions & 0 deletions publish-script.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
rmdir /Q /S publish
rmdir /Q /S CentCom.API\bin
rmdir /Q /S CentCom.API\obj
rmdir /Q /S CentCom.Common\bin
rmdir /Q /S CentCom.Common\obj
rmdir /Q /S CentCom.Server\bin
rmdir /Q /S CentCom.Server\obj
dotnet publish CentCom.API -o publish/linux-x64/CentCom.API/ -r "linux-x64" --self-contained false
7z a publish/CentCom.API-linux-x64.zip -r ./publish/linux-x64/CentCom.API/*
dotnet publish CentCom.Server -o publish/linux-x64/CentCom.Server -r "linux-x64" --self-contained false
Expand Down