clients/apps/browser/src
Daniel James Smith ec19fc7225
[PS-2072] Browser Badge fixes (#4363)
* Force update of badge icon and text on all windows

Affects MV2 and MV3
No longer pass in tab and windowId to setLoggedOut and setLocked

When the vault is locked or the user logs out, all open windows/tabs need to be updated

Iterating over all active tabs like in 2022.10.1 was missing:

488734577f/apps/browser/src/background/main.background.ts (L859-L867)

Create clearBadgeText function to take care of it.

* Only try to retrieve tab in unlocked state

* Remove lock icon when unlocking on all windows

* Only use windowId to retrieve tab when defined

In MV2 the `windowId` isn't passed into updateBage and fails to retrieve the correct tab to update.

This resorted in the badge not showing a match count in another window.

Fixes #4260

Ensure in MV3 that all listener pass on the windowId if present.

* Fix Firefox private mode

Only pass on the windowId if defined and within Firefox

In private mode the main.background bootstrap-method passes in the windowId

Do not refreshBadge when in private mode

Previously 488734577f/apps/browser/src/background/main.background.ts (L575-L586) setIcon would skip in private mode. Calling refreshBadge without this would update the badge on all windows (normal and private ones)
2023-01-03 18:06:21 +01:00
..
_locales Autosync the updated translations (#4355) 2022-12-30 12:33:35 +01:00
alarms [PS-815] MV3: Replace usage of delayed/periodic operations with AlarmsAPI (#4103) 2022-11-29 18:14:42 +01:00
background [PS-2072] Browser Badge fixes (#4363) 2023-01-03 18:06:21 +01:00
browser Ps 1291 fix extension icon updates (#3571) 2022-10-19 08:55:57 -05:00
clipboard [PS-815] MV3: Replace usage of delayed/periodic operations with AlarmsAPI (#4103) 2022-11-29 18:14:42 +01:00
commands [PS-816] Add Autofill Shortcut to MV3 Extension (#3131) 2022-08-09 21:30:26 -04:00
content Handle null value URLs in autofiller script (#4277) 2022-12-28 08:49:38 -06:00
decorators Ps/sync only when changed (#4245) 2022-12-15 17:20:46 -06:00
images [PS-1693] feat(browser): implement theming for notification bar (#3805) 2022-10-27 19:34:47 +02:00
listeners [PS-2072] Browser Badge fixes (#4363) 2023-01-03 18:06:21 +01:00
models [PS-1854] Split services between background and visualizations (#4075) 2022-11-23 16:26:57 -06:00
notification [PS-1693] feat(browser): implement theming for notification bar (#3805) 2022-10-27 19:34:47 +02:00
popup Add Provider Filter to Browser Vault Select (#4322) 2022-12-29 16:45:17 -05:00
safari Update year in copyrights (#4325) 2022-12-28 21:59:23 +01:00
scripts [EC-183] Mono Repository - Browser (#2531) 2022-05-03 19:38:55 +02:00
services Revert "[EC-772] Add i18n key typechecking in web (#4023)" (#4296) 2022-12-21 17:46:23 -05:00
types [PS-817] Add Generate Password Shortcut to MV3 (#3575) 2022-10-18 13:03:09 -04:00
background.html [EC-183] Mono Repository - Browser (#2531) 2022-05-03 19:38:55 +02:00
background.ts [PS-815] MV3: Replace usage of delayed/periodic operations with AlarmsAPI (#4103) 2022-11-29 18:14:42 +01:00
flags.ts [EC-473] Add feature flags to common code (#3324) 2022-08-26 13:00:14 +10:00
globals.d.ts Ps 1291 fix extension icon updates (#3571) 2022-10-19 08:55:57 -05:00
managed_schema.json [SM-88] [BEEEP] Add support for chrome.storage.managed for environment urls (#3120) 2022-08-08 07:40:09 -04:00
manifest.json Bumped browser version to 2022.12.1 (#4280) 2022-12-20 10:21:21 -05:00
manifest.v3.json Bumped browser version to 2022.12.1 (#4280) 2022-12-20 10:21:21 -05:00