Skip to content

Commit b0b7277

Browse files
committed
refactor(PreviewExercise): remove overlay for first rating invitation
1 parent cefd554 commit b0b7277

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

components/Exercise/PreviewExercise.vue

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22
<article>
33
<div class="rating" :class="{'rating--empty': exercise.metrics.votes === 0}">
44
{{rating}}
5-
<div @click="gotoExercise" class="overlay">
6-
<span v-if="!$auth.loggedIn">
7-
Connectez-vous pour côter cet exercice !
8-
</span>
9-
<span v-else>
10-
Soyez le premier à côter cet exercice !
11-
</span>
12-
</div>
135
</div>
146

157
<div class="info-wrapper">
@@ -99,10 +91,11 @@
9991
const metrics = this.exercise.metrics;
10092
10193
if(metrics) {
94+
if(metrics.votes === 0) return '-';
10295
return metrics.avg_score
10396
}
10497
105-
return 0
98+
return '-'
10699
107100
}
108101
@@ -152,7 +145,6 @@
152145
display: flex;
153146
align-items: center;
154147
justify-content: center;
155-
cursor:pointer;
156148
@include transitionHelper(opacity .4s ease);
157149
158150
span {
@@ -161,11 +153,6 @@
161153
}
162154
}
163155
164-
.rating--empty:hover .overlay {
165-
visibility: visible;
166-
opacity: 1;
167-
168-
}
169156
170157
button {
171158
margin: 0;
@@ -187,7 +174,6 @@
187174
align-items: center;
188175
189176
&.rating--empty {
190-
cursor:pointer;
191177
color:lighten($GREY, 30);
192178
}
193179
}

0 commit comments

Comments
 (0)