Skip to content

Commit

Permalink
Merge pull request #29 from bobbahbrown/v1.2.5
Browse files Browse the repository at this point in the history
Version 1.2.5 Release
  • Loading branch information
bobbah authored Nov 14, 2020
2 parents 8586540 + 82b3884 commit c04f74d
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 13 deletions.
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

0 comments on commit c04f74d

Please sign in to comment.