mirror of
https://github.com/bitwarden/browser.git
synced 2025-04-16 20:27:03 +02:00
[PM-15094] Update remove sponsorship modal content (#12319)
* Update remove sponsorship modal content * PM-15915
This commit is contained in:
parent
f8c33ea04b
commit
5c345c9ee4
apps/web/src
@ -12,7 +12,6 @@ import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
|||||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
|
||||||
import { DialogService, ToastService } from "@bitwarden/components";
|
import { DialogService, ToastService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -35,7 +34,6 @@ export class SponsoringOrgRowComponent implements OnInit {
|
|||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
|
||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private configService: ConfigService,
|
private configService: ConfigService,
|
||||||
@ -87,14 +85,21 @@ export class SponsoringOrgRowComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
get isSentAwaitingSync() {
|
|
||||||
return this.isSelfHosted && !this.sponsoringOrg.familySponsorshipLastSyncDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
private async doRevokeSponsorship() {
|
private async doRevokeSponsorship() {
|
||||||
|
const content = this.sponsoringOrg.familySponsorshipValidUntil
|
||||||
|
? this.i18nService.t(
|
||||||
|
"updatedRevokeSponsorshipConfirmationForAcceptedSponsorship",
|
||||||
|
this.sponsoringOrg.familySponsorshipFriendlyName,
|
||||||
|
formatDate(this.sponsoringOrg.familySponsorshipValidUntil, "MM/dd/yyyy", this.locale),
|
||||||
|
)
|
||||||
|
: this.i18nService.t(
|
||||||
|
"updatedRevokeSponsorshipConfirmationForSentSponsorship",
|
||||||
|
this.sponsoringOrg.familySponsorshipFriendlyName,
|
||||||
|
);
|
||||||
|
|
||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: `${this.i18nService.t("remove")} ${this.sponsoringOrg.familySponsorshipFriendlyName}?`,
|
title: `${this.i18nService.t("removeSponsorship")}?`,
|
||||||
content: { key: "revokeSponsorshipConfirmation" },
|
content,
|
||||||
acceptButtonText: { key: "remove" },
|
acceptButtonText: { key: "remove" },
|
||||||
type: "warning",
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
@ -6156,9 +6156,6 @@
|
|||||||
"emailSent": {
|
"emailSent": {
|
||||||
"message": "Email sent"
|
"message": "Email sent"
|
||||||
},
|
},
|
||||||
"revokeSponsorshipConfirmation": {
|
|
||||||
"message": "After removing this account, the Families plan sponsorship will expire at the end of the billing period. You will not be able to redeem a new sponsorship offer until the existing one expires. Are you sure you want to continue?"
|
|
||||||
},
|
|
||||||
"removeSponsorshipSuccess": {
|
"removeSponsorshipSuccess": {
|
||||||
"message": "Sponsorship removed"
|
"message": "Sponsorship removed"
|
||||||
},
|
},
|
||||||
@ -9959,5 +9956,27 @@
|
|||||||
"example": "bitwarden.com"
|
"example": "bitwarden.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"updatedRevokeSponsorshipConfirmationForSentSponsorship": {
|
||||||
|
"message": "If you remove $EMAIL$, the sponsorship for this Family plan cannot be redeemed. Are you sure you want to continue?",
|
||||||
|
"placeholders": {
|
||||||
|
"email": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "sponsored@organization.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"updatedRevokeSponsorshipConfirmationForAcceptedSponsorship": {
|
||||||
|
"message": "If you remove $EMAIL$, the sponsorship for this Family plan will end and the saved payment method will be charged $40 + applicable tax on $DATE$. You will not be able to redeem a new sponsorship until $DATE$. Are you sure you want to continue?",
|
||||||
|
"placeholders": {
|
||||||
|
"email": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "sponsored@organization.com"
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"content": "$2",
|
||||||
|
"example": "12/10/2024"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user