This commit is contained in:
@@ -7,15 +7,13 @@ import { computed, ref } from "vue"
|
|||||||
import ProfileModal from "@/components/ProfileModal.vue"
|
import ProfileModal from "@/components/ProfileModal.vue"
|
||||||
import SignInGithub from "@/components/SignInGithub.vue"
|
import SignInGithub from "@/components/SignInGithub.vue"
|
||||||
import UserPill from "@/components/UserPill.vue"
|
import UserPill from "@/components/UserPill.vue"
|
||||||
import { useATProtoLogin } from "@/hooks/useATProtoLogin.hook"
|
|
||||||
import { useGitHubLogin } from "@/hooks/useGitHubLogin.hook"
|
import { useGitHubLogin } from "@/hooks/useGitHubLogin.hook"
|
||||||
import { useRepos } from "@/hooks/useRepos.hook"
|
import { useRepos } from "@/hooks/useRepos.hook"
|
||||||
import { useRepoList } from "@/modules/repo/hooks/useRepoList.hook"
|
import { useRepoList } from "@/modules/repo/hooks/useRepoList.hook"
|
||||||
import type { RepoBase } from "@/modules/repo/interfaces/RepoBase"
|
import type { RepoBase } from "@/modules/repo/interfaces/RepoBase"
|
||||||
|
|
||||||
const { username, accessToken } = useGitHubLogin()
|
const { username, accessToken } = useGitHubLogin()
|
||||||
const { isLoggedIn: isATProtoLoggedIn } = useATProtoLogin()
|
const { isReady, repos, hasCredentialError } = useRepos()
|
||||||
const { isReady, hasCredentialError } = useRepos()
|
|
||||||
const {
|
const {
|
||||||
favoriteRepos,
|
favoriteRepos,
|
||||||
otherRepos,
|
otherRepos,
|
||||||
@@ -25,11 +23,6 @@ const {
|
|||||||
loadMore
|
loadMore
|
||||||
} = useRepoList()
|
} = useRepoList()
|
||||||
|
|
||||||
const isGitHubLoggedIn = computed(() => !!accessToken.value)
|
|
||||||
const isAnyUserLoggedIn = computed(
|
|
||||||
() => isGitHubLoggedIn.value || isATProtoLoggedIn.value
|
|
||||||
)
|
|
||||||
|
|
||||||
const openProfile = () => {
|
const openProfile = () => {
|
||||||
;(document.getElementById("profile_modal") as HTMLDialogElement)?.showModal()
|
;(document.getElementById("profile_modal") as HTMLDialogElement)?.showModal()
|
||||||
}
|
}
|
||||||
@@ -44,7 +37,7 @@ const filteredFavoriteRepos = computed<RepoBase[]>(() =>
|
|||||||
favoriteRepos.value.filter((r) => matchesQuery(r.name))
|
favoriteRepos.value.filter((r) => matchesQuery(r.name))
|
||||||
)
|
)
|
||||||
const filteredOtherRepos = computed<RepoBase[]>(() =>
|
const filteredOtherRepos = computed<RepoBase[]>(() =>
|
||||||
otherRepos.value.filter((r) => matchesQuery(r.name))
|
repos.value.filter((r) => matchesQuery(r.name))
|
||||||
)
|
)
|
||||||
|
|
||||||
const groupedOtherRepos = computed<
|
const groupedOtherRepos = computed<
|
||||||
|
|||||||
Reference in New Issue
Block a user