web/satellite/vuetify-poc: remove notification on close button click
This change fixes an issue where a notification would not be completely removed after clicking the close button, causing it to invisibly prevent elements beneath it from being clicked. Also, the file preview dialog no longer closes when a notification is clicked. Resolves #6280 Change-Id: I135aa2e77ddc1ec845101209f26dde5e48f10bd6
This commit is contained in:
parent
bd36749f7d
commit
789b37c21f
@ -2,7 +2,7 @@
|
|||||||
// See LICENSE for copying information.
|
// See LICENSE for copying information.
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<v-dialog v-model="model" transition="fade-transition" class="preview-dialog" fullscreen theme="dark">
|
<v-dialog v-model="model" transition="fade-transition" class="preview-dialog" fullscreen theme="dark" persistent no-click-animation>
|
||||||
<v-card class="preview-card">
|
<v-card class="preview-card">
|
||||||
<v-carousel v-model="constCarouselIndex" hide-delimiters show-arrows="hover" height="100vh">
|
<v-carousel v-model="constCarouselIndex" hide-delimiters show-arrows="hover" height="100vh">
|
||||||
<template #prev>
|
<template #prev>
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
border
|
border
|
||||||
@mouseover="() => onMouseOver(item.id)"
|
@mouseover="() => onMouseOver(item.id)"
|
||||||
@mouseleave="() => onMouseLeave(item.id)"
|
@mouseleave="() => onMouseLeave(item.id)"
|
||||||
|
@click:close="() => onCloseClick(item.id)"
|
||||||
/>
|
/>
|
||||||
</v-snackbar>
|
</v-snackbar>
|
||||||
</template>
|
</template>
|
||||||
@ -90,4 +91,11 @@ function onMouseOver(id: string): void {
|
|||||||
function onMouseLeave(id: string): void {
|
function onMouseLeave(id: string): void {
|
||||||
notificationsStore.resumeNotification(id);
|
notificationsStore.resumeNotification(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes notification when the close button is clicked.
|
||||||
|
*/
|
||||||
|
function onCloseClick(id: string): void {
|
||||||
|
notificationsStore.deleteNotification(id);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue
Block a user