Albums: Improve search result notification #15

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2019-12-04 01:46:50 +01:00
parent ded37fc486
commit ee6b1d9c4c
2 changed files with 14 additions and 2 deletions

View file

@ -186,7 +186,13 @@
this.scrollDisabled = (response.models.length < this.pageSize);
if (this.scrollDisabled) {
this.$notify.info(this.results.length + ' photos found');
if (!this.results.length) {
this.$notify.warning("No photos found");
} else if (this.results.length === 1) {
this.$notify.info("One photo found");
} else {
this.$notify.info(this.results.length + " photos found");
}
} else {
this.$notify.info('More than 50 photos found');

View file

@ -182,7 +182,13 @@
this.scrollDisabled = (response.models.length < this.pageSize);
if (this.scrollDisabled) {
this.$notify.info(this.results.length + ' photos found');
if (!this.results.length) {
this.$notify.warning("No photos found");
} else if (this.results.length === 1) {
this.$notify.info("One photo found");
} else {
this.$notify.info(this.results.length + " photos found");
}
} else {
this.$notify.info('More than 50 photos found');