chore(ui): [WIP] replace jquery-based dropdown with new popover

This commit is contained in:
upsiflu 2024-12-08 20:33:48 +01:00
parent b447daed47
commit 09077156ad
1 changed files with 17 additions and 15 deletions

View File

@ -234,18 +234,20 @@ const open = ref(false)
{{ t('components.library.TrackBase.link.discogs') }} {{ t('components.library.TrackBase.link.discogs') }}
</Button> </Button>
</PopoverItem> </PopoverItem>
<router-link
<PopoverItem>
<RouterLink
v-if="track.is_local" v-if="track.is_local"
:to="{name: 'library.tracks.edit', params: {id: track.id }}" :to="{name: 'library.tracks.edit', params: {id: track.id }}"
class="basic item" class="basic item"
> >
<PopoverItem>
<Button v-if="track.is_local" :to="{ name: 'library.tracks.edit', params: { id: track.id } }" tag="router-link" variant="outline" icon="bi-pencil"> <Button v-if="track.is_local" :to="{ name: 'library.tracks.edit', params: { id: track.id } }" tag="router-link" variant="outline" icon="bi-pencil">
{{ t('components.library.TrackBase.button.edit') }} {{ t('components.library.TrackBase.button.edit') }}
</Button> </Button>
</RouterLink>
</PopoverItem> </PopoverItem>
</router-link> <!-- TODO: Make the following button dangerous. Btw, it's actually a modal triggered by a button! -->
<dangerous-button <Button
v-if="artist && store.state.auth.authenticated && artist.channel && artist.attributed_to.full_username === store.state.auth.fullUsername" v-if="artist && store.state.auth.authenticated && artist.channel && artist.attributed_to.full_username === store.state.auth.fullUsername"
:class="['ui', {loading: isLoading}, 'item']" :class="['ui', {loading: isLoading}, 'item']"
@confirm="remove()" @confirm="remove()"
@ -269,7 +271,7 @@ const open = ref(false)
{{ t('components.library.TrackBase.button.delete') }} {{ t('components.library.TrackBase.button.delete') }}
</p> </p>
</template> </template>
</dangerous-button> </Button>
<div class="divider" /> <div class="divider" />
<div <div
v-for="obj in getReportableObjects({track})" v-for="obj in getReportableObjects({track})"
@ -299,11 +301,11 @@ const open = ref(false)
<i class="wrench icon" /> <i class="wrench icon" />
{{ t('components.library.TrackBase.link.django') }} {{ t('components.library.TrackBase.link.django') }}
</a> </a>
</div>
</template> </template>
</Popover> </Popover>
</div> </div>
</div> </div>
</div>
</section> </section>
<router-view <router-view
v-if="track" v-if="track"