Onboarding (#132)

* Initial onboarding

* Update OnboardingModal.vue

* Add finish

* Animation

* Automatic opening

* Move onboarding icon to outside of main appbar

* Run lint

* run fmt

* mostly finish

* Finish onboarding

* fix onboarding bug + linux build

* fix build again

* Add back window shadows

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Jai A <jai@modrinth.com>
This commit is contained in:
Adrian O.V
2023-06-20 22:03:59 -04:00
committed by GitHub
parent bd697a02f5
commit 8e5a0b8ae2
27 changed files with 635 additions and 248 deletions

View File

@@ -1,10 +1,13 @@
import { ofetch } from 'ofetch'
import { handleError } from '@/store/state.js'
import { getVersion } from '@tauri-apps/api/app'
export const useFetch = async (url, item) => {
try {
const version = await getVersion()
return await ofetch(url, {
headers: { 'User-Agent': 'modrinth/theseus (support@modrinth.com)' },
headers: { 'User-Agent': `modrinth/theseus/${version} (support@modrinth.com)` },
})
} catch (err) {
handleError({ message: `Error fetching ${item}` })