+
${NotificationHeader({
handleCloseNotification,
+ i18n,
message: headerMessage,
- standalone: showBody,
theme,
})}
${showBody
@@ -65,7 +68,7 @@ export function NotificationContainer({
theme,
i18n,
})
- : null}
+ : nothing}
${NotificationFooter({
handleSaveAction,
collections,
@@ -94,20 +97,7 @@ const notificationContainerStyles = (theme: Theme) => css`
}
[class*="${notificationBodyClassPrefix}-"] {
- margin: ${spacing["3"]} 0 ${spacing["1.5"]} ${spacing["3"]};
+ margin: ${spacing["3"]} 0 0 ${spacing["3"]};
padding-right: ${spacing["3"]};
}
`;
-
-function getHeaderMessage(i18n: I18n, type?: NotificationType) {
- switch (type) {
- case NotificationTypes.Add:
- return i18n.saveLogin;
- case NotificationTypes.Change:
- return i18n.updateLogin;
- case NotificationTypes.Unlock:
- return "";
- default:
- return undefined;
- }
-}
diff --git a/apps/browser/src/autofill/content/components/notification/footer.ts b/apps/browser/src/autofill/content/components/notification/footer.ts
index 73fe9084595..b47dd5cc094 100644
--- a/apps/browser/src/autofill/content/components/notification/footer.ts
+++ b/apps/browser/src/autofill/content/components/notification/footer.ts
@@ -8,7 +8,7 @@ import {
NotificationTypes,
} from "../../../notification/abstractions/notification-bar";
import { OrgView, FolderView, I18n, CollectionView } from "../common-types";
-import { spacing, themes } from "../constants/styles";
+import { spacing } from "../constants/styles";
import { NotificationButtonRow } from "./button-row";
@@ -34,10 +34,16 @@ export function NotificationFooter({
handleSaveAction,
}: NotificationFooterProps) {
const isChangeNotification = notificationType === NotificationTypes.Change;
- const primaryButtonText = i18n.saveAction;
+ const isUnlockNotification = notificationType === NotificationTypes.Unlock;
+
+ let primaryButtonText = i18n.saveAction;
+
+ if (isUnlockNotification) {
+ primaryButtonText = i18n.notificationUnlock;
+ }
return html`
-