Skip to content

Commit a2e50db

Browse files
committed
Fix inconsistent messaging around expired legacy API key (#6384)
Address #6318
1 parent ad56c05 commit a2e50db

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/NuGetGallery/Views/Packages/_ImportReadMe.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
@ReadMePanel(
6060
@<div class="form-group editable">
6161
<input type="url" data-bind="value: Edit.ReadMe.SourceUrl" name="Edit.ReadMe.SourceUrl" class="form-control" id="ReadMeUrlInput"
62-
placeholder="https://raw.githubusercontent.com/*.md" aria-label="Enter documentation.md url" />
62+
placeholder="https://raw.githubusercontent.com/*.md" aria-label="Enter documentation.md URL" />
6363
<label id="ReadMeURLLabel" class="input-group-btn"></label>
6464
</div>,
6565
"readme-url", active: false)

src/NuGetGallery/Views/Users/ApiKeys.cshtml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,24 @@
125125
<ul class="list-inline icon-details" role="presentation">
126126
<li>
127127
<i class="ms-Icon ms-Icon--Stopwatch" aria-hidden="true"></i>
128-
<!-- ko if: Expires -->
129128
<!-- ko if: HasExpired -->
130129
Expired
131130
<!-- /ko -->
132131
<!-- ko ifnot: HasExpired -->
132+
<!-- ko if: Expires -->
133133
Expires <span data-bind="text: moment(Expires()).fromNow()"></span>
134134
<!-- /ko -->
135-
<!-- /ko -->
136135
<!-- ko ifnot: Expires -->
137136
Never expires
137+
@if (Config.Current.ExpirationInDaysForApiKeyV1 > 0)
138+
{
139+
<text>
140+
(<a href="https://aka.ms/nugetlegacyapikeys">if used every
141+
@Config.Current.ExpirationInDaysForApiKeyV1
142+
day@(Config.Current.ExpirationInDaysForApiKeyV1 != 1 ? "s" : string.Empty)</a>)
143+
</text>
144+
}
145+
<!-- /ko -->
138146
<!-- /ko -->
139147
</li>
140148
<li>

src/NuGetGallery/Views/Users/PasswordSent.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<h1>Password Reset Sent</h1>
1010

1111
<p>
12-
We've sent you an email containing a temporary url that will allow you to reset your NuGet.org
12+
We've sent you an email containing a temporary URL that will allow you to reset your NuGet.org
1313
account password for the next @if (@ViewBag.Expiration == 1)
1414
{
1515
<text>hour.</text>

0 commit comments

Comments
 (0)