diff --git a/src/components/TopBar/TopBar.vue b/src/components/TopBar/TopBar.vue index 43f1e622..be662f34 100644 --- a/src/components/TopBar/TopBar.vue +++ b/src/components/TopBar/TopBar.vue @@ -69,6 +69,47 @@ const favoritesPopRef = ref() const scrollTop = ref(0) const oldScrollTop = ref(0) +// Avatar +const avatar = useDelayedHover({ + enter: () => openUserPanel(), + leave: () => closeUserPanel(), +}) +// Notifications +const notifications = useDelayedHover({ + enter: () => showNotificationsPop.value = true, + leave: () => showNotificationsPop.value = false, +}) +// Moments +const moments = useDelayedHover({ + enter: () => showMomentsPop.value = true, + leave: () => showMomentsPop.value = false, +}) +// Favorites +const favorites = useDelayedHover({ + enter: () => showFavoritesPop.value = true, + leave: () => showFavoritesPop.value = false, +}) +// Upload +const upload = useDelayedHover({ + enter: () => showUploadPop.value = true, + leave: () => showUploadPop.value = false, +}) +// History +const history = useDelayedHover({ + enter: () => showHistoryPop.value = true, + leave: () => showHistoryPop.value = false, +}) +// Watch Later +const watchLater = useDelayedHover({ + enter: () => showWatchLaterPop.value = true, + leave: () => showWatchLaterPop.value = false, +}) +// More +const more = useDelayedHover({ + enter: () => showMorePop.value = true, + leave: () => showMorePop.value = false, +}) + watch(() => settings.value.autoHideTopBar, (newVal) => { if (!newVal) toggleTopBarVisible(true) @@ -379,9 +420,8 @@ defineExpose({