Skip to content

Commit

Permalink
uppercase URL in UIs
Browse files Browse the repository at this point in the history
  • Loading branch information
vadosnaprimer committed Jan 20, 2024
1 parent bd823d2 commit e28ccec
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion TASVideos/Pages/Games/Models/GameEditModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class GameEditModel
public string? Aliases { get; set; }

[StringLength(250)]
[Display(Name = "Screenshot Url")]
[Display(Name = "Screenshot URL")]
public string? ScreenshotUrl { get; set; }

[StringLength(300)]
Expand Down
2 changes: 1 addition & 1 deletion TASVideos/Pages/Publications/Edit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<table class="table table-bordered table-sm">
<tr>
<th>Type</th>
<th>Url</th>
<th>URL</th>
<th>Name</th>
</tr>
@foreach (var url in Model.Publication.Urls.OrderBy(f => f.Type))
Expand Down
2 changes: 1 addition & 1 deletion TASVideos/Pages/Publications/EditFiles.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<row condition="Model.Files.Any()">
<table class="table table-bordered">
<tr>
<td>Url</td>
<td>URL</td>
<td>Type</td>
<td>Description</td>
<td></td>
Expand Down
4 changes: 2 additions & 2 deletions TASVideos/Pages/Publications/Urls/Edit.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ public async Task<IActionResult> OnPost()
logwording = new string[2] { "Change", "change" };
}

string log = $"{logwording[0]}ed {DisplayName} {UrlType} url {PublicationUrl}";
string log = $"{logwording[0]}ed {DisplayName} {UrlType} URL {PublicationUrl}";
await _publicationMaintenanceLogger.Log(Id, User.GetUserId(), log);
var result = await ConcurrentSave(_db, log, $"Unable to {logwording[1]} URL.");
if (result)
{
await _publisher.SendPublicationEdit(
$"{Id}M edited by {User.Name()}",
$"[{Id}M]({{0}}) edited by {User.Name()}",
$"{logwording[0]}ed {UrlType} url | {Title}",
$"{logwording[0]}ed {UrlType} URL | {Title}",
$"{Id}M");

if (UrlType == PublicationUrlType.Streaming && _youtubeSync.IsYoutubeUrl(PublicationUrl))
Expand Down
4 changes: 2 additions & 2 deletions TASVideos/Pages/Publications/Urls/List.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<table class="table table-bordered table-striped">
<tr>
<th>Type</th>
<th>Url</th>
<th>URL</th>
<th>Name</th>
<th>Actions</th>
</tr>
Expand All @@ -32,7 +32,7 @@
class="btn btn-primary">
<i class="fa fa-pencil"></i> Edit
</a>
<delete-button warning-message="Are you sure you want to remove this url?"
<delete-button warning-message="Are you sure you want to remove this URL?"
asp-href="/Publications/@Model.Id/Urls/List/@url.Id/Delete">
<span class="fa fa-times"></span> Delete
</delete-button>
Expand Down
8 changes: 4 additions & 4 deletions TASVideos/Pages/Publications/Urls/List.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public ListUrlsModel(
[Required]
[BindProperty]
[Url]
[Display(Name = "Url")]
[Display(Name = "URL")]
public string PublicationUrl { get; set; } = "";

[Required]
Expand Down Expand Up @@ -82,15 +82,15 @@ public async Task<IActionResult> OnPostDelete(int publicationUrlId)
if (url != null)
{
_db.PublicationUrls.Remove(url);
string log = $"Deleted {url.DisplayName} {url.Type} url {url.Url}";
string log = $"Deleted {url.DisplayName} {url.Type} URL {url.Url}";
await _publicationMaintenanceLogger.Log(url.PublicationId, User.GetUserId(), log);
var result = await ConcurrentSave(_db, log, "Unable to remove url.");
var result = await ConcurrentSave(_db, log, "Unable to remove URL.");
if (result)
{
await _publisher.SendPublicationEdit(
$"{Id}M edited by {User.Name()}",
$"[{Id}M]({{0}}) edited by {User.Name()}",
$"Deleted {url.Type} url",
$"Deleted {url.Type} URL",
$"{Id}M");

await _youtubeSync.UnlistVideo(url.Url!);
Expand Down

0 comments on commit e28ccec

Please sign in to comment.