From 2ce5b273170ffabc39855d864ff553bea11a5dcc Mon Sep 17 00:00:00 2001 From: Matias De lellis Date: Tue, 5 Nov 2024 10:56:11 -0300 Subject: [PATCH] Add wait cursor when searching for new people.. With many faces, the interface becomes especially slow and confuses users. --- src/personal.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/personal.js b/src/personal.js index add02368..ff07c945 100644 --- a/src/personal.js +++ b/src/personal.js @@ -411,7 +411,10 @@ View.prototype = { }); $('#show-more-clusters').click(function () { + let button = $(this); + button.css("cursor", "wait"); self._persons.loadUnassignedClusters().done(function () { + button.css("cursor", ""); if (self._persons.getUnassignedClusters().length > 0) { self.renameUnassignedClusterDialog(); } else { @@ -421,7 +424,10 @@ View.prototype = { }); $('#show-ignored-clusters').click(function () { + let button = $(this); + button.css("cursor", "wait"); self._persons.loadIgnoredClusters().done(function () { + button.css("cursor", ""); if (self._persons.getIgnoredClusters().length > 0) { self.renameIgnoredClusterDialog(); } else { @@ -541,16 +547,6 @@ View.prototype = { }); }); - $('#facerecognition #show-ignored-clusters').click(function () { - $(this).css("cursor", "wait"); - var person = self._persons.getActivePerson(); - self._persons.loadClustersByName(person.name).done(function () { - self.renderContent(); - }).fail(function () { - OC.Notification.showTemporary(t('facerecognition', 'There was an error when trying to find photos of your friend')); - }); - }); - $('#facerecognition .icon-back').click(function () { self._persons.unsetActive(); self.renderContent();