11<script setup lang="ts">
2+ import { computed } from ' vue'
23import { mdiClose , mdiArrowRight } from ' @mdi/js'
34
45const route = useRoute ()
@@ -12,45 +13,47 @@ const showPopover = computed(
1213 ! redirectStore .enabled &&
1314 ! redirectStore .dismissedThisSession ,
1415)
16+
17+ const menuOpen = computed ({
18+ get : () => showPopover .value ,
19+ set : (value : boolean ) => {
20+ if (! value ) redirectStore .dismiss ()
21+ },
22+ })
1523 </script >
1624
1725<template >
18- <v-card
19- v-if =" showPopover"
20- class =" redirect-prompt pa-4"
21- elevation =" 8"
22- rounded =" lg"
23- max-width =" 280"
26+ <v-menu
27+ v-model =" menuOpen"
28+ activator =" parent"
29+ location =" bottom end"
30+ offset =" 8"
31+ :open-on-click =" false"
32+ :close-on-content-click =" false"
2433 >
25- <div class =" d-flex align-center justify-space-between" >
26- <span class =" text-body-1" >Skip this page next time?</span >
27- <v-btn
28- :icon =" mdiClose"
29- variant =" text"
30- size =" small"
31- color =" warning"
32- density =" comfortable"
33- aria-label =" Dismiss"
34- @click =" redirectStore.dismiss()"
35- />
36- </div >
37- <a
38- class =" text-primary text-decoration-none hover:text-decoration-underline d-inline-flex align-center mt-1"
39- href =" #"
40- @click.prevent =" redirectStore.enable()"
41- >
42- Always open dashboard
43- <v-icon :icon =" mdiArrowRight" size =" small" class =" ml-1" />
44- </a >
45- </v-card >
34+ <v-list width =" 280" class =" py-0" rounded =" lg" elevation =" 8" >
35+ <v-list-item >
36+ <v-list-item-title class =" text-body-1" >
37+ Skip this page next time?
38+ </v-list-item-title >
39+ <template #append >
40+ <v-btn
41+ :icon =" mdiClose"
42+ variant =" text"
43+ size =" small"
44+ color =" warning"
45+ density =" comfortable"
46+ aria-label =" Dismiss"
47+ @click =" redirectStore.dismiss()"
48+ />
49+ </template >
50+ </v-list-item >
51+ <v-list-item class =" text-primary" @click =" redirectStore.enable()" >
52+ <v-list-item-title >Always open dashboard</v-list-item-title >
53+ <template #append >
54+ <v-icon :icon =" mdiArrowRight" size =" small" />
55+ </template >
56+ </v-list-item >
57+ </v-list >
58+ </v-menu >
4659</template >
47-
48- <style scoped>
49- .redirect-prompt {
50- position : absolute ;
51- right : 0 ;
52- top : 100% ;
53- margin-top : 8px ;
54- z-index : 10 ;
55- }
56- </style >
0 commit comments