diff --git a/BuildFeed.Model/Build.cs b/BuildFeed.Model/Build.cs index 2e6007b..dea6d79 100644 --- a/BuildFeed.Model/Build.cs +++ b/BuildFeed.Model/Build.cs @@ -140,7 +140,7 @@ private void GenerateFamily() { Family = ProjectFamily.Redstone2; } - else if(Lab?.StartsWith("rs1", StringComparison.InvariantCultureIgnoreCase) ?? false) + else if (Lab?.StartsWith("rs1", StringComparison.InvariantCultureIgnoreCase) ?? false) { Family = ProjectFamily.Redstone; } diff --git a/BuildFeed.Model/BuildDetails.cs b/BuildFeed.Model/BuildDetails.cs index b88b6ae..7595bbe 100644 --- a/BuildFeed.Model/BuildDetails.cs +++ b/BuildFeed.Model/BuildDetails.cs @@ -29,7 +29,8 @@ public class BuildDetails public string Lab { get; set; } [Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_BuildTime))] - [DisplayFormat(ConvertEmptyStringToNull = true, ApplyFormatInEditMode = true, + [DisplayFormat(ConvertEmptyStringToNull = true, + ApplyFormatInEditMode = true, DataFormatString = "{0:yyMMdd-HHmm}")] public DateTime? BuildTime { get; set; } diff --git a/BuildFeed.Model/BuildRepository.cs b/BuildFeed.Model/BuildRepository.cs index 93f1466..6c91c48 100644 --- a/BuildFeed.Model/BuildRepository.cs +++ b/BuildFeed.Model/BuildRepository.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Configuration; using System.Linq; using System.Threading.Tasks; using BuildFeed.Model.View; @@ -142,7 +141,7 @@ public async Task SelectFrontPage(ProjectFamily family) IFindFluent query = _buildCollection.Find(new BsonDocument { - { "$where", "!this.LabUrl.contains(\"xbox\")"}, + {"$where", "!this.LabUrl.contains(\"xbox\")"}, { nameof(Build.Family), family } @@ -151,7 +150,7 @@ public async Task SelectFrontPage(ProjectFamily family) query = _buildCollection.Find(new BsonDocument { - { "$where", "!this.LabUrl.contains(\"xbox\")"}, + {"$where", "!this.LabUrl.contains(\"xbox\")"}, { nameof(Build.Family), family }, @@ -175,7 +174,7 @@ public async Task SelectFrontPage(ProjectFamily family) query = _buildCollection.Find(new BsonDocument { - { "$where", "((this.MajorVersion === 10 && this.LabUrl.contains(\"_release\")) || this.MajorVersion < 10) && !this.LabUrl.contains(\"xbox\")"}, + {"$where", "((this.MajorVersion === 10 && this.LabUrl.contains(\"_release\")) || this.MajorVersion < 10) && !this.LabUrl.contains(\"xbox\")"}, { nameof(Build.Family), family }, @@ -196,7 +195,7 @@ public async Task SelectFrontPage(ProjectFamily family) query = _buildCollection.Find(new BsonDocument { - { "$where", "this.LabUrl.contains(\"xbox\")"}, + {"$where", "this.LabUrl.contains(\"xbox\")"}, { nameof(Build.Family), family } diff --git a/BuildFeed.Model/ProjectFamily.cs b/BuildFeed.Model/ProjectFamily.cs index b04c8de..0f8bf0e 100644 --- a/BuildFeed.Model/ProjectFamily.cs +++ b/BuildFeed.Model/ProjectFamily.cs @@ -48,7 +48,7 @@ public enum ProjectFamily [Display(Name = "Redstone 2 (Feature Update)")] Feature2 = 41, - [Display(Name = "Redstone 3")] + [Display(Name = "Redstone 3", Description = "Windows 10 (Fall Creators Update)")] Redstone3 = 50 } } \ No newline at end of file diff --git a/BuildFeed/Code/Base32Encoding.cs b/BuildFeed/Code/Base32Encoding.cs index 866249c..080e7b1 100644 --- a/BuildFeed/Code/Base32Encoding.cs +++ b/BuildFeed/Code/Base32Encoding.cs @@ -86,7 +86,9 @@ public static string ToString(byte[] input) { returnArray[arrayIndex++] = ValueToChar(nextChar); while (arrayIndex != charCount) + { returnArray[arrayIndex++] = '='; //padding + } } return new string(returnArray); diff --git a/BuildFeed/Code/DisplayHelpers.cs b/BuildFeed/Code/DisplayHelpers.cs index 49161d4..c66196b 100644 --- a/BuildFeed/Code/DisplayHelpers.cs +++ b/BuildFeed/Code/DisplayHelpers.cs @@ -10,7 +10,8 @@ namespace BuildFeed.Code { public static class MvcExtensions { - public static IHtmlString CheckboxListForEnum(this HtmlHelper html, string id, T currentItem) where T : struct + public static IHtmlString CheckboxListForEnum(this HtmlHelper html, string id, T currentItem) + where T : struct { StringBuilder sb = new StringBuilder(); @@ -53,7 +54,12 @@ public static IHtmlString CheckboxListForEnum(this HtmlHelper html, string id public static string GetDisplayTextForEnum(object o) { string result = null; - DisplayAttribute display = o.GetType().GetMember(o.ToString()).First().GetCustomAttributes(false).OfType().LastOrDefault(); + DisplayAttribute display = o.GetType() + .GetMember(o.ToString()) + .First() + .GetCustomAttributes(false) + .OfType() + .LastOrDefault(); if (display != null) { diff --git a/BuildFeed/Code/OneSignalHelper.cs b/BuildFeed/Code/OneSignalHelper.cs index ce8f70f..637898d 100644 --- a/BuildFeed/Code/OneSignalHelper.cs +++ b/BuildFeed/Code/OneSignalHelper.cs @@ -22,7 +22,7 @@ public static void PushNewBuild(this OneSignalClient osc, Build build, string ur #if DEBUG "Testers" #else - "All" + "All" #endif }, Headings = diff --git a/BuildFeed/Views/support/credits.cshtml b/BuildFeed/Views/support/credits.cshtml index 2bf3307..709e771 100644 --- a/BuildFeed/Views/support/credits.cshtml +++ b/BuildFeed/Views/support/credits.cshtml @@ -87,9 +87,10 @@
Fuhrer_Adolf 
Vietnamese (@System.Globalization.CultureInfo.GetCultureInfo("vi").NativeName) Translation
Trần Kim Long Hải 
-
Chinese - Simplified (@System.Globalization.CultureInfo.GetCultureInfo("zh-cn").NativeName) Translation
+
Chinese - Simplified (@System.Globalization.CultureInfo.GetCultureInfo("zh-hans").NativeName) Translation
Zheng He 
-
Chinese - Traditional (@System.Globalization.CultureInfo.GetCultureInfo("zh-tw").NativeName) Translation
+
Chinese - Traditional (@System.Globalization.CultureInfo.GetCultureInfo("zh-hant").NativeName) Translation
Andrew Huang 
+
Link Chu 
\ No newline at end of file diff --git a/BuildFeed/Views/support/sitemap.cshtml b/BuildFeed/Views/support/sitemap.cshtml index d137300..f71448e 100644 --- a/BuildFeed/Views/support/sitemap.cshtml +++ b/BuildFeed/Views/support/sitemap.cshtml @@ -1,4 +1,5 @@ -@using BuildFeed.Model.View +@using BuildFeed.Controllers +@using BuildFeed.Model.View @model BuildFeed.Model.View.SitemapData @{ ViewBag.Title = $"{VariantTerms.Common_Sitemap} | {InvariantTerms.SiteName}"; @@ -8,11 +9,11 @@