stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
9.37k stars 803 forks source link

[Feature] Custom Icons #5406

Open echo6ix opened 1 month ago

echo6ix commented 1 month ago

Summary

Add user-configurable custom icons to the Performer Detail page in the .name-icon div based on performer URL domains, StashID Endpoint Names, and select performer detail-item attributes.

Description

This feature would introduce user-configurable icons in the .name-icon div, to the Performer Detail pages. Icons will act as (clickable) visual shortcuts, representing specific details or links from the performer's metadata. This allows users to quickly identify relevant information (they value) at a glance, such as external social media links or performer-specific metadata.


- **Icons**. Icons will be rendered in `.name-icon` div when conditions in the JSON are met. For example, if a performer has a Twitter link or StashDB StashID, a clickable icon using the defined filename, will appear in the `.name-icon` div.
- **Existing social media `.name-icons` would not be hardcoded.** We could remove the hard-coding of existing social media icons, but still include them in the stock JSON file and corresponding `icon/` folder. They would serve as sample entries for users.

## Future Considerations:
While this feature would initially focuses on Performer Detail pages, the scope could be expanded in the future to other areas of the app where visual custom icons may be useful.
cj12312021 commented 1 month ago

Thanks for creating this issue. My current assessment of the implementation is that we would provide a dialog menu somewhere on the settings page where the user would provide the domain names they want to capture and then provide the image/icon they would like to correspond to the domain. My thinking is that this would all be done using the UI configuration, which saves the data in the config YML file which users could edit directly. The uploaded images would need to be base64 encoded so they can be written to the file. Alternatively, the uploaded file could be written somewhere in the UI directly so the path could be referenced in the YML instead of using the base64 string. I imagine this will be more intuitive than asking users to configure paths. We wouldn't need a section for each details page. We would just have one section for domains, capturing domains across all pages. @WithoutPants could provide additional input here.