Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions client/agenda/AgendaMobileBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
n-dropdown(
:options='jumpToDayOptions'
size='huge'
:show='isDropdownOpenRef'
:show-arrow='true'
trigger='click'
@select='jumpToDay'
@clickoutside='handleCloseDropdown'
)
button
button(@click='handleOpenDropdown')
i.bi.bi-arrow-down-circle
button(@click='agendaStore.$patch({ filterShown: true })')
i.bi.bi-funnel
Expand All @@ -28,7 +30,7 @@
</template>

<script setup>
import { computed, h } from 'vue'
import { computed, h, ref } from 'vue'
import {
NBadge,
NDropdown,
Expand Down Expand Up @@ -61,7 +63,8 @@ function optionToLink(opts){
{
class: 'dropdown-link',
'data-testid': 'mobile-link',
href: `#${key}`
href: `#${key}`,
onClick: () => jumpToDay(key)
},
[
h(
Expand All @@ -77,6 +80,12 @@ function optionToLink(opts){
}
}

const isDropdownOpenRef = ref(false)

const handleOpenDropdown = () => isDropdownOpenRef.value = true

const handleCloseDropdown = () => isDropdownOpenRef.value = false

const jumpToDayOptions = computed(() => {
const days = []
if (agendaStore.isMeetingLive) {
Expand Down Expand Up @@ -124,6 +133,7 @@ function jumpToDay (dayId) {
} else {
document.getElementById(dayId)?.scrollIntoView(true)
}
isDropdownOpenRef.value = false
}

function downloadIcs (key) {
Expand Down