Xyphyn / photon

A replacement for lemmy-ui with more features, a better design, and more customizability.
https://phtn.app
GNU Affero General Public License v3.0
367 stars 40 forks source link

Listview selfpost thumbnail #353

Closed sevonj closed 2 months ago

sevonj commented 3 months ago

Related issues: #323

The list view turned out almost the same as compact, so I think it's best to use the same solutions. This adds self-post placeholder thumbnails for the sake of consistency.

image

Before ![Screenshot_20240706_153249](https://github.com/Xyphyn/photon/assets/100710152/15f35eb3-25ed-4fc8-a96c-6eb2586abd8a)
After ![Screenshot_20240706_153158-1](https://github.com/Xyphyn/photon/assets/100710152/0afa1af4-31b8-45e7-ba5f-4088c0984e89)

Also, the thumbnail decided whether its going to show or not by the post type. This was already checked in its parent so I removed the redundant if statement and parameter. https://github.com/Xyphyn/photon/blob/80fff16671b9e519148456eaa7c96cb545072115/src/lib/components/lemmy/post/Post.svelte#L107 Logic or elements being deeper than they need to be has been kind of a recurring theme in this codebase.

vercel[bot] commented 3 months ago

@sevonj is attempting to deploy a commit to the Xylight's projects Team on Vercel.

A member of the Team first needs to authorize it.

Xyphyn commented 2 months ago

This also removes a strange side-effect since postmediacompact is already handled by post.svelte, thanks!

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
photon ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2024 10:31pm