|
2 | 2 | import { onActivated, watch } from 'vue' |
3 | 3 | import { state, cache } from '../model.js' |
4 | 4 | import { classrooms } from '../utils/locations.js' |
5 | | -import { MapPinIcon, AcademicCapIcon } from '@heroicons/vue/24/outline' |
| 5 | +import { MapPinIcon, AcademicCapIcon, BookOpenIcon } from '@heroicons/vue/24/outline' |
6 | 6 | import { useRouter } from 'vue-router' |
7 | 7 |
|
8 | 8 | const router = useRouter() |
@@ -144,21 +144,31 @@ tick() |
144 | 144 | </div> |
145 | 145 | <div class="grow flex items-center m-2"><!-- course list --> |
146 | 146 | <div v-if="displayTime && targetClass" class="mx-2 flex flex-col items-start"> |
147 | | - <span class="text-sm">{{ targetClass.course }}<span v-if="targetClass.session">(session {{ targetClass.session }})</span></span> |
| 147 | + <div class="text-sm flex items-center justify-between w-full"> |
| 148 | + <span>{{ targetClass.course }}<span v-if="targetClass.session">(session {{ targetClass.session }})</span></span> |
| 149 | + <div class="flex items-center cursor-pointer"> |
| 150 | + <BookOpenIcon class="w-5 text-gray-600" v-if="targetClass.course" @click="router.push({ path: '/course', query: { courseId: targetClass.course, quarter: state.quarter } })" /> |
| 151 | + <MapPinIcon class="w-5 text-gray-600" v-if="classrooms[targetClass.location]" @click="locate(targetClass.location)"/> |
| 152 | + </div> |
| 153 | + </div> |
148 | 154 | <span class="font-mono text-4xl font-bold">{{ displayTime }}</span> |
149 | | - <div class="text-sm flex items-center" :class="classrooms[targetClass.location] && 'cursor-pointer'" @click="locate(targetClass.location)"> |
| 155 | + <div class="text-sm" :class="classrooms[targetClass.location] && 'cursor-pointer'"> |
150 | 156 | {{ targetClass.location }} |
151 | | - <MapPinIcon class="ml-1 w-5 text-gray-500" v-if="classrooms[targetClass.location]" /> |
152 | 157 | </div> |
153 | 158 | </div> |
154 | 159 | <div v-for="c in classes" class="relative rounded-r-sm p-2 mx-1 h-full overflow-hidden w-40 all-transition" :class="c.current ? 'bg-red-50' : (c.next ? 'bg-yellow-50' : 'bg-blue-50')"><!-- course card --> |
155 | | - <div> |
156 | | - <b>{{ c.course }}</b> |
157 | | - <span class="text-xs ml-1" v-if="c.session">(session {{ c.session }})</span> |
| 160 | + <div class="flex items-center justify-between w-full"> |
| 161 | + <div class="flex items-center"> |
| 162 | + <b>{{ c.course }}</b> |
| 163 | + <span class="text-xs ml-1" v-if="c.session">(session {{ c.session }})</span> |
| 164 | + </div> |
| 165 | + <div class="flex items-center cursor-pointer"> |
| 166 | + <BookOpenIcon class="w-5" :class="c.current ? 'text-red-500' : (c.next ? 'text-yellow-500' : 'text-blue-500')" v-if="c.course" @click="router.push({ path: '/course', query: { courseId: c.course, quarter: state.quarter } })" /> |
| 167 | + <MapPinIcon class="w-5" :class="c.current ? 'text-red-500' : (c.next ? 'text-yellow-500' : 'text-blue-500')" v-if="classrooms[c.location]" @click="locate(c.location)"/> |
| 168 | + </div> |
158 | 169 | </div> |
159 | | - <div class="text-sm flex items-center" :class="classrooms[c.location] && 'cursor-pointer'" @click="locate(c.location)"> |
| 170 | + <div class="text-sm"> |
160 | 171 | {{ c.location }} |
161 | | - <MapPinIcon class="ml-1 w-5 text-gray-500" v-if="classrooms[c.location]" /> |
162 | 172 | </div> |
163 | 173 | <div class="text-sm">{{ c.time }}</div> |
164 | 174 | <div class="all-transition absolute bottom-0 top-0 left-0 w-0.5" :class="c.current ? 'bg-red-500' : (c.next ? 'bg-yellow-500' : 'bg-blue-500')" /> |
|
0 commit comments