Albums: Improve search result notification #15
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
ded37fc486
commit
ee6b1d9c4c
2 changed files with 14 additions and 2 deletions
|
@ -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');
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
Loading…
Reference in a new issue