Dev #11
@@ -19,6 +19,14 @@ const userStore = useUserStore()
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const user = computed(() => auth.user!)
|
const user = computed(() => auth.user!)
|
||||||
|
|
||||||
|
const userMetaLine = computed(() => {
|
||||||
|
const parts: string[] = []
|
||||||
|
if (user.value.institute) parts.push(user.value.institute)
|
||||||
|
if (user.value.direction) parts.push(user.value.direction)
|
||||||
|
if (user.value.year !== null && user.value.year !== undefined) parts.push(`${user.value.year} курс`)
|
||||||
|
return parts.join(' · ')
|
||||||
|
})
|
||||||
const nextLecture = computed(() => lectures.registeredLectures[0] ?? lectures.all[0])
|
const nextLecture = computed(() => lectures.registeredLectures[0] ?? lectures.all[0])
|
||||||
const recommended = computed(() =>
|
const recommended = computed(() =>
|
||||||
lectures.all.filter(l => !lectures.registeredIds.includes(l.id)).slice(0, 3)
|
lectures.all.filter(l => !lectures.registeredIds.includes(l.id)).slice(0, 3)
|
||||||
@@ -45,7 +53,7 @@ onMounted(async () => {
|
|||||||
Добрый день, {{ formatUserName(user.name) }}!
|
Добрый день, {{ formatUserName(user.name) }}!
|
||||||
<AppIcon class="inline-icon" icon="hand-stop" :size="18" />
|
<AppIcon class="inline-icon" icon="hand-stop" :size="18" />
|
||||||
</h1>
|
</h1>
|
||||||
<p class="text-secondary">{{ user.institute }} · {{ user.direction }} · {{ user.year }} курс</p>
|
<p v-if="userMetaLine" class="text-secondary">{{ userMetaLine }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="quick-actions">
|
<div class="quick-actions">
|
||||||
<button class="btn-primary" @click="router.push('/catalog')">Найти лекцию</button>
|
<button class="btn-primary" @click="router.push('/catalog')">Найти лекцию</button>
|
||||||
|
|||||||
@@ -12,6 +12,18 @@ import EmptyState from '@/components/ui/EmptyState.vue'
|
|||||||
const auth = useAuthStore()
|
const auth = useAuthStore()
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const user = computed(() => auth.user!)
|
const user = computed(() => auth.user!)
|
||||||
|
|
||||||
|
const userMetaLine = computed(() => {
|
||||||
|
const parts: string[] = []
|
||||||
|
if (user.value.institute) parts.push(user.value.institute)
|
||||||
|
if (user.value.direction) parts.push(user.value.direction)
|
||||||
|
return parts.join(' · ')
|
||||||
|
})
|
||||||
|
|
||||||
|
const userYearLine = computed(() => {
|
||||||
|
const year = user.value.year
|
||||||
|
return year === null || year === undefined ? '' : `${year} курс`
|
||||||
|
})
|
||||||
const interestTags = ref([
|
const interestTags = ref([
|
||||||
{ label: '#ML', active: true },
|
{ label: '#ML', active: true },
|
||||||
{ label: '#ИИ', active: true },
|
{ label: '#ИИ', active: true },
|
||||||
@@ -48,8 +60,8 @@ onMounted(() => {
|
|||||||
<div>
|
<div>
|
||||||
<div class="name">{{ user.name }}</div>
|
<div class="name">{{ user.name }}</div>
|
||||||
<div class="email">{{ user.email }}</div>
|
<div class="email">{{ user.email }}</div>
|
||||||
<div class="meta">{{ user.institute }} · {{ user.direction }}</div>
|
<div v-if="userMetaLine" class="meta">{{ userMetaLine }}</div>
|
||||||
<div class="meta">{{ user.year }} курс</div>
|
<div v-if="userYearLine" class="meta">{{ userYearLine }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="level">
|
<div class="level">
|
||||||
|
|||||||
Reference in New Issue
Block a user