keepassxc-browser icon indicating copy to clipboard operation
keepassxc-browser copied to clipboard

Update popup content dynamically

Open varjolintu opened this issue 5 months ago • 0 comments

Instead of having a separate HTML and JavaScript files for each popup, use just single popup for everything and parse the content based on the page.popupData. The refactor also eliminates some duplicate code in the popup files.

The content should now change in real time according to database state (open/locked/login/default) if the popup is open.

Other minor changes:

  • Popup states and icon types are converted to enums.
  • browserAction.show() is renamed to browserAction.updatePopupIcon().
  • browserAction.showDefault() is renamed to browserAction.updatePopup().

TODO:

  • [x] Use only single popup file
  • [x] Change content dynamically when popup is open
  • [ ] There's a delay with get_status on Firefox every time the popup is opened
  • [ ] After connecting a new database the status does not update correctly

Fixes #76.

varjolintu avatar Sep 22 '24 12:09 varjolintu