UX: Show total number of pictures without images in overview #3164
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
2e7268f834
commit
52a220044d
|
@ -320,6 +320,8 @@ export default class Config {
|
|||
this.values.count.favorites += data.count;
|
||||
break;
|
||||
case "review":
|
||||
this.values.count.all -= data.count;
|
||||
this.values.count.photos -= data.count;
|
||||
this.values.count.review += data.count;
|
||||
break;
|
||||
case "private":
|
||||
|
|
|
@ -182,7 +182,7 @@ func BatchPhotosApprove(router *gin.RouterGroup) {
|
|||
var approved entity.Photos
|
||||
|
||||
for _, p := range photos {
|
||||
if err := p.Approve(); err != nil {
|
||||
if err = p.Approve(); err != nil {
|
||||
log.Errorf("approve: %s", err)
|
||||
} else {
|
||||
approved = append(approved, p)
|
||||
|
|
|
@ -500,8 +500,14 @@ func (c *Config) ClientUser(withSettings bool) ClientConfig {
|
|||
Take(&cfg.Count)
|
||||
}
|
||||
|
||||
// Calculate total count.
|
||||
cfg.Count.All = cfg.Count.Photos + cfg.Count.Live + cfg.Count.Videos
|
||||
|
||||
// Exclude pictures in review from total count.
|
||||
if c.Settings().Features.Review {
|
||||
cfg.Count.All = cfg.Count.All - cfg.Count.Review
|
||||
}
|
||||
|
||||
c.Db().
|
||||
Table("labels").
|
||||
Select("MAX(photo_count) AS label_max_photos, COUNT(*) AS labels").
|
||||
|
|
Loading…
Reference in a new issue