mirror of
https://github.com/bitwarden/browser
synced 2026-02-08 20:50:28 +00:00
Remove unneeded paths in other 2 notification types.
This commit is contained in:
@@ -134,8 +134,6 @@ function getHeaderMessage(i18n: I18n, type?: NotificationType, error?: string) {
|
||||
return i18n.loginSaveSuccess;
|
||||
case NotificationTypes.Change:
|
||||
return i18n.loginUpdateSuccess;
|
||||
case NotificationTypes.AtRiskPassword:
|
||||
return i18n.changePassword;
|
||||
case NotificationTypes.Unlock:
|
||||
return "";
|
||||
default:
|
||||
|
||||
@@ -107,8 +107,6 @@ function getHeaderMessage(i18n: I18n, type?: NotificationType) {
|
||||
return i18n.updateLogin;
|
||||
case NotificationTypes.Unlock:
|
||||
return "";
|
||||
case NotificationTypes.AtRiskPassword:
|
||||
return i18n.atRiskPassword;
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ import {
|
||||
NotificationType,
|
||||
NotificationTypes,
|
||||
} from "../../../notification/abstractions/notification-bar";
|
||||
import { ActionButton } from "../buttons/action-button";
|
||||
import { AdditionalTasksButtonContent } from "../buttons/additional-tasks/button-content";
|
||||
import { OrgView, FolderView, I18n, CollectionView } from "../common-types";
|
||||
import { spacing, themes } from "../constants/styles";
|
||||
|
||||
@@ -34,26 +32,11 @@ export function NotificationFooter({
|
||||
organizations,
|
||||
personalVaultIsAllowed,
|
||||
theme,
|
||||
passwordChangeUri,
|
||||
handleSaveAction,
|
||||
}: NotificationFooterProps) {
|
||||
const isChangeNotification = notificationType === NotificationTypes.Change;
|
||||
const primaryButtonText = i18n.saveAction;
|
||||
|
||||
if (notificationType === NotificationTypes.AtRiskPassword) {
|
||||
return html`<div class=${notificationFooterStyles({ theme })}>
|
||||
${passwordChangeUri &&
|
||||
ActionButton({
|
||||
handleClick: () => {
|
||||
open("https://" + passwordChangeUri, "_blank");
|
||||
},
|
||||
buttonText: AdditionalTasksButtonContent({ buttonText: i18n.changePassword, theme }),
|
||||
theme,
|
||||
fullWidth: false,
|
||||
})}
|
||||
</div>`;
|
||||
}
|
||||
|
||||
return html`
|
||||
<div class=${[displayFlex(), notificationFooterStyles({ theme })]}>
|
||||
${!isChangeNotification
|
||||
|
||||
Reference in New Issue
Block a user