1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-18 18:33:50 +00:00

[PM-31770] Fix Send expires text formatting (#18926)

* [PM-31770] Fix Send expires text formatting

* Address PR review comments
This commit is contained in:
Mike Amirault
2026-02-17 10:49:30 -05:00
committed by GitHub
parent c47881624a
commit c0e9678c06
3 changed files with 26 additions and 9 deletions

View File

@@ -9,12 +9,7 @@
@if (loading()) {
<div class="tw-text-center">
<i
class="bwi bwi-spinner bwi-spin bwi-2x tw-text-muted"
title="{{ 'loading' | i18n }}"
aria-hidden="true"
></i>
<span class="tw-sr-only">{{ "loading" | i18n }}</span>
<bit-spinner></bit-spinner>
</div>
} @else {
@if (unavailable()) {
@@ -47,7 +42,11 @@
}
}
@if (expirationDate()) {
<p class="tw-text-center tw-text-muted">Expires: {{ expirationDate() | date: "medium" }}</p>
@let formattedExpirationTime = expirationDate() | date: "shortTime";
@let formattedExpirationDate = expirationDate() | date: "mediumDate";
<p class="tw-text-center tw-text-muted tw-text-sm">
{{ "sendExpiresOn" | i18n: formattedExpirationTime : formattedExpirationDate }}
</p>
}
</div>
}

View File

@@ -21,7 +21,11 @@ import { SendAccessResponse } from "@bitwarden/common/tools/send/models/response
import { SendAccessView } from "@bitwarden/common/tools/send/models/view/send-access.view";
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
import { SendType } from "@bitwarden/common/tools/send/types/send-type";
import { AnonLayoutWrapperDataService, ToastService } from "@bitwarden/components";
import {
AnonLayoutWrapperDataService,
SpinnerComponent,
ToastService,
} from "@bitwarden/components";
import { KeyService } from "@bitwarden/key-management";
import { SharedModule } from "../../../shared";
@@ -32,7 +36,7 @@ import { SendAccessTextComponent } from "./send-access-text.component";
@Component({
selector: "app-send-view",
templateUrl: "send-view.component.html",
imports: [SendAccessFileComponent, SendAccessTextComponent, SharedModule],
imports: [SendAccessFileComponent, SendAccessTextComponent, SharedModule, SpinnerComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class SendViewComponent implements OnInit {

View File

@@ -12948,5 +12948,19 @@
},
"paymentMethodUpdateError": {
"message": "There was an error updating your payment method."
},
"sendExpiresOn": {
"message": "This Send expires at $TIME$ on $DATE$",
"placeholders": {
"time": {
"content": "$1",
"example": "10:00 AM"
},
"date": {
"content": "$2",
"example": "Jan 1, 1970"
}
},
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
}
}