|
1 | 1 | <script setup lang="ts"> |
2 | | -import { ref } from 'vue'; |
| 2 | +// import { ref } from 'vue'; |
3 | 3 | // icons |
4 | | -import { CheckCircleOutlined, GiftOutlined, MessageOutlined, SettingOutlined, BellOutlined } from '@ant-design/icons-vue'; |
| 4 | +// import { CheckCircleOutlined, GiftOutlined, MessageOutlined, SettingOutlined, BellOutlined } from '@ant-design/icons-vue'; |
| 5 | +import { router } from '@/router'; |
| 6 | +import { useCustomizerStore } from '@/stores/customizer'; |
5 | 7 |
|
6 | | -const isActive = ref(true); |
| 8 | +const customizer = useCustomizerStore(); |
7 | 9 |
|
8 | | -function deactivateItem() { |
9 | | - isActive.value = false; |
10 | | -} |
| 10 | +// const isActive = ref(true); |
| 11 | +
|
| 12 | +// function deactivateItem() { |
| 13 | +// isActive.value = false; |
| 14 | +// } |
| 15 | +
|
| 16 | +const openNotice = () => { |
| 17 | + customizer.SET_TITLE('お知らせ'); |
| 18 | + router.push('/notice'); |
| 19 | +}; |
11 | 20 | </script> |
12 | 21 |
|
13 | 22 | <template> |
14 | | - <!-- ---------------------------------------------- --> |
15 | | - <!-- notifications DD --> |
16 | | - <!-- ---------------------------------------------- --> |
17 | | - <v-menu :close-on-content-click="false" offset="6, 0"> |
18 | | - <template v-slot:activator="{ props }"> |
19 | | - <v-btn class="text-secondary ml-sm-2 ml-1" icon color="error" rounded="sm" size="large" v-bind="props"> |
20 | | - <!-- <v-badge :content="isActive ? '2' : '0'" color="error" offset-x="-4" offset-y="-5"> |
| 23 | + <!-- ---------------------------------------------- --> |
| 24 | + <!-- notifications DD --> |
| 25 | + <!-- ---------------------------------------------- --> |
| 26 | + <v-menu :close-on-content-click="false" offset="6, 0"> |
| 27 | + <template v-slot:activator="{ props }"> |
| 28 | + <v-btn class="text-secondary ml-sm-2 ml-1" icon color="error" rounded="sm" size="large" v-bind="props" @click="openNotice"> |
| 29 | + <!-- <v-badge :content="isActive ? '2' : '0'" color="error" offset-x="-4" offset-y="-5"> |
21 | 30 | <BellOutlined :style="{ fontSize: '16px' }" /> |
22 | 31 | </v-badge> --> |
23 | | - <v-icon>mdi-bell-badge</v-icon> |
24 | | - </v-btn> |
25 | | - <div class="pr-3" :style="{ color: 'rgb(var(--v-theme-error))' }">お知らせあり</div> |
26 | | - </template> |
27 | | - <v-sheet rounded="md" width="387" class="notification-dropdown"> |
28 | | - <div class="pa-4"> |
29 | | - <div class="d-flex align-center justify-space-between"> |
30 | | - <h6 class="text-subtitle-1 mb-0">Notifications</h6> |
31 | | - <v-btn |
32 | | - variant="text" |
33 | | - color="success" |
34 | | - icon |
35 | | - rounded |
36 | | - size="small" |
37 | | - @click="deactivateItem()" |
38 | | - :class="isActive ? 'd-block' : 'd-none'" |
39 | | - > |
40 | | - <CheckCircleOutlined :style="{ fontSize: '16px' }" /> |
41 | | - <v-tooltip aria-label="tooltip" activator="parent" location="bottom" :content-class="isActive ? 'custom-tooltip' : 'd-none'"> |
42 | | - <span class="text-caption">Mark as all read</span> |
43 | | - </v-tooltip> |
44 | | - </v-btn> |
45 | | - </div> |
46 | | - </div> |
47 | | - <v-divider></v-divider> |
48 | | - <perfect-scrollbar style="height: calc(100vh - 300px); max-height: 265px"> |
49 | | - <v-list class="py-0" lines="two" aria-label="notification list" aria-busy="true"> |
50 | | - <v-list-item value="1" color="secondary" class="no-spacer py-1" :active="isActive"> |
51 | | - <template v-slot:prepend> |
52 | | - <v-avatar size="36" variant="flat" color="lightsuccess" class="mr-3 py-2 text-success"> |
53 | | - <GiftOutlined /> |
54 | | - </v-avatar> |
55 | | - </template> |
56 | | - <div class="d-inline-flex justify-space-between w-100"> |
57 | | - <h6 class="text-subtitle-1 font-weight-regular mb-0"> |
58 | | - It's <span style="font-weight: 600">Cristina danny's</span> birthday today. |
59 | | - </h6> |
60 | | - <span class="text-caption">3:00 AM</span> |
61 | | - </div> |
62 | | - |
63 | | - <p class="text-caption text-medium-emphasis my-0">2 min ago</p> |
64 | | - </v-list-item> |
65 | | - <v-divider></v-divider> |
66 | | - <v-list-item value="2" color="secondary" class="no-spacer"> |
67 | | - <template v-slot:prepend> |
68 | | - <v-avatar size="36" variant="flat" color="lightprimary" class="mr-3 py-2 text-primary"> |
69 | | - <MessageOutlined /> |
70 | | - </v-avatar> |
71 | | - </template> |
72 | | - <div class="d-inline-flex justify-space-between w-100"> |
73 | | - <h6 class="text-subtitle-1 font-weight-regular mb-0"><span style="font-weight: 600">Aida Burg</span> commented your post.</h6> |
74 | | - <span class="text-caption">6:00 PM</span> |
75 | | - </div> |
76 | | - |
77 | | - <p class="text-caption text-medium-emphasis my-0">5 August</p> |
78 | | - </v-list-item> |
79 | | - <v-divider></v-divider> |
80 | | - <v-list-item value="3" color="secondary" class="no-spacer" :active="isActive"> |
81 | | - <template v-slot:prepend> |
82 | | - <v-avatar size="36" variant="flat" color="lighterror" class="mr-3 py-2 text-error"> |
83 | | - <SettingOutlined /> |
84 | | - </v-avatar> |
85 | | - </template> |
86 | | - <div class="d-inline-flex justify-space-between w-100"> |
87 | | - <h6 class="text-subtitle-1 font-weight-regular mb-0">Your Profile is Complete <span style="font-weight: 600">60%</span></h6> |
88 | | - <span class="text-caption">2:45 PM</span> |
89 | | - </div> |
90 | | - |
91 | | - <p class="text-caption text-medium-emphasis my-0">7 hours ago</p> |
92 | | - </v-list-item> |
93 | | - <v-divider></v-divider> |
94 | | - <v-list-item value="4" color="secondary" class="no-spacer"> |
95 | | - <template v-slot:prepend> |
96 | | - <v-avatar size="36" variant="flat" color="lightprimary" class="mr-3 py-2 text-primary"> C </v-avatar> |
97 | | - </template> |
98 | | - <div class="d-inline-flex justify-space-between w-100"> |
99 | | - <h6 class="text-subtitle-1 font-weight-regular mb-0"> |
100 | | - <span style="font-weight: 600">Cristina Danny</span> invited to join <span style="font-weight: 600">Metting.</span> |
101 | | - </h6> |
102 | | - <span class="text-caption">9:10 PM</span> |
103 | | - </div> |
104 | | - |
105 | | - <p class="text-caption text-medium-emphasis my-0">Daily scrum meeting time</p> |
106 | | - </v-list-item> |
107 | | - </v-list> |
108 | | - </perfect-scrollbar> |
109 | | - <v-divider></v-divider> |
110 | | - <div class="pa-2 text-center"> |
111 | | - <v-btn color="primary" variant="text">View All</v-btn> |
112 | | - </div> |
113 | | - </v-sheet> |
114 | | - </v-menu> |
| 32 | + <v-icon>mdi-bell-badge</v-icon> |
| 33 | + </v-btn> |
| 34 | + <div class="pr-3" :style="{ color: 'rgb(var(--v-theme-error))' }">お知らせあり</div> |
| 35 | + </template> |
| 36 | + </v-menu> |
115 | 37 | </template> |
116 | 38 |
|
117 | 39 | <style lang="scss"> |
118 | 40 | .v-tooltip { |
119 | | - > .v-overlay__content.custom-tooltip { |
120 | | - padding: 2px 6px; |
121 | | - } |
| 41 | + > .v-overlay__content.custom-tooltip { |
| 42 | + padding: 2px 6px; |
| 43 | + } |
122 | 44 | } |
123 | 45 | </style> |
0 commit comments