1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 04:03:29 +00:00

Generic => Basic.

This commit is contained in:
Miles Blackwood
2025-06-05 11:59:18 -04:00
parent bc31f320e0
commit 479ce2076f
5 changed files with 15 additions and 15 deletions

View File

@@ -61,13 +61,13 @@ interface AtRiskPasswordQueueMessage extends NotificationQueueMessage {
passwordChangeUri?: string;
}
export type GenericNotificationData = {
export type BasicNotificationData = {
message: string;
};
export type GenericNotificationQueueMessage = TempNotificationQueueMessage<
export type BasicNotificationQueueMessage = TempNotificationQueueMessage<
typeof StandardNotificationType.Generic,
GenericNotificationData
BasicNotificationData
>;
type NotificationQueueMessageItem =
@@ -75,7 +75,7 @@ type NotificationQueueMessageItem =
| AddChangePasswordQueueMessage
| AddUnlockVaultQueueMessage
| AtRiskPasswordQueueMessage
| GenericNotificationQueueMessage;
| BasicNotificationQueueMessage;
type LockedVaultPendingNotificationsData = {
commandToRetry: {

View File

@@ -70,8 +70,8 @@ import {
LockedVaultPendingNotificationsData,
NotificationBackgroundExtensionMessage,
NotificationBackgroundExtensionMessageHandlers,
GenericNotificationData,
GenericNotificationQueueMessage,
BasicNotificationData,
BasicNotificationQueueMessage,
AtRiskPasswordNotificationsData,
UnlockVaultMessageData,
AdjustNotificationBarMessageData,
@@ -399,8 +399,8 @@ export default class NotificationBackground {
* @param message NotificationBackgroundExtensionMessage
* @param sender chrome.runtime.MessageSender
*/
async openGenericNotification(
message: NotificationBackgroundExtensionMessage<GenericNotificationData>,
async triggerBasicNotification(
message: NotificationBackgroundExtensionMessage<BasicNotificationData>,
sender: chrome.runtime.MessageSender,
) {
this.removeTabFromNotificationQueue(sender.tab);
@@ -408,7 +408,7 @@ export default class NotificationBackground {
const addLoginIsEnabled = await this.getEnableAddedLoginPrompt();
const wasVaultLocked = AuthenticationStatus.Locked && addLoginIsEnabled;
const queueMessage: GenericNotificationQueueMessage = {
const queueMessage: BasicNotificationQueueMessage = {
domain: Utils.getDomain(sender.tab.url),
type: StandardNotificationType.Generic,
tab: sender.tab,

View File

@@ -377,9 +377,9 @@ export class OverlayNotificationsBackground implements OverlayNotificationsBackg
const tab = await BrowserApi.getTab(tabId);
await this.notificationBackground.openGenericNotification(
await this.notificationBackground.triggerBasicNotification(
{
command: "bgOpenGenericNotification",
command: "bgOpenBasicNotification",
data: {
message: "message",
},

View File

@@ -4,10 +4,10 @@ import { ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";
import { PresentationalNotificationProps } from "../../../notification/presentational/notification";
import { ExampleComponent } from "../../../notification/types/example-component";
import { GenericNotification } from "../../../notification/types/generic-notification";
import { BasicNotification } from "../../../notification/types/generic-notification";
export default {
title: "Components/Refactor/GenericNotification",
title: "Components/Refactor/BasicNotification",
argTypes: {
title: { control: "text" },
message: { control: "text" },
@@ -28,7 +28,7 @@ export default {
},
} as Meta<PresentationalNotificationProps>;
const Template = (args: PresentationalNotificationProps) => GenericNotification();
const Template = (args: PresentationalNotificationProps) => BasicNotification();
export const Default: StoryObj<PresentationalNotificationProps> = {
render: Template,

View File

@@ -5,7 +5,7 @@ import { ThemeTypes } from "@bitwarden/common/platform/enums";
import { ActionButton } from "../../buttons/action-button";
import "../presentational/notification";
export function GenericNotification() {
export function BasicNotification() {
const header = "Header text";
const body = "Body text";
const footer = html`${ActionButton({