diff --git a/README.md b/README.md index f7c3730a79..7b4f90ef20 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ ![Issues](https://img.shields.io/github/issues-raw/Modrinth/code?color=c78aff&label=issues&style=for-the-badge) ![Pull Requests](https://img.shields.io/github/issues-pr-raw/Modrinth/code?color=c78aff&label=PRs&style=for-the-badge) ![Contributors](https://img.shields.io/github/contributors/Modrinth/code?color=c78aff&label=contributors&style=for-the-badge) -![Lines](https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/modrinth/code/badge?style=flat&logoColor=white&color=c78aff&style=for-the-badge) +![Lines of Code](https://img.shields.io/endpoint?url=https://loctopus.creeperkatze.dev/github/modrinth/code/badge?style=flat&logoColor=white&color=c78aff&style=for-the-badge) ![Commit Activity](https://img.shields.io/github/commit-activity/m/Modrinth/code?color=c78aff&label=commits&style=for-the-badge) ![Last Commit](https://img.shields.io/github/last-commit/Modrinth/code?color=c78aff&label=last%20commit&style=for-the-badge) ## Modrinth Monorepo -Welcome to the Modrinth Monorepo, the primary codebase for the Modrinth web interface and app. It contains ![Lines](https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/modrinth/olympus/badge?logoColor=white&color=black&label=) lines of code and has ![Contributors](https://img.shields.io/github/contributors/Modrinth/code?color=black&label=) contributors! +Welcome to the Modrinth Monorepo, the primary codebase for the Modrinth web interface and app. It contains ![Lines of Code](https://img.shields.io/endpoint?url=https://loctopus.creeperkatze.dev/github/modrinth/code/badge%3Fformat%3Dhuman&logoColor=white&color=black&label=) lines of code and has ![Contributors](https://img.shields.io/github/contributors/Modrinth/code?color=black&label=) contributors! If you're not a developer and you've stumbled upon this repository, you can access the web interface on the [Modrinth website](https://modrinth.com) and download the latest release of the app [here](https://modrinth.com/app). diff --git a/apps/app-frontend/src/locales/en-US/index.json b/apps/app-frontend/src/locales/en-US/index.json index 9b8fdec3b9..fea079df51 100644 --- a/apps/app-frontend/src/locales/en-US/index.json +++ b/apps/app-frontend/src/locales/en-US/index.json @@ -410,12 +410,27 @@ "app.project.install-button.already-installed": { "message": "This project is already installed" }, + "app.project.install-button.switch-version": { + "message": "Switch version" + }, "app.project.install-context.back-to-browse": { "message": "Back to discover" }, "app.project.install-context.install-content-to-instance": { "message": "Install content to instance" }, + "app.project.version.all-versions": { + "message": "All versions" + }, + "app.project.version.download-in-browser": { + "message": "Download in browser" + }, + "app.project.version.installing": { + "message": "Installing" + }, + "app.project.versions.already-installed": { + "message": "Already installed" + }, "app.settings.developer-mode-enabled": { "message": "Developer mode enabled." }, diff --git a/apps/app-frontend/src/pages/Browse.vue b/apps/app-frontend/src/pages/Browse.vue index 0eeede917a..253d8430eb 100644 --- a/apps/app-frontend/src/pages/Browse.vue +++ b/apps/app-frontend/src/pages/Browse.vue @@ -49,6 +49,7 @@ import { get_installed_project_ids as getInstalledProjectIds, } from '@/helpers/instance' import { get_loader_versions as getLoaderManifest } from '@/helpers/metadata' +import { get as getSettings, set as setSettings } from '@/helpers/settings.ts' import { get_categories, get_game_versions, get_loaders } from '@/helpers/tags' import { get_instance_worlds } from '@/helpers/worlds' import { injectContentInstall } from '@/providers/content-install' @@ -1041,10 +1042,24 @@ function getProjectBrowseQuery() { } } +const advancedFiltersCollapsed = computed({ + get: () => themeStore.getFeatureFlag('advanced_filters_collapsed'), + set: (value) => { + themeStore.featureFlags['advanced_filters_collapsed'] = value + getSettings() + .then((settings) => { + settings.feature_flags['advanced_filters_collapsed'] = value + return setSettings(settings) + }) + .catch(handleError) + }, +}) + provideBrowseManager({ tags, projectType, ...searchState, + advancedFiltersCollapsed, getProjectLink: (result: Labrinth.Search.v2.ResultSearchProject) => ({ path: `/project/${result.project_id ?? result.slug}`, query: getProjectBrowseQuery(), diff --git a/apps/app-frontend/src/pages/instance/Mods.vue b/apps/app-frontend/src/pages/instance/Mods.vue index 6bcff92a0e..485d3065de 100644 --- a/apps/app-frontend/src/pages/instance/Mods.vue +++ b/apps/app-frontend/src/pages/instance/Mods.vue @@ -1351,7 +1351,9 @@ provideContentManager({ title: item.file_name.replace('.disabled', ''), icon_url: null, }, - projectLink: item.project?.id ? { path: `/project/${item.project.id}` } : undefined, + projectLink: item.project?.id + ? { path: `/project/${item.project.id}`, query: { i: props.instance.id } } + : undefined, version: item.version ?? { id: item.file_name, version_number: formatMessage(commonMessages.unknownLabel), @@ -1361,6 +1363,7 @@ provideContentManager({ item.project?.id && item.version?.id ? { path: `/project/${item.project.id}/version/${item.version.id}`, + query: { i: props.instance.id }, } : undefined, owner: item.owner diff --git a/apps/app-frontend/src/pages/project/Index.vue b/apps/app-frontend/src/pages/project/Index.vue index d9230361ef..e14dcc0f33 100644 --- a/apps/app-frontend/src/pages/project/Index.vue +++ b/apps/app-frontend/src/pages/project/Index.vue @@ -116,13 +116,27 @@ aria-label="More options" >