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

Show cataloged Goal instead of submitted Branch if set #1983

Merged
merged 1 commit into from
Sep 5, 2024
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
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
Loading