Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
syropian committed Dec 31, 2024
1 parent 9397469 commit cf18a7b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
15 changes: 11 additions & 4 deletions resources/components/stars/StarredRepoList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import { nextTick, ref, watch } from 'vue'
// import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
import { createVirtualScroller } from 'vue-typed-virtual-list'
const emit = defineEmits<{
blur: [e: FocusEvent]
focus: [e: FocusEvent]
}>()
const VirtualScroller = createVirtualScroller<GitHubRepo>()
/** Stars Fetch Lifecycle
Expand Down Expand Up @@ -48,27 +53,29 @@ watch([reposHaveSynced, pageInfoHasSynced], async syncChecks => {
v-if="starsStore.filteredRepos.length"
:default-size="156"
:items="starsStore.filteredRepos"
class="relative flex-grow bg-white dark:bg-black focus:outline-none"
class="relative h-full bg-white dark:bg-black focus:outline-none"
role="listbox"
aria-label="Stars List"
aria-multiselectable="true"
tabindex="0"
@focus="emit('focus', $event)"
@blur="emit('blur', $event)"
>
<template #item="{ ref: item }">
<slot :repo="(item as GitHubRepo)" />
</template>
</VirtualScroller>

<div
v-if="starsStore.isFetchingStars && !starsStore.filteredRepos.length"
class="flex h-full items-center justify-center"
v-if="!starsStore.filteredRepos.length && starsStore.isFetchingStars"
class="flex w-full h-full items-center justify-center"
>
<p class="text-center text-gray-500">Loading starred repositories...</p>
</div>

<div
v-if="!starsStore.filteredRepos.length && !starsStore.isFetchingStars"
class="flex h-full items-center justify-center"
class="flex w-full h-full items-center justify-center"
>
<p class="text-center text-gray-500">No results found</p>
</div>
Expand Down
16 changes: 7 additions & 9 deletions resources/views/dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { useTagsStore } from '@/store/useTagsStore'
import { useUserStore } from '@/store/useUserStore'
import { GitHubRepo } from '@/types'
import { ArrowLeftCircleIcon, Bars3CenterLeftIcon as MenuIcon } from '@heroicons/vue/24/outline'
import { tryOnMounted } from '@vueuse/core'
import localForage from 'localforage'
import { computed, nextTick, ref, watch } from 'vue'
Expand All @@ -57,6 +56,8 @@ useSyncValuesToStores(
)
const isStarsListFocused = ref(false)
const isSidebarOpen = ref(false)
const isReadmeOpen = ref(false)
const { selectItem, selectedItems } = useListSelectionState(
computed(() => starsStore.filteredRepos.map(repo => repo.node)),
Expand All @@ -80,9 +81,6 @@ registerHook('success', () => {
}
})
const isSidebarOpen = ref(false)
const isReadmeOpen = ref(false)
const onAllStarsSelected = () => {
isSidebarOpen.value = false
starsFilterStore.setFilterByAll()
Expand Down Expand Up @@ -164,9 +162,9 @@ watch(
// Show welcome dialog the first time a user logs in
const shouldShowWelcomeMessage = ref(false)
tryOnMounted(() => {
shouldShowWelcomeMessage.value = !user.value?.flags.find(flag => flag.key === 'has-seen-welcome-message')?.value
})
// tryOnMounted(() => {
// shouldShowWelcomeMessage.value = !user.value?.flags.find(flag => flag.key === 'has-seen-welcome-message')?.value
// })
</script>

<template>
Expand Down Expand Up @@ -302,10 +300,10 @@ tryOnMounted(() => {

<SmartFiltersDialog />

<WelcomeDialog
<!-- <WelcomeDialog
:is-open="shouldShowWelcomeMessage"
:hide="() => (shouldShowWelcomeMessage = false)"
/>
/> -->

<GlobalToast />

Expand Down

0 comments on commit cf18a7b

Please sign in to comment.