add diffectly

This commit is contained in:
2026-10-03 14:52:48 +07:00
parent 2dc23315da
commit a961d11baa
68 changed files with 73 additions and 56 deletions
+6 -2
View File
@@ -56,6 +56,7 @@ const code = ref('')
const reviewKey = `game-review-${teamId}`
const reviewSubmitted = ref(localStorage.getItem(reviewKey) === '1')
const reviewRating = ref(0)
const reviewDifficulty = ref(0)
const reviewText = ref('')
const reviewLoading = ref(false)
@@ -225,8 +226,8 @@ const paperControlsOverrides = {
}
async function submitReview() {
if (!reviewRating.value || reviewText.value.trim() === '') {
message.error('Поставьте оценку и напишите отзыв')
if (!reviewRating.value || !reviewDifficulty.value || reviewText.value.trim() === '') {
message.error('Поставьте оценки и напишите отзыв')
return
}
reviewLoading.value = true
@@ -235,6 +236,7 @@ async function submitReview() {
teamID: Number(teamId),
password: password as string,
rating: reviewRating.value,
difficulty: reviewDifficulty.value,
text: reviewText.value.trim(),
})
reviewLoading.value = false
@@ -278,6 +280,8 @@ useSimplePolling(() => {
<n-config-provider :theme-overrides="paperControlsOverrides">
<div class="review-rating font">Оценка</div>
<n-rate v-model:value="reviewRating" :count="5" class="review-rate" />
<div class="review-rating font">Сложность</div>
<n-rate v-model:value="reviewDifficulty" :count="3" class="review-rate" />
<n-input
v-model:value="reviewText"
class="review-input"