diff --git a/frontend/src/css/photos.css b/frontend/src/css/photos.css index aa5e6c6ac..2d6366066 100644 --- a/frontend/src/css/photos.css +++ b/frontend/src/css/photos.css @@ -52,6 +52,12 @@ bottom: 4px; } +#photoprism .p-labels-cards .p-label-count { + position: absolute; + left: 12px; + top: 12px; +} + #photoprism .p-clipboard { right: 8px; bottom: 12px; diff --git a/frontend/src/model/label.js b/frontend/src/model/label.js index 9cbb8b59b..b34074dbc 100644 --- a/frontend/src/model/label.js +++ b/frontend/src/model/label.js @@ -14,10 +14,10 @@ class Label extends RestModel { CustomSlug: "", LabelName: "", LabelPriority: 0, - LabelCount: 0, LabelFavorite: false, LabelDescription: "", LabelNotes: "", + PhotoCount: 0, Links: [], }; } @@ -86,6 +86,18 @@ class Label extends RestModel { return Api.delete(this.getEntityResource() + "/like"); } + /* popularity(max) { + if (!this.PhotoCount) { + return 0; + } + + if (this.PhotoCount >= max) { + return 100; + } + + return Math.ceil(max / this.PhotoCount); + } */ + static getCollectionResource() { return "labels"; } diff --git a/frontend/src/pages/labels.vue b/frontend/src/pages/labels.vue index 322c8219a..1d0d4e973 100644 --- a/frontend/src/pages/labels.vue +++ b/frontend/src/pages/labels.vue @@ -86,6 +86,16 @@ color="accent lighten-5"> + +