File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ function handleBack() {
3535 v-if =" accessToken != null"
3636 @click =" store.fetchNotifications(true)"
3737 >
38- <Icons .Sync16 />
38+ <Icons .Sync16 :class = " { 'sync-icon-spin': store.loadingNotifications } " />
3939 </SidebarButton >
4040
4141 <SidebarButton @click =" store.setPage(Page.Settings)" >
@@ -46,6 +46,14 @@ function handleBack() {
4646</template >
4747
4848<style lang="scss" scoped>
49+ @keyframes spin {
50+ 0% {
51+ transform : rotate (0deg );
52+ }
53+ 100% {
54+ transform : rotate (360deg );
55+ }
56+ }
4957.nav {
5058 height : 100% ;
5159 flex-shrink : 0 ;
@@ -55,6 +63,10 @@ function handleBack() {
5563 padding : 10px ;
5664 background-color : var (--sidebar-bg );
5765
66+ .sync-icon-spin {
67+ animation : 1s spin linear infinite ;
68+ }
69+
5870 .upper ,
5971 .lower {
6072 display : flex ;
@@ -70,6 +82,5 @@ function handleBack() {
7082 .lower {
7183 margin-top : auto ;
7284 }
73-
7485}
7586 </style >
Original file line number Diff line number Diff line change 1+ <template />
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ export const useStore = defineStore('store', () => {
2323 if ( withSkeletons )
2424 skeletonVisible . value = true
2525
26+ loadingNotifications . value = true
27+
2628 try {
2729 const { data } = await getNotifications ( {
2830 accessToken,
@@ -31,12 +33,15 @@ export const useStore = defineStore('store', () => {
3133 } )
3234
3335 notifications . value = notificationListFromThreads ( data )
34- skeletonVisible . value = false
3536 }
3637 catch ( error ) {
3738 console . error ( 'NotificationError: ' , error )
3839 notifications . value = [ ]
3940 }
41+ finally {
42+ loadingNotifications . value = false
43+ skeletonVisible . value = false
44+ }
4045 }
4146
4247 const currentPage = ref ( Page . Landing )
You can’t perform that action at this time.
0 commit comments