photoprism/internal/form/selection.go
Michael Mayer 2156afd85a File browser: Implement clipboard; refactor entities and fixtures #260
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-25 19:10:44 +02:00

27 lines
467 B
Go

package form
type Selection struct {
Files []string `json:"files"`
Photos []string `json:"photos"`
Albums []string `json:"albums"`
Labels []string `json:"labels"`
Places []string `json:"places"`
}
func (f Selection) Empty() bool {
switch {
case len(f.Files) > 0:
return false
case len(f.Photos) > 0:
return false
case len(f.Albums) > 0:
return false
case len(f.Labels) > 0:
return false
case len(f.Places) > 0:
return false
}
return true
}