mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 09:43:23 +00:00
[PM-18803] New Item Nudge Login Spotlight Bold Copy Text (#14589)
* updated new-item-nudge.component to include bold text for login spotlight. and link in ssh spotlight
This commit is contained in:
@@ -55,7 +55,9 @@ describe("NewItemNudgeComponent", () => {
|
||||
|
||||
expect(component.showNewItemSpotlight).toBe(true);
|
||||
expect(component.nudgeTitle).toBe("newLoginNudgeTitle");
|
||||
expect(component.nudgeBody).toBe("newLoginNudgeBody");
|
||||
expect(component.nudgeBody).toBe(
|
||||
"newLoginNudgeBodyOne <strong>newLoginNudgeBodyBold</strong> newLoginNudgeBodyTwo",
|
||||
);
|
||||
expect(component.dismissalNudgeType).toBe(VaultNudgeType.newLoginItemStatus);
|
||||
});
|
||||
|
||||
|
||||
@@ -35,12 +35,15 @@ export class NewItemNudgeComponent implements OnInit {
|
||||
this.activeUserId = await firstValueFrom(getUserId(this.accountService.activeAccount$));
|
||||
|
||||
switch (this.configType) {
|
||||
case CipherType.Login:
|
||||
case CipherType.Login: {
|
||||
const nudgeBodyOne = this.i18nService.t("newLoginNudgeBodyOne");
|
||||
const nudgeBodyBold = this.i18nService.t("newLoginNudgeBodyBold");
|
||||
const nudgeBodyTwo = this.i18nService.t("newLoginNudgeBodyTwo");
|
||||
this.dismissalNudgeType = VaultNudgeType.newLoginItemStatus;
|
||||
this.nudgeTitle = this.i18nService.t("newLoginNudgeTitle");
|
||||
this.nudgeBody = this.i18nService.t("newLoginNudgeBody");
|
||||
this.nudgeBody = `${nudgeBodyOne} <strong>${nudgeBodyBold}</strong> ${nudgeBodyTwo}`;
|
||||
break;
|
||||
|
||||
}
|
||||
case CipherType.Card:
|
||||
this.dismissalNudgeType = VaultNudgeType.newCardItemStatus;
|
||||
this.nudgeTitle = this.i18nService.t("newCardNudgeTitle");
|
||||
@@ -59,11 +62,15 @@ export class NewItemNudgeComponent implements OnInit {
|
||||
this.nudgeBody = this.i18nService.t("newNoteNudgeBody");
|
||||
break;
|
||||
|
||||
case CipherType.SshKey:
|
||||
case CipherType.SshKey: {
|
||||
const sshPartOne = this.i18nService.t("newSshNudgeBodyOne");
|
||||
const sshPartTwo = this.i18nService.t("newSshNudgeBodyTwo");
|
||||
|
||||
this.dismissalNudgeType = VaultNudgeType.newSshItemStatus;
|
||||
this.nudgeTitle = this.i18nService.t("newSshNudgeTitle");
|
||||
this.nudgeBody = this.i18nService.t("newSshNudgeBody");
|
||||
this.nudgeBody = `${sshPartOne} <a href="https://bitwarden.com/help/ssh-agent" class="tw-text-primary-600 tw-font-bold" target="_blank">${sshPartTwo}</a>`;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new Error("Unsupported cipher type");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user