You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/models
Nathaniel Sabanski fb1a2a13f0
Preview images for Issue cards in Project Board view (#22112)
Original Issue: https://github.com/go-gitea/gitea/issues/22102

This addition would be a big benefit for design and art teams using the
issue tracking.

The preview will be the latest "image type" attachments on an issue-
simple, and allows for automatic updates of the cover image as issue
progress is made!

This would make Gitea competitive with Trello... wouldn't it be amazing
to say goodbye to Atlassian products? Ha.

First image is the most recent, the SQL will fetch up to 5 latest images
(URL string).

All images supported by browsers plus upcoming formats: *.avif *.bmp
*.gif *.jpg *.jpeg *.jxl *.png *.svg *.webp

The CSS will try to center-align images until it cannot, then it will
left align with overflow hidden. Single images get to be slightly
larger!

Tested so far on: Chrome, Firefox, Android Chrome, Android Firefox.

Current revision with light and dark themes:

![image](https://user-images.githubusercontent.com/24665/207066878-58e6bf73-0c93-4caa-8d40-38f4432b3578.png)


![image](https://user-images.githubusercontent.com/24665/207066555-293f65c3-e706-4888-8516-de8ec632d638.png)

---------

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2 years ago
..
actions Fix ref to trigger Actions (#22679) 2 years ago
activities Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 2 years ago
admin Implement FSFE REUSE for golang files (#21840) 2 years ago
asymkey Improve error report when user passes a private key (#22726) 2 years ago
auth Support scoped access tokens (#20908) 2 years ago
avatars Fix get system setting bug when enabled redis cache (#22295) 2 years ago
db Show all projects, not just repo projects and open/closed projects (#22640) 2 years ago
dbfs Add some comments for recent code (#22725) 2 years ago
fixtures Do not overwrite empty DefaultBranch (#22708) 2 years ago
git Add cron method to gc LFS MetaObjects (#22385) 2 years ago
issues Fix more HTMLURL in templates (#22831) 2 years ago
migrations Preview images for Issue cards in Project Board view (#22112) 2 years ago
organization Map OIDC groups to Orgs/Teams (#21441) 2 years ago
packages Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 2 years ago
perm Rename almost all Ctx functions (#22071) 2 years ago
project Preview images for Issue cards in Project Board view (#22112) 2 years ago
pull refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo Preview images for Issue cards in Project Board view (#22112) 2 years ago
secret Secrets storage with SecretKey encrypted (#22142) 2 years ago
system Set disable_gravatar/enable_federated_avatar when offline mode is true (#22479) 2 years ago
unit Repositories: by default disable all units except code and pulls on forks (#22541) 2 years ago
unittest Implement actions (#21937) 2 years ago
user Implement actions (#21937) 2 years ago
webhook Support system hook API (#14537) 2 years ago
error.go Implement FSFE REUSE for golang files (#21840) 2 years ago
fixture_generation.go Implement FSFE REUSE for golang files (#21840) 2 years ago
fixture_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
main_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
migrate.go Check primary keys for all tables and drop ForeignReference (#21721) 2 years ago
migrate_test.go Check primary keys for all tables and drop ForeignReference (#21721) 2 years ago
org.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
org_team.go Supports wildcard protected branch (#20825) 2 years ago
org_team_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
org_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo.go Implement actions (#21937) 2 years ago
repo_collaboration.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo_collaboration_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_transfer.go Always reuse transaction (#22362) 2 years ago
repo_transfer_test.go Rename almost all Ctx functions (#22071) 2 years ago
user.go Supports wildcard protected branch (#20825) 2 years ago