refactor: почистил фронтенд
This commit is contained in:
@@ -21,14 +21,12 @@ const lecture = computed(() => lecturesStore.all.find(l => l.id === lectureId.va
|
||||
const isRegistered = computed(() => (lecture.value ? lecturesStore.isRegistered(lecture.value.id) : false))
|
||||
const slotRegistrationDisabled = computed(() => !userStore.hasEnrollmentSlotAvailable && !isRegistered.value)
|
||||
const isAttended = computed(() => lecture.value?.status === 'completed')
|
||||
const reviews = computed(() => lecturesStore.reviewsByLecture[lectureId.value] ?? [])
|
||||
|
||||
const similarLectures = computed(() => lecturesStore.all.filter(l => l.id !== lectureId.value).slice(0, 3))
|
||||
|
||||
onMounted(async () => {
|
||||
if (!lecturesStore.all.length) await lecturesStore.fetchLectures()
|
||||
await lecturesStore.fetchLecture(lectureId.value)
|
||||
await lecturesStore.fetchReviews(lectureId.value)
|
||||
})
|
||||
|
||||
async function registerLecture() {
|
||||
@@ -109,21 +107,6 @@ async function registerLecture() {
|
||||
</div>
|
||||
</div>
|
||||
</GlassCard>
|
||||
|
||||
<GlassCard>
|
||||
<div class="section-title">LLM-сводка отзывов</div>
|
||||
<p class="summary">
|
||||
Студенты отмечают «понятные примеры» и «много практики». Предлагается добавить больше времени на вопросы и
|
||||
прикладные кейсы. Средняя оценка — 4.8/5.
|
||||
</p>
|
||||
<div class="reviews" v-if="reviews.length">
|
||||
<div v-for="review in reviews" :key="review.id" class="review">
|
||||
<div class="review-head">{{ review.userName }} {{ review.sentiment }}</div>
|
||||
<div class="review-body">{{ review.text }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<p v-else class="text-secondary text-sm">Отзывов пока нет.</p>
|
||||
</GlassCard>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
@@ -155,11 +138,6 @@ async function registerLecture() {
|
||||
.info-value { font-weight: 700; }
|
||||
.info-sub { font-size: 13px; color: var(--color-text-secondary); margin-top: 4px; }
|
||||
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.summary { font-size: 14px; color: var(--color-text-secondary); line-height: 1.5; }
|
||||
.reviews { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
|
||||
.review { padding: 10px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.6); border: 1px solid var(--color-border-glass); }
|
||||
.review-head { font-weight: 600; margin-bottom: 4px; }
|
||||
.review-body { font-size: 13px; color: var(--color-text-secondary); }
|
||||
.cards-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
|
||||
Reference in New Issue
Block a user