Skip to content

Commit 9d4e111

Browse files
committed
Disable sync button instead of hide
1 parent 21b9102 commit 9d4e111

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/components/AppSidebar.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ const store = useStore()
2424
</div>
2525
<div class="lower">
2626
<SidebarButton
27-
v-if="store.currentPage === Page.Home"
27+
:disabled="store.currentPage !== Page.Home"
2828
title="Reload notifications"
2929
@click="store.fetchNotifications(true)"
3030
>
3131
<Icons.Sync16 :class="{ 'sync-icon-spin': store.loadingNotifications }" />
3232
</SidebarButton>
3333

3434
<SidebarButton
35+
:disabled="store.currentPage === Page.Settings"
3536
title="Go to settings"
3637
@click="store.setPage(Page.Settings)"
3738
>

src/components/SidebarButton.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ interface Props {
33
disabled?: boolean
44
}
55
6-
const props = withDefaults(defineProps<Props>(), {
7-
disabled: false,
8-
})
6+
withDefaults(defineProps<Props>(), { disabled: false })
97
</script>
108

119
<template>

0 commit comments

Comments
 (0)