mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
fix popover handling
This commit is contained in:
parent
8abf91aa01
commit
5855a7e573
|
|
@ -38,7 +38,9 @@
|
|||
<tr v-for="mir in filteredMirrorList" :class="['row', 'status-'+mir.status]" :key="mir.name">
|
||||
<td class="col-8 col-lg-7 col-xl-8">
|
||||
<a class="mirror-item-label" data-bs-toggle="popover" data-bs-trigger="hover" data-bs-placement="right"
|
||||
:data-bs-content="mir.description" :href="getURL(mir)" :aria-label="mir.name + ', ' + mir.description">
|
||||
:data-bs-content="mir.description" :href="getURL(mir)" :aria-label="mir.name + ', ' + mir.description"
|
||||
v-with-popover
|
||||
>
|
||||
{{mir.name}}
|
||||
</a>
|
||||
<span class="badge badge-new" v-if='mir.is_new'>new</span>
|
||||
|
|
|
|||
|
|
@ -98,11 +98,14 @@ onMounted(() => {
|
|||
});
|
||||
});
|
||||
|
||||
onUpdated(() => {
|
||||
Array.from(document.getElementsByClassName("mirror-item-label")).map((el) => {
|
||||
new BootStrapPopover(el);
|
||||
});
|
||||
});
|
||||
const vWithPopover = {
|
||||
mounted: (el) => {
|
||||
BootStrapPopover.getOrCreateInstance(el);
|
||||
},
|
||||
beforeUnmount: (el) => {
|
||||
BootStrapPopover.getInstance(el)?.dispose();
|
||||
},
|
||||
};
|
||||
|
||||
const sortAndUniqMirrors = (mirs) => {
|
||||
mirs.sort((a, b) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue