Discord and playtime (#462)

* initial

* Fixed java thing

* fixes

* internet check change

* some fix/test commit

* Fix render issues on windows

* bump version

---------

Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Jai A <jai@modrinth.com>
This commit is contained in:
Wyatt Verchere
2023-08-05 16:41:08 -07:00
committed by GitHub
parent 5ee64f2705
commit d968ad383c
24 changed files with 277 additions and 89 deletions

View File

@@ -41,23 +41,31 @@ const getInstances = async () => {
const getFeaturedModpacks = async () => {
const response = await useFetch(
`https://api.modrinth.com/v2/search?facets=[["project_type:modpack"]]&limit=10&index=follows&filters=${filter.value}`,
'featured modpacks'
'featured modpacks',
offline.value
)
if (response) featuredModpacks.value = response.hits
if (response) {
featuredModpacks.value = response.hits
} else {
featuredModpacks.value = []
}
}
const getFeaturedMods = async () => {
const response = await useFetch(
'https://api.modrinth.com/v2/search?facets=[["project_type:mod"]]&limit=10&index=follows',
'featured mods'
'featured mods',
offline.value
)
if (response) featuredMods.value = response.hits
if (response) {
featuredMods.value = response.hits
} else {
featuredModpacks.value = []
}
}
await getInstances()
if (!offline.value) {
await Promise.all([getFeaturedModpacks(), getFeaturedMods()])
}
await Promise.all([getFeaturedModpacks(), getFeaturedMods()])
const unlistenProfile = await profile_listener(async (e) => {
await getInstances()