Skip to content

Commit

Permalink
show goal instead of submitted branch if set. affects frontpage, subs…
Browse files Browse the repository at this point in the history
…list, and publish dialogue
  • Loading branch information
Masterjun3 committed Sep 5, 2024
1 parent 43f2d15 commit 78e1d77
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions TASVideos/Extensions/EntityExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public static List<SelectListItem> WithAnyEntry(this IEnumerable<SelectListItem>
Game = s.GameVersion != null && !string.IsNullOrWhiteSpace(s.GameVersion.TitleOverride) ? s.GameVersion.TitleOverride : s.Game != null ? s.Game.DisplayName : s.GameName,
Frames = s.Frames,
FrameRate = s.SystemFrameRateId != null ? s.SystemFrameRate!.FrameRate : 60,
Branch = s.Branch,
Goal = s.GameGoal != null ? s.GameGoal.DisplayName : s.Branch,
By = s.SubmissionAuthors.OrderBy(sa => sa.Ordinal).Select(sa => sa.Author!.UserName).ToList(),
AdditionalAuthors = s.AdditionalAuthors,
Date = s.CreateTimestamp,
Expand Down Expand Up @@ -553,7 +553,7 @@ public static List<SelectListItem> WithAnyEntry(this IEnumerable<SelectListItem>
SystemFrameRateId = s.SystemFrameRateId,
Status = s.Status,
EmulatorVersion = s.EmulatorVersion,
Branch = s.Branch,
Goal = s.GameGoal != null ? s.GameGoal.DisplayName : s.Branch,
GameGoalId = s.GameGoalId
});
}
Expand Down
2 changes: 1 addition & 1 deletion TASVideos/Pages/Submissions/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<tr>
<td>@item.System</td>
<td><sub-link id="item.Id">@item.Game</sub-link></td>
<td>@item.Branch</td>
<td>@(item.Goal == "baseline" ? "" : item.Goal)</td>
<td>@(item.Time.ToStringWithOptionalDaysAndHours())</td>
<td><author-list authors="item.By" additional-authors="@item.AdditionalAuthors"></author-list></td>
<td><timezone-convert asp-for="@item.Date" date-only="true" /></td>
Expand Down
2 changes: 1 addition & 1 deletion TASVideos/Pages/Submissions/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class SubmissionEntry : ITimeable, ISubmissionDisplay
public string? Game { get; init; }

[Sortable]
public string? Branch { get; init; }
public string? Goal { get; init; }
public TimeSpan Time => this.Time();
public List<string>? By { get; init; }

Expand Down
4 changes: 2 additions & 2 deletions TASVideos/Pages/Submissions/Publish.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
</span>
</row>
<row>
<label class="col-sm-3" asp-for="Submission.Branch"></label>
<span class="col-sm-9">@Model.Submission.Branch</span>
<label class="col-sm-3" asp-for="Submission.Goal"></label>
<span class="col-sm-9">@Model.Submission.Goal</span>
</row>
</column>
</row>
Expand Down
2 changes: 1 addition & 1 deletion TASVideos/Pages/Submissions/Publish.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public class SubmissionPublishModel
public SubmissionStatus Status { get; init; }
public int? GameGoalId { get; init; }
public string? EmulatorVersion { get; init; }
public string? Branch { get; init; }
public string? Goal { get; init; }

public bool CanPublish => SystemId > 0
&& SystemFrameRateId.HasValue
Expand Down
2 changes: 1 addition & 1 deletion TASVideos/WikiModules/FrontPageSubmissionList.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</row>
<row class="align-items-center">
<div class="col-auto px-1">
<span class="fs-6 fs-sm-5">@sub.Game</span><span condition="!string.IsNullOrEmpty(sub.Branch)" class="fs-6 fs-sm-5"> "@sub.Branch"</span>
<span class="fs-6 fs-sm-5">@sub.Game</span><span condition="!string.IsNullOrEmpty(sub.Goal)" class="fs-6 fs-sm-5"> "@sub.Goal"</span>
</div>
<div class="col-auto ms-auto text-end">
<row>
Expand Down

0 comments on commit 78e1d77

Please sign in to comment.