0.8.0 beta fixes (#2154)

* initial fixes

* 0.8.0 beta fixes

* run actions

* run fmt

* Fix windows build

* Add purge cache opt

* add must revalidate to project req

* lint + clippy

* fix processes, open folder

* Update migrator to use old launcher cache for perf

* fix empty dirs not moving

* fix lint + create natives dir if not exist

* fix large request batches

* finish

* Fix deep linking on mac

* fix comp err

* fix comp err (2)

---------

Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Geometrically
2024-08-16 23:20:11 -07:00
committed by GitHub
parent 3a4843fb46
commit 910e219c0e
66 changed files with 1961 additions and 1896 deletions

View File

@@ -15,6 +15,7 @@ export const useBreadcrumbs = defineStore('breadcrumbsStore', {
},
// resets breadcrumbs to only included ones as to not have stale breadcrumbs
resetToNames(breadcrumbs) {
if (!breadcrumbs) return
// names is an array of every breadcrumb.name that starts with a ?
const names = breadcrumbs
.filter((breadcrumb) => breadcrumb.name.charAt(0) === '?')

View File

@@ -8,8 +8,8 @@ export const useError = defineStore('errorsStore', {
setErrorModal(ref) {
this.errorModal = ref
},
showError(error) {
this.errorModal.show(error)
showError(error, closable = true, source = null) {
this.errorModal.show(error, closable, source)
},
},
})

View File

@@ -42,7 +42,7 @@ export const useInstall = defineStore('installStore', {
})
export const install = async (projectId, versionId, instancePath, source, callback = () => {}) => {
const project = await get_project(projectId).catch(handleError)
const project = await get_project(projectId, 'must_revalidate').catch(handleError)
if (project.project_type === 'modpack') {
const version = versionId ?? project.versions[project.versions.length - 1]
@@ -68,7 +68,7 @@ export const install = async (projectId, versionId, instancePath, source, callba
const [instance, instanceProjects, versions] = await Promise.all([
await get(instancePath).catch(handleError),
await get_projects(instancePath).catch(handleError),
await get_version_many(project.versions),
await get_version_many(project.versions, 'must_revalidate'),
])
const projectVersions = versions.sort(
@@ -165,11 +165,11 @@ export const installVersionDependencies = async (profile, version) => {
)
continue
const depProject = await get_project(dep.project_id).catch(handleError)
const depProject = await get_project(dep.project_id, 'must_revalidate').catch(handleError)
const depVersions = (await get_version_many(depProject.versions).catch(handleError)).sort(
(a, b) => dayjs(b.date_published) - dayjs(a.date_published),
)
const depVersions = (
await get_version_many(depProject.versions, 'must_revalidate').catch(handleError)
).sort((a, b) => dayjs(b.date_published) - dayjs(a.date_published))
const latest = depVersions.find(
(v) => v.game_versions.includes(profile.game_version) && v.loaders.includes(profile.loader),

View File

@@ -1,8 +1,14 @@
import { defineStore } from 'pinia'
export const useLoading = defineStore('loadingStore', {
state: () => ({ loading: false }),
state: () => ({
loading: false,
barEnabled: false,
}),
actions: {
setEnabled(enabled) {
this.barEnabled = enabled
},
startLoading() {
this.loading = true
},