diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2025-08-23 22:29:28 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2025-08-23 22:29:28 +0100 |
| commit | ecc6a55aba7bb35fc778e7a53848396b88214151 (patch) | |
| tree | 1b37a2dc5f4594155114da1ae0c4529d20a4c548 /web/components/Sidebar.vue | |
| parent | 8f7dec8ba6b2f9bde01afd0a110596ebbd43e0ed (diff) | |
Add multiple conferences feature
Diffstat (limited to 'web/components/Sidebar.vue')
| -rw-r--r-- | web/components/Sidebar.vue | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/web/components/Sidebar.vue b/web/components/Sidebar.vue index 5fc42d3..fd64434 100644 --- a/web/components/Sidebar.vue +++ b/web/components/Sidebar.vue @@ -3,6 +3,7 @@ import { formatDistanceToNow } from "date-fns"; import { LucideClock, LucideRadio } from "lucide-vue-next"; const scheduleStore = useScheduleStore(); +const conferenceStore = useConferenceStore(); const errorStore = useErrorStore(); const timer = ref(); @@ -30,31 +31,35 @@ onBeforeUnmount(() => { <template> <div class="sidebar"> - <Panel class="conference"> - <span class="conference-title">{{ scheduleStore.schedule?.conference.title }}</span> - <span class="conference-venue">{{ scheduleStore.schedule?.conference.venue }}</span> - <span class="conference-city">{{ scheduleStore.schedule?.conference.city }}</span> + <Panel class="conference" kind="top"> + <template v-if="conferenceStore.id && conferenceStore.title"> + <span class="conference-title">{{ conferenceStore.title }}</span> + <span class="conference-venue">{{ conferenceStore.venue }}</span> + <span class="conference-city">{{ conferenceStore.city }}</span> + </template> - <Button kind="secondary" @click="errorStore.setError('This doesn\'t do anything yet :-)')">Change conference</Button> + <Button kind="secondary" @click="navigateTo('/conferences')">Change conference</Button> </Panel> - <Panel kind="success" class="ongoing" v-if="ongoing"> - <span>This conference is ongoing</span> - <Button kind="primary" :icon="LucideRadio" @click="navigateTo('/live')">View live</Button> - </Panel> + <template v-if="scheduleStore.schedule != null"> + <Panel kind="success" class="ongoing" v-if="ongoing"> + <span>This conference is ongoing</span> + <Button kind="primary" :icon="LucideRadio" @click="navigateTo('/live')">View live</Button> + </Panel> - <Panel kind="error" class="finished" v-else-if="finished"> - <span>This conference has finished</span> - </Panel> - - <Panel class="upcoming" v-else> - <span class="text-icon"><LucideClock /> <span>Starts in {{ startsIn }}</span></span> - </Panel> - - <Nav /> + <Panel kind="error" class="finished" v-else-if="finished"> + <span>This conference has finished</span> + </Panel> + + <Panel class="upcoming" v-else> + <span class="text-icon"><LucideClock /> <span>Starts in {{ startsIn }}</span></span> + </Panel> + + <Nav /> + </template> <div class="info"> - <span>Times listed are in local time ({{ scheduleStore.schedule?.conference.timeZoneName }})</span> + <span v-if="scheduleStore.schedule != null">Times listed are in local time ({{ scheduleStore.schedule?.conference.timeZoneName }})</span> <Version /> </div> @@ -74,7 +79,7 @@ onBeforeUnmount(() => { align-items: center; gap: 1rem; font-size: var(--text-small); - font-style: oblique; + font-style: italic; text-align: center; } |
