Polish launcher request card metadata
This commit is contained in:
parent
15fb52d316
commit
ab52d045fa
2 changed files with 28 additions and 3 deletions
|
|
@ -525,6 +525,18 @@ function formatRequestTimestamp(value: string): string {
|
|||
}).format(parsed);
|
||||
}
|
||||
|
||||
function formatRequestSubmittedDate(value: string): string {
|
||||
const parsed = Date.parse(String(value || ""));
|
||||
if (!Number.isFinite(parsed)) {
|
||||
return "Recently";
|
||||
}
|
||||
return new Intl.DateTimeFormat(undefined, {
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
}).format(parsed);
|
||||
}
|
||||
|
||||
function normalizeAnalysisState(value: string | undefined): string {
|
||||
return String(value || "").trim().toLowerCase();
|
||||
}
|
||||
|
|
@ -2198,6 +2210,9 @@ function WorldshaperLauncher() {
|
|||
<h3 className="launcher-request-entry-title">{requestEntry.title}</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div className="launcher-request-entry-date" title={`Submitted ${formatRequestSubmittedDate(requestEntry.createdAt)}`}>
|
||||
{formatRequestSubmittedDate(requestEntry.createdAt)}
|
||||
</div>
|
||||
</div>
|
||||
{requestEntry.tags.length > 0 ? (
|
||||
<div className="launcher-request-tags">
|
||||
|
|
|
|||
|
|
@ -234,8 +234,7 @@ body {
|
|||
}
|
||||
|
||||
.launcher-board-tabs {
|
||||
display: inline-grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
width: min(280px, 100%);
|
||||
padding: 4px;
|
||||
|
|
@ -245,8 +244,9 @@ body {
|
|||
}
|
||||
|
||||
.launcher-board-tab {
|
||||
flex: 1 1 0;
|
||||
min-height: 42px;
|
||||
width: 100%;
|
||||
width: 0;
|
||||
min-width: 0;
|
||||
padding: 10px 18px;
|
||||
border-color: transparent;
|
||||
|
|
@ -976,6 +976,16 @@ body {
|
|||
min-width: 0;
|
||||
}
|
||||
|
||||
.launcher-request-entry-date {
|
||||
flex: 0 0 auto;
|
||||
padding-top: 2px;
|
||||
color: #90a8cd;
|
||||
font-size: 10px;
|
||||
line-height: 1.2;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.launcher-request-status-pill {
|
||||
padding: 4px 9px;
|
||||
border: 1px solid #365782;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue