You've already forked AstralRinth
forked from didirus/AstralRinth
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:
@@ -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}` })
|
||||
|
||||
@@ -52,12 +52,12 @@ export async function get_jre(path) {
|
||||
|
||||
// Autodetect Java globals, by searching the users computer.
|
||||
// Returns a *NEW* JavaGlobals that can be put into Settings
|
||||
export async function autodetect_java_globals(path) {
|
||||
return await invoke('jre_autodetect_java_globals', { path })
|
||||
export async function autodetect_java_globals() {
|
||||
return await invoke('jre_autodetect_java_globals')
|
||||
}
|
||||
|
||||
// Automatically installs specified java version
|
||||
export async function jre_auto_install_java(javaVersion) {
|
||||
export async function auto_install_java(javaVersion) {
|
||||
return await invoke('jre_auto_install_java', { javaVersion })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user