Update release notes and deploy workspace
This commit is contained in:
@@ -29,21 +29,26 @@ public static partial class PublicEndpoints
|
||||
var today = DateOnly.FromDateTime(DateTime.UtcNow);
|
||||
var showactApplicationsOpenNow = ShowactApplicationSchedule.IsOpenNow(siteSettings, today);
|
||||
|
||||
var canExposeCurrentSeasonWinners = CanExposeCurrentSeasonWinners(season.CurrentPhase);
|
||||
var latestPublishedWinnerYear = await db.Results
|
||||
.AsNoTracking()
|
||||
.Where(result => result.Season.WinnersPublishedAt != null)
|
||||
.Select(result => (int?)result.Season.Year)
|
||||
.MaxAsync();
|
||||
|
||||
var winnerPreviewRows = await db.Results
|
||||
.AsNoTracking()
|
||||
.Include(result => result.Season)
|
||||
.Include(result => result.Candidate)
|
||||
.Where(result =>
|
||||
result.Season.Year < season.Year
|
||||
|| canExposeCurrentSeasonWinners && result.Season.Year == season.Year)
|
||||
.Where(result => result.Season.WinnersPublishedAt != null
|
||||
&& latestPublishedWinnerYear != null
|
||||
&& result.Season.Year == latestPublishedWinnerYear.Value)
|
||||
.OrderByDescending(result => result.Season.Year)
|
||||
.ThenBy(result => result.CategoryName)
|
||||
.Take(8)
|
||||
.Select(result => new
|
||||
{
|
||||
Year = result.Season.Year,
|
||||
CategoryGroup = result.Category.GroupName,
|
||||
result.CategoryName,
|
||||
WinnerName = result.Candidate.DisplayName,
|
||||
WinnerSlug = result.Candidate.ChannelSlug,
|
||||
@@ -58,6 +63,7 @@ public static partial class PublicEndpoints
|
||||
var winnerPreviewItems = winnerPreviewRows
|
||||
.Select(result => new WinnerPreviewDto(
|
||||
result.Year,
|
||||
result.CategoryGroup,
|
||||
result.CategoryName,
|
||||
result.WinnerName,
|
||||
result.WinnerSlug,
|
||||
@@ -71,9 +77,9 @@ public static partial class PublicEndpoints
|
||||
|
||||
var archiveYearRows = await db.Results
|
||||
.AsNoTracking()
|
||||
.Where(result =>
|
||||
result.Season.Year < season.Year
|
||||
|| canExposeCurrentSeasonWinners && result.Season.Year == season.Year)
|
||||
.Where(result => result.Season.WinnersPublishedAt != null
|
||||
&& latestPublishedWinnerYear != null
|
||||
&& result.Season.Year < latestPublishedWinnerYear.Value)
|
||||
.GroupBy(result => result.Season.Year)
|
||||
.Select(group => new
|
||||
{
|
||||
@@ -100,6 +106,10 @@ public static partial class PublicEndpoints
|
||||
.ThenBy(category => category.Name, StringComparer.OrdinalIgnoreCase)
|
||||
.ToArray();
|
||||
var first = ordered[0];
|
||||
var groupDescription = ordered
|
||||
.Select(category => category.Description?.Trim())
|
||||
.FirstOrDefault(description => !string.IsNullOrWhiteSpace(description))
|
||||
?? string.Empty;
|
||||
var maxNomineesPerUser = ordered
|
||||
.Select(category => category.MaxNomineesPerUser)
|
||||
.Where(value => value > 0)
|
||||
@@ -110,7 +120,7 @@ public static partial class PublicEndpoints
|
||||
first.Id,
|
||||
first.GroupName,
|
||||
first.GroupName,
|
||||
first.Description,
|
||||
groupDescription,
|
||||
maxNomineesPerUser);
|
||||
})
|
||||
.OrderBy(category => publicCategories
|
||||
@@ -124,7 +134,6 @@ public static partial class PublicEndpoints
|
||||
season.Name,
|
||||
season.ShowDate,
|
||||
season.ShowStartsAt,
|
||||
SeasonMappings.NormalizeSeasonStreamUrl(season.ShowStreamUrl),
|
||||
season.CurrentPhase,
|
||||
season.IsCommunityOnly,
|
||||
"Twitch",
|
||||
@@ -146,6 +155,23 @@ public static partial class PublicEndpoints
|
||||
siteSettings.ShareDiscordUrl,
|
||||
siteSettings.PrivacyEmail,
|
||||
siteSettings.PrivacyPolicyContent,
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.AwardsSectionTitle),
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.AwardsSectionDescription),
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.SubcategoriesSectionTitle),
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.SubcategoriesSectionDescription),
|
||||
new PublicStreamBannerContentDto(
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.StreamBannerEyebrow),
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.StreamBannerTitle),
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.StreamBannerText),
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.StreamBannerLiveButtonLabel),
|
||||
SeasonMappings.NormalizeSeasonStreamUrl(siteSettings.StreamBannerLiveButtonUrl),
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.StreamBannerLockedButtonLabel),
|
||||
siteSettings.StreamBannerUseCompletedContent,
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.StreamBannerCompletedEyebrow),
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.StreamBannerCompletedTitle),
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.StreamBannerCompletedText),
|
||||
SeasonMappings.NormalizePlainTextContent(siteSettings.StreamBannerCompletedButtonLabel),
|
||||
SeasonMappings.NormalizeSeasonStreamUrl(siteSettings.StreamBannerCompletedButtonUrl)),
|
||||
SeasonMappings.ReadSocialLinks(siteSettings),
|
||||
SeasonMappings.BuildFooterLinks(siteSettings)),
|
||||
new PublicFeatureFlagsDto(
|
||||
|
||||
Reference in New Issue
Block a user