1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-15 10:35:20 +01:00
bitwarden-browser/apps/browser/src/autofill/constants.ts
Jonathan Prusik a42cea8570
[PM-3455] Allow adding and autofilling Cards and Identities via Context Menu (#6050)
* PoC autofill card and identity from context menu

* PoC trigger identity and card autofills via messages

* update card and identity cipher titles in the context menu

* remove unused url argument from loadOptions

* do not show no logins message for card and identity sub-menu

* allow context menu actions to create identity or card ciphers

* open new single-action windows for cipher creation when requested from the context menu

* add context menu items for adding a login cipher when none are available to the page

* adjust titles for Card and Identity context menu items

* fix translations and add no ciphers available messages to submenus

* cleanup and update tests

* remove unrelated changes

* pass uri of context menu page to cipher creation view

* Apply suggestions from code review

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>

* cleanup

* handle cipher edit background messages with browserPopoutWindowService as well

* consolidate doAutoFillNonLoginActiveTab into doAutoFillActiveTab

* cleanup

---------

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
2023-09-29 17:20:41 -04:00

30 lines
938 B
TypeScript

export const TYPE_CHECK = {
FUNCTION: "function",
NUMBER: "number",
STRING: "string",
} as const;
export const EVENTS = {
CHANGE: "change",
INPUT: "input",
KEYDOWN: "keydown",
KEYPRESS: "keypress",
KEYUP: "keyup",
} as const;
/* Context Menu item Ids */
export const AUTOFILL_CARD_ID = "autofill-card";
export const AUTOFILL_ID = "autofill";
export const AUTOFILL_IDENTITY_ID = "autofill-identity";
export const COPY_IDENTIFIER_ID = "copy-identifier";
export const COPY_PASSWORD_ID = "copy-password";
export const COPY_USERNAME_ID = "copy-username";
export const COPY_VERIFICATIONCODE_ID = "copy-totp";
export const CREATE_CARD_ID = "create-card";
export const CREATE_IDENTITY_ID = "create-identity";
export const CREATE_LOGIN_ID = "create-login";
export const GENERATE_PASSWORD_ID = "generate-password";
export const NOOP_COMMAND_SUFFIX = "noop";
export const ROOT_ID = "root";
export const SEPARATOR_ID = "separator";