Skip to content

Commit 27ca967

Browse files
committed
re-enable upvote
1 parent e529384 commit 27ca967

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

vue/src/components/SnapshotMap.vue

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -350,31 +350,30 @@
350350
{{currentComment.data.properties.description}}<br>
351351

352352
<div
353+
v-if="(annotations.marker.likes && currentComment.kind == 'COM') ||
354+
(annotations.polygon.likes && currentComment.kind == 'PLY')"
353355
class="d-flex align-center justify-end primary--text">
354356
<p class="rating">
355357
<v-icon color="primary" small>mdi-heart-outline</v-icon>
356358
<b
357359
style="vertical-align: middle;"
358360
> {{currentComment.rating}}</b>
359361
</p>
360-
<div v-if="(annotations.marker.likes && currentComment.kind == 'COM') ||
361-
(annotations.polygon.likes && currentComment.kind == 'PLY')">
362-
<v-btn
363-
fab x-small color="white"
364-
:disabled="ratingpause"
365-
class="primary--text"
366-
ref="rateupBtn"
367-
@click="rateUp(currentComment.pk)"
368-
><v-icon small>mdi-heart-plus</v-icon></v-btn>
369-
<v-icon
370-
id="addHeart"
371-
v-if="ratingpause"
372-
small
373-
color="primary"
374-
:style="cssVars"
375-
>mdi-heart</v-icon>
376-
</div>
377-
</div>
362+
<v-btn
363+
fab x-small color="white"
364+
:disabled="ratingpause"
365+
class="primary--text"
366+
ref="rateupBtn"
367+
@click="rateUp(currentComment.pk)"
368+
><v-icon small>mdi-heart-plus</v-icon></v-btn>
369+
<v-icon
370+
id="addHeart"
371+
v-if="ratingpause"
372+
small
373+
color="primary"
374+
:style="cssVars"
375+
>mdi-heart</v-icon>
376+
</div>
378377
</div>
379378
</div>
380379
</div>
@@ -1383,7 +1382,7 @@ export default {
13831382
async rateUp(annotationPk) {
13841383
this.ratingpause = true;
13851384
1386-
if (this.annotations.open) {
1385+
if (this.annotations.polygon.likes || this.annotations.marker.likes) {
13871386
const csrftoken = this.$cookies.get('csrftoken', '');
13881387
const formData = new FormData();
13891388

0 commit comments

Comments
 (0)