feat(pass): custom icon images for Pass items#476
Conversation
i18n(weekly-mr:'app'): Upgrade translations from crowdin (ee5bb6a). for webapps See merge request web/clients!22643
[DRVWEB-5149] Go to parent action in new search See merge request web/clients!22634
Fix setup organization modal race condition See merge request web/clients!22647
Added optional chaining as `Settings` can be `null` See merge request web/clients!22648
MEET-824 Change title and subtitle of prejoin screen for personal meeting See merge request web/clients!22644
MEET-855 Change Join meeting modal focus style See merge request web/clients!22646
[DRVWEB-5059] shared infinite re render See merge request web/clients!22620
Sections README.md See merge request web/clients!22559
MEET-858 Fix design of Schedule a meeting form See merge request web/clients!22650
MEET-881: Setting style bugs and i18n fix for past meetings See merge request web/clients!22810
Fix IsTrial auto-attach See merge request web/clients!22721
Notify user about potential renewal price change when updating billing address See merge request web/clients!22725
E2e fixes full suite See merge request web/clients!22811
Typo fix on the file See merge request web/clients!22746
Fixing more extra spaces See merge request web/clients!22740
Fixed a typo on a plural string. See merge request web/clients!22741
Allow users to upload custom icon images on login items, leveraging the existing file attachments infrastructure with a filename convention (__pass_custom_icon__) to distinguish icons from regular attachments. - Add image processing helper (resize to 64x64 PNG) - Add useCustomIcon hook to download and display icon attachments - Integrate custom icon display in SafeItemIcon (list + detail views) - Add CustomIconField upload component to Login create/edit forms - Filter icon files from regular file attachments display Closes ProtonMail#475 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Have you managed to run the code locally and if that's the case, can you put some screenshots of how the feature look here please? |
|
It looks like the web client makes an extra API request to get file attachments for each item with them, which would quickly become a lot of request. I think it would be better to store the icon as a item field instead, that way it would be retrieved in the same request as the rest item. A text field should be able to contain an SVG file, since it's just XML (and generally quite small, KB's), if people upload a png/jpeg/webp it could be base64 encoded and stored as an SVG, see https://en.wikipedia.org/wiki/Data_URI_scheme#SVG For people who upload a SVG icon, keeping it as an vector image (SVG) would also avoid losing details, in the process of converting a vector image to a low resolution raster image. |
a340175 to
69f5ccc
Compare
613da4c to
92dc5ea
Compare
115579e to
b6fd253
Compare
Summary
Proof of concept for allowing users to upload custom icon images on Proton Pass items, as proposed in #475.
Approach: Leverages the existing file attachments infrastructure — no backend API or protobuf schema changes needed. Custom icons are stored as encrypted file attachments with a filename convention (
__pass_custom_icon__) to distinguish them from regular files.What's included:
useCustomIconhook — downloads and decrypts the icon attachment, providing an object URL for renderingSafeItemIconintegration — custom icons display in both list and detail views, taking priority over domain faviconsCustomIconFieldform component — clickable icon area next to the title field for uploading/removing iconsScope (PoC):
Files changed:
packages/pass/lib/file-attachments/custom-icon.tspackages/pass/hooks/files/useCustomIcon.tspackages/pass/components/Form/Field/CustomIconField.tsxpackages/pass/components/Layout/Icon/ItemIcon.tsxpackages/pass/components/Item/Login/Login.new.tsxpackages/pass/components/Item/Login/Login.edit.tsxpackages/pass/components/FileAttachments/FileAttachmentsFieldEdit.tsxpackages/pass/components/FileAttachments/FileAttachmentsView.tsxTest plan
🤖 Generated with Claude Code