mirror of
https://github.com/bitwarden/browser
synced 2026-02-07 04:03:29 +00:00
Generic => Basic.
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user