1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-04 05:08:06 +02:00
bitwarden-browser/apps/browser
Daniel James Smith 42128d41f0
[PS-815] MV3: Replace usage of delayed/periodic operations with AlarmsAPI (#4103)
* Register alarms and listen to them

* Wire up alarms and actions

Register actions(commands) which can be executed by an alarm
Create methods in alarm-state to persists actions and execution times
Flesh out AlarmListener to iterate over registered commands and check if they need to execute
Simplify clearClipboard action as it only handles the action instead of also worrying if it should fire.
Enable previously disabled clear-clipboard tests (#3532)
Adjust clear-clipboard tests to new simpler execution

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>

* Make linter happy

* Revert accidentally commited with merging master

* Add jsdoc per PR comment

* Fixed types to simplify adding new alarm actions

Create a new alarm action (i.e `clear-clipboard.ts`)
Export a name for the alarm action (`clearClipboardAlarmName`)

`alarm-state.ts`
Import alarm action name
Extend `alarmKeys` and `alarmState`

`on-alarm-listener`
Import alarm action method and alarm action name
Add it to the switch case

* Add comment to clearClipboard action

Add comment to replace clearClipboard impl once clipboardApi's are accessible by service-workers

https://bugs.chromium.org/p/chromium/issues/detail?id=1160302

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2022-11-29 18:14:42 +01:00
..
.vscode Multi root workspace tweaks (#2858) 2022-06-13 21:39:36 -05:00
config Use settings in base.json and merge config keys (#3804) 2022-10-18 12:00:40 +10:00
src [PS-815] MV3: Replace usage of delayed/periodic operations with AlarmsAPI (#4103) 2022-11-29 18:14:42 +01:00
store Autosync the updated translations (#4132) 2022-11-28 16:47:15 +01:00
.gitignore Simplify our gitignore files (#2925) 2022-06-17 15:33:51 +02:00
crowdin.yml Fix Crowdin Pull workflow (#2667) 2022-05-10 10:20:32 -04:00
gulpfile.js [PS-1184] Remove specific keyboard shortcut logic (#3173) 2022-09-08 14:48:45 +02:00
jest.config.js [EC-423] Fix unit tests (#3265) 2022-08-11 11:35:08 +10:00
package.json Bumped browser version to 2022.10.2 (#3857) 2022-10-20 19:59:25 +01:00
README.md Update README and CONTRIBUTING to point to contributing.bitwarden.com (#2771) 2022-06-13 17:34:07 +10:00
test.setup.ts PS-1133 Feature/mv3 browser observable memory caching (#3245) 2022-08-16 07:05:03 -05:00
tsconfig.json [SM-252] Enable strict templates (#3601) 2022-11-28 18:59:46 +01:00
tsconfig.spec.json [EC-423] Fix unit tests (#3265) 2022-08-11 11:35:08 +10:00
webpack.config.js [PS-1829] Fix Service Worker Startup in MV3 (#4000) 2022-11-17 15:15:34 -05:00

Github Workflow build browser on master Crowdin Join the chat at https://gitter.im/bitwarden/Lobby

Bitwarden Browser Extension

The Bitwarden browser extension is written using the Web Extension API and Angular.

My Vault

Documentation

Please refer to the Browser section of the Contributing Documentation for build instructions, recommended tooling, code style tips, and lots of other great information to get you started.