Change "first seen ... before" to "confirmed ... after"

This commit is contained in:
Mononaut 2024-04-01 06:19:26 +00:00
parent 855b20834e
commit 9b456954b1
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
2 changed files with 3 additions and 25 deletions

View File

@ -19,8 +19,8 @@
<td class="value"><i><app-time kind="since" [time]="time" [fastRender]="true"></app-time></i></td>
</tr>
<tr *ngIf="time && relativeTime">
<td class="label" i18n="transaction.first-seen|Transaction first seen">First seen</td>
<td class="value"><i><app-time kind="before" [time]="relativeTime - time"></app-time></i></td>
<td class="label" i18n="transaction.confirmed-after|Transaction confirmed after">Confirmed</td>
<td class="value"><i><app-time kind="span" [time]="relativeTime - time"></app-time></i></td>
</tr>
<tr>
<td class="label" i18n="dashboard.latest-transactions.amount">Amount</td>

View File

@ -23,7 +23,7 @@ export class TimeComponent implements OnInit, OnChanges, OnDestroy {
@Input() time: number;
@Input() dateString: number;
@Input() kind: 'plain' | 'since' | 'until' | 'span' | 'before' = 'plain';
@Input() kind: 'plain' | 'since' | 'until' | 'span' = 'plain';
@Input() fastRender = false;
@Input() fixedRender = false;
@Input() relative = false;
@ -206,28 +206,6 @@ export class TimeComponent implements OnInit, OnChanges, OnDestroy {
}
}
break;
case 'before':
if (number === 1) {
switch (unit) { // singular (1 day)
case 'year': return $localize`:@@time-span:${dateStrings.i18nYear}:DATE: before`; break;
case 'month': return $localize`:@@time-span:${dateStrings.i18nMonth}:DATE: before`; break;
case 'week': return $localize`:@@time-span:${dateStrings.i18nWeek}:DATE: before`; break;
case 'day': return $localize`:@@time-span:${dateStrings.i18nDay}:DATE: before`; break;
case 'hour': return $localize`:@@time-span:${dateStrings.i18nHour}:DATE: before`; break;
case 'minute': return $localize`:@@time-span:${dateStrings.i18nMinute}:DATE: before`; break;
case 'second': return $localize`:@@time-span:${dateStrings.i18nSecond}:DATE: before`; break;
}
} else {
switch (unit) { // plural (2 days)
case 'year': return $localize`:@@time-span:${dateStrings.i18nYears}:DATE: before`; break;
case 'month': return $localize`:@@time-span:${dateStrings.i18nMonths}:DATE: before`; break;
case 'week': return $localize`:@@time-span:${dateStrings.i18nWeeks}:DATE: before`; break;
case 'day': return $localize`:@@time-span:${dateStrings.i18nDays}:DATE: before`; break;
case 'hour': return $localize`:@@time-span:${dateStrings.i18nHours}:DATE: before`; break;
case 'minute': return $localize`:@@time-span:${dateStrings.i18nMinutes}:DATE: before`; break;
case 'second': return $localize`:@@time-span:${dateStrings.i18nSeconds}:DATE: before`; break;
}
}
break;
default:
if (number === 1) {