summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--css/navigation.css4
-rw-r--r--img/checkmark.svg1
-rw-r--r--js/controller/ShareController.js2
-rw-r--r--templates/part.content.php5
4 files changed, 8 insertions, 4 deletions
diff --git a/css/navigation.css b/css/navigation.css
index 5366a9155..2509beecf 100644
--- a/css/navigation.css
+++ b/css/navigation.css
@@ -109,6 +109,10 @@
background-image: url('../img/twitter.svg') !important;
}
+.icon-checkmark {
+ background-image: url('../img/checkmark.svg') !important;
+}
+
.col-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
diff --git a/img/checkmark.svg b/img/checkmark.svg
new file mode 100644
index 000000000..3501b5a42
--- /dev/null
+++ b/img/checkmark.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" viewBox="0 0 16 16"><path d="m2.35 7.3 4 4l7.3-7.3" stroke="#000" stroke-width="2" fill="none"/></svg>
diff --git a/js/controller/ShareController.js b/js/controller/ShareController.js
index 29a33141a..b0b199ef9 100644
--- a/js/controller/ShareController.js
+++ b/js/controller/ShareController.js
@@ -38,7 +38,7 @@ app.controller('ShareController', function (ShareResource, Loading) {
if (this.usersSharedArticles[itemId] && this.usersSharedArticles[itemId].includes(userId)) {
Loading.setLoading(userId, false);
return;
- }
+ }
// quick initialization (instead of if (...) : [])
this.usersSharedArticles[itemId] = this.usersSharedArticles[itemId] ? this.usersSharedArticles[itemId] : [];
diff --git a/templates/part.content.php b/templates/part.content.php
index 1e70a80b9..170bc77ad 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -130,12 +130,11 @@
<a
class="icon-category-installed pr-3"
ng-repeat="user in Share.userList"
- ng-click="Share.shareItem(item.id, user.value.shareWith)">
+ ng-click="Share.shareItem(item.id, user.value.shareWith)">
{{ user.value.shareWith }}
<span class="right" style="margin-top: 1.4em; margin-right: 1em"
- ng-class="{'icon-loading-small': App.loading.isLoading(user.value.shareWith)}">
+ ng-class="{'icon-loading-small': App.loading.isLoading(user.value.shareWith), 'icon-checkmark': !App.loading.isLoading(user.value.shareWith) && Share.usersSharedArticles[item.id].includes(user.value.shareWith)}">
</span>
- <span ng-if="!App.loading.isLoading(user.value.shareWith)">Envoyé.</span>
</a>
<p class="label-group"> <?php p($l->t('Share on social media')) ?> </p>
<div class="row">