-
+
+
+ appWindow.minimize()">
+
+
+ appWindow.toggleMaximize()">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ message }}
+
+
+
+
diff --git a/apps/app-frontend/src/components/ui/URLConfirmModal.vue b/apps/app-frontend/src/components/ui/URLConfirmModal.vue
index 7d47d9d1d..f7d10a9a2 100644
--- a/apps/app-frontend/src/components/ui/URLConfirmModal.vue
+++ b/apps/app-frontend/src/components/ui/URLConfirmModal.vue
@@ -16,11 +16,16 @@ const installing = ref(false)
defineExpose({
async show(event) {
if (event.event === 'InstallVersion') {
- version.value = await get_version(event.id).catch(handleError)
- project.value = await get_project(version.value.project_id).catch(handleError)
+ version.value = await get_version(event.id, 'must_revalidate').catch(handleError)
+ project.value = await get_project(version.value.project_id, 'must_revalidate').catch(
+ handleError,
+ )
} else {
- project.value = await get_project(event.id).catch(handleError)
- version.value = await get_version(project.value.versions[0]).catch(handleError)
+ project.value = await get_project(event.id, 'must_revalidate').catch(handleError)
+ version.value = await get_version(
+ project.value.versions[project.value.versions.length - 1],
+ 'must_revalidate',
+ ).catch(handleError)
}
categories.value = (await get_categories().catch(handleError)).filter(
(cat) => project.value.categories.includes(cat.name) && cat.project_type === 'mod',
diff --git a/apps/app-frontend/src/components/ui/tutorial/GalleryImage.vue b/apps/app-frontend/src/components/ui/tutorial/GalleryImage.vue
deleted file mode 100644
index 59e3c04ae..000000000
--- a/apps/app-frontend/src/components/ui/tutorial/GalleryImage.vue
+++ /dev/null
@@ -1,198 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{ image.title }}
-
- {{ image.subtitle }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/app-frontend/src/components/ui/tutorial/LoginCard.vue b/apps/app-frontend/src/components/ui/tutorial/LoginCard.vue
deleted file mode 100644
index 11b340d4c..000000000
--- a/apps/app-frontend/src/components/ui/tutorial/LoginCard.vue
+++ /dev/null
@@ -1,140 +0,0 @@
-
-
-
-
-
-
- Sign into Minecraft
-
- Sign in with your Microsoft account to launch Minecraft with your mods and modpacks. If you
- don't have a Minecraft account, you can purchase the game on the
-
- Minecraft website
-
-
-
-
Back
-
-
-
- {{ loading ? 'Loading...' : 'Sign in' }}
-
-
-
Finish
-
-
-
-
-
-
diff --git a/apps/app-frontend/src/components/ui/tutorial/OnboardingScreen.vue b/apps/app-frontend/src/components/ui/tutorial/OnboardingScreen.vue
deleted file mode 100644
index ae694c409..000000000
--- a/apps/app-frontend/src/components/ui/tutorial/OnboardingScreen.vue
+++ /dev/null
@@ -1,284 +0,0 @@
-
-
-
-
-
-
- Get started
-
-
-
-
-
-
diff --git a/apps/app-frontend/src/components/ui/tutorial/StickyTitleBar.vue b/apps/app-frontend/src/components/ui/tutorial/StickyTitleBar.vue
deleted file mode 100644
index fd1fc40b2..000000000
--- a/apps/app-frontend/src/components/ui/tutorial/StickyTitleBar.vue
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
- appWindow.minimize()">
-
-
- appWindow.toggleMaximize()">
-
-
- {
- saveWindowState(StateFlags.ALL)
- window.getCurrent().close()
- }
- "
- >
-
-
-
-
-
-
-
diff --git a/apps/app-frontend/src/helpers/cache.js b/apps/app-frontend/src/helpers/cache.js
index c64ff4403..abf64a363 100644
--- a/apps/app-frontend/src/helpers/cache.js
+++ b/apps/app-frontend/src/helpers/cache.js
@@ -1,49 +1,53 @@
import { invoke } from '@tauri-apps/api/tauri'
-export async function get_project(id) {
- return await invoke('plugin:cache|get_project', { id })
+export async function get_project(id, cacheBehaviour) {
+ return await invoke('plugin:cache|get_project', { id, cacheBehaviour })
}
-export async function get_project_many(ids) {
- return await invoke('plugin:cache|get_project_many', { ids })
+export async function get_project_many(ids, cacheBehaviour) {
+ return await invoke('plugin:cache|get_project_many', { ids, cacheBehaviour })
}
-export async function get_version(id) {
- return await invoke('plugin:cache|get_version', { id })
+export async function get_version(id, cacheBehaviour) {
+ return await invoke('plugin:cache|get_version', { id, cacheBehaviour })
}
-export async function get_version_many(ids) {
- return await invoke('plugin:cache|get_version_many', { ids })
+export async function get_version_many(ids, cacheBehaviour) {
+ return await invoke('plugin:cache|get_version_many', { ids, cacheBehaviour })
}
-export async function get_user(id) {
- return await invoke('plugin:cache|get_user', { id })
+export async function get_user(id, cacheBehaviour) {
+ return await invoke('plugin:cache|get_user', { id, cacheBehaviour })
}
-export async function get_user_many(ids) {
- return await invoke('plugin:cache|get_user_many', { ids })
+export async function get_user_many(ids, cacheBehaviour) {
+ return await invoke('plugin:cache|get_user_many', { ids, cacheBehaviour })
}
-export async function get_team(id) {
- return await invoke('plugin:cache|get_team', { id })
+export async function get_team(id, cacheBehaviour) {
+ return await invoke('plugin:cache|get_team', { id, cacheBehaviour })
}
-export async function get_team_many(ids) {
- return await invoke('plugin:cache|get_team_many', { ids })
+export async function get_team_many(ids, cacheBehaviour) {
+ return await invoke('plugin:cache|get_team_many', { ids, cacheBehaviour })
}
-export async function get_organization(id) {
- return await invoke('plugin:cache|get_organization', { id })
+export async function get_organization(id, cacheBehaviour) {
+ return await invoke('plugin:cache|get_organization', { id, cacheBehaviour })
}
-export async function get_organization_many(ids) {
- return await invoke('plugin:cache|get_organization_many', { ids })
+export async function get_organization_many(ids, cacheBehaviour) {
+ return await invoke('plugin:cache|get_organization_many', { ids, cacheBehaviour })
}
-export async function get_search_results(id) {
- return await invoke('plugin:cache|get_search_results', { id })
+export async function get_search_results(id, cacheBehaviour) {
+ return await invoke('plugin:cache|get_search_results', { id, cacheBehaviour })
}
-export async function get_search_results_many(ids) {
- return await invoke('plugin:cache|get_search_results_many', { ids })
+export async function get_search_results_many(ids, cacheBehaviour) {
+ return await invoke('plugin:cache|get_search_results_many', { ids, cacheBehaviour })
+}
+
+export async function purge_cache_types(cacheTypes) {
+ return await invoke('plugin:cache|purge_cache_types', { cacheTypes })
}
diff --git a/apps/app-frontend/src/helpers/process.js b/apps/app-frontend/src/helpers/process.js
index 94df7f8f6..5beed3baa 100644
--- a/apps/app-frontend/src/helpers/process.js
+++ b/apps/app-frontend/src/helpers/process.js
@@ -18,6 +18,6 @@ export async function get_all() {
}
/// Kills a process by UUID
-export async function kill(pid) {
- return await invoke('plugin:process|process_kill', { pid })
+export async function kill(uuid) {
+ return await invoke('plugin:process|process_kill', { uuid })
}
diff --git a/apps/app-frontend/src/helpers/profile.js b/apps/app-frontend/src/helpers/profile.js
index 2e6ac703c..837324998 100644
--- a/apps/app-frontend/src/helpers/profile.js
+++ b/apps/app-frontend/src/helpers/profile.js
@@ -51,8 +51,8 @@ export async function get_many(paths) {
// Get a profile's projects
// Returns a map of a path to profile file
-export async function get_projects(path) {
- return await invoke('plugin:profile|profile_get_projects', { path })
+export async function get_projects(path, cacheBehaviour) {
+ return await invoke('plugin:profile|profile_get_projects', { path, cacheBehaviour })
}
// Get a profile's full fs path
diff --git a/apps/app-frontend/src/helpers/settings.js b/apps/app-frontend/src/helpers/settings.js
index 701cc325d..0ff2ff2f1 100644
--- a/apps/app-frontend/src/helpers/settings.js
+++ b/apps/app-frontend/src/helpers/settings.js
@@ -38,12 +38,6 @@ export async function set(settings) {
return await invoke('plugin:settings|settings_set', { settings })
}
-// Changes the config dir
-// Seizes the entire application state until its done
-export async function change_config_dir(newConfigDir) {
- return await invoke('plugin:settings|settings_change_config_dir', { newConfigDir })
-}
-
-export async function is_dir_writeable(newConfigDir) {
- return await invoke('plugin:settings|settings_is_dir_writeable', { newConfigDir })
+export async function cancel_directory_change() {
+ return await invoke('plugin:settings|cancel_directory_change')
}
diff --git a/apps/app-frontend/src/main.js b/apps/app-frontend/src/main.js
index 8d3876830..881c3b51c 100644
--- a/apps/app-frontend/src/main.js
+++ b/apps/app-frontend/src/main.js
@@ -2,15 +2,9 @@ import { createApp } from 'vue'
import router from '@/routes'
import App from '@/App.vue'
import { createPinia } from 'pinia'
-import '@modrinth/assets/omorphia.scss'
-import '@/assets/stylesheets/global.scss'
import FloatingVue from 'floating-vue'
import 'floating-vue/dist/style.css'
-import { get_opening_command, initialize_state } from '@/helpers/state'
import loadCssMixin from './mixins/macCssFix.js'
-import { get } from '@/helpers/settings'
-import { invoke } from '@tauri-apps/api'
-import { isDev } from './helpers/utils.js'
import { createPlugin } from '@vintl/vintl/plugin'
const VIntlPlugin = createPlugin({
@@ -39,45 +33,4 @@ app.use(FloatingVue)
app.mixin(loadCssMixin)
app.use(VIntlPlugin)
-const mountedApp = app.mount('#app')
-
-const raw_invoke = async (plugin, fn, args) => {
- if (plugin === '') {
- await invoke(fn, args)
- } else {
- await invoke('plugin:' + plugin + '|' + fn, args)
- }
-}
-isDev()
- .then((dev) => {
- if (dev) {
- window.raw_invoke = raw_invoke
- }
- })
- .catch((err) => {
- console.error(err)
- })
-
-initialize_state()
- .then(() => {
- // First, redirect to other landing page if we have that setting
- get()
- .then((fetchSettings) => {
- if (fetchSettings?.default_page && fetchSettings?.default_page !== 'Home') {
- router.push({ name: fetchSettings?.default_page })
- }
- })
- .catch((err) => {
- console.error(err)
- })
- .finally(() => {
- mountedApp.initialize()
- get_opening_command().then((command) => {
- console.log(JSON.stringify(command)) // change me to use whatever FE command handler is made
- })
- })
- })
- .catch((err) => {
- console.error('Failed to initialize app', err)
- mountedApp.failure(err)
- })
+app.mount('#app')
diff --git a/apps/app-frontend/src/pages/Browse.vue b/apps/app-frontend/src/pages/Browse.vue
index f1463e032..ab6b796f4 100644
--- a/apps/app-frontend/src/pages/Browse.vue
+++ b/apps/app-frontend/src/pages/Browse.vue
@@ -1,5 +1,5 @@
@@ -136,26 +154,50 @@ async function findLauncherDir() {