mirror of
https://github.com/bitwarden/browser
synced 2026-02-09 13:10:17 +00:00
[WIP] Security task notification setup.
This commit is contained in:
@@ -7,6 +7,7 @@ const NotificationTypes = {
|
||||
Add: "add",
|
||||
Change: "change",
|
||||
Unlock: "unlock",
|
||||
SecurityTaskNotice: "security-task-notice",
|
||||
} as const;
|
||||
|
||||
type NotificationType = (typeof NotificationTypes)[keyof typeof NotificationTypes];
|
||||
@@ -25,7 +26,7 @@ type NotificationBarIframeInitData = {
|
||||
organizations?: OrgView[];
|
||||
removeIndividualVault?: boolean;
|
||||
theme?: Theme;
|
||||
type?: string; // @TODO use `NotificationType`
|
||||
type?: NotificationType; // @TODO use `NotificationType`
|
||||
};
|
||||
|
||||
type NotificationBarWindowMessage = {
|
||||
|
||||
@@ -60,9 +60,9 @@ function getI18n() {
|
||||
loginUpdateSuccessDetails: chrome.i18n.getMessage("loginUpdatedSuccessDetails"),
|
||||
loginUpdateTaskSuccess: chrome.i18n.getMessage("loginUpdateTaskSuccess"),
|
||||
loginUpdateTaskSuccessAdditional: chrome.i18n.getMessage("loginUpdateTaskSuccessAdditional"),
|
||||
nextSecurityTaskAction: chrome.i18n.getMessage("nextSecurityTaskAction"),
|
||||
newItem: chrome.i18n.getMessage("newItem"),
|
||||
never: chrome.i18n.getMessage("never"),
|
||||
newItem: chrome.i18n.getMessage("newItem"),
|
||||
nextSecurityTaskAction: chrome.i18n.getMessage("nextSecurityTaskAction"),
|
||||
notificationAddDesc: chrome.i18n.getMessage("notificationAddDesc"),
|
||||
notificationAddSave: chrome.i18n.getMessage("notificationAddSave"),
|
||||
notificationChangeDesc: chrome.i18n.getMessage("notificationChangeDesc"),
|
||||
|
||||
@@ -242,6 +242,14 @@ export class BrowserApi {
|
||||
return tabs.find((t) => t.windowId === currentWindowId) ?? tabs[0];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param tab
|
||||
* @param command
|
||||
* @param data
|
||||
* @returns
|
||||
*/
|
||||
|
||||
static tabSendMessageData(
|
||||
tab: chrome.tabs.Tab,
|
||||
command: string,
|
||||
|
||||
Reference in New Issue
Block a user