Add custom icon support for web links#3325
Open
Adcbda wants to merge 1 commit into
Open
Conversation
Introduce the ability to change and display custom icons for .weblink files. Added a "Change Icon" context menu item that invokes the changeWeblinkIcon helper, and updated the icon rendering logic to use getWeblinkIcon instead of the default link icon. This allows users to personalize web link appearance in the file manager.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.weblinkfiles.Change Iconcontext menu action that uses Puter's built-in file picker.Details
Web link icons were previously hard-coded to
link.svgin the item icon resolver. This change centralizes web link parsing and icon handling insrc/gui/src/helpers/weblink.js, stores the selected icon in the.weblinkJSON, and teachesitem_iconto prefer that custom icon when rendering.The icon picker accepts image files selected through Puter's file manager. Because files read from Puter FS may have a generic Blob MIME type, the helper normalizes data URLs using the selected file type, extension, and image byte signatures for PNG, JPEG, GIF, WebP, and SVG.
Validation
npm run build --workspace src/guiThe build passes with the existing webpack bundle size warnings.