From 3dad6b317fc9692d067df9c71658bbdecb58f795 Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Thu, 1 May 2025 16:13:13 -0700 Subject: [PATCH] MR App 0.9.5 - Big bugfix update (#3585) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add launcher_feature_version to Profile * Misc fixes - Add typing to theme and settings stuff - Push instance route on creation from installing a modpack - Fixed servers not reloading properly when first added * Make old instances scan the logs folder for joined servers on launcher startup * Create AttachedWorldData * Change AttachedWorldData interface * Rename WorldType::World to WorldType::Singleplayer * Implement world display status system * Fix Minecraft font * Fix set_world_display_status Tauri error * Add 'Play instance' option * Add option to disable worlds showing in Home * Fixes - Fix available server filter only showing if there are some available - Fixed server and singleplayer filters sometimes showing when there are only servers or singleplayer worlds - Fixed new worlds not being automatically added when detected - Rephrased Jump back into worlds option description * Fixed sometimes more than 6 items showing up in Jump back in * Fix servers.dat issue with instances you haven't played before * Fix too large of bulk requests being made, limit max to 800 #3430 * Add hiding from home page, add types to Mods.vue * Make recent worlds go into grid when display is huge * Fix lint * Remove redundant media query * Fix protocol version on home page, and home page being blocked by pinging servers * Clippy fix * More Clippy fixes * Fix Prettier lints * Undo `from_string` changes --------- Co-authored-by: Josiah Glosson Co-authored-by: Alejandro González --- Cargo.lock | 26 ++ apps/app-frontend/src/App.vue | 2 +- .../src/assets/stylesheets/global.scss | 8 +- .../src/components/ui/ErrorModal.vue | 2 +- .../components/ui/InstanceCreationModal.vue | 2 +- .../src/components/ui/SearchCard.vue | 6 + .../ui/install_flow/InstallConfirmModal.vue | 5 +- .../ui/instance_settings/HooksSettings.vue | 2 +- .../ui/instance_settings/JavaSettings.vue | 2 +- .../ui/instance_settings/WindowSettings.vue | 2 +- .../components/ui/modal/AppSettingsModal.vue | 2 +- .../ui/modal/ConfirmModalWrapper.vue | 2 +- .../src/components/ui/modal/ModalWrapper.vue | 2 +- .../components/ui/modal/ShareModalWrapper.vue | 2 +- .../ui/settings/AppearanceSettings.vue | 25 +- .../ui/settings/DefaultInstanceSettings.vue | 2 +- .../ui/settings/FeatureFlagSettings.vue | 19 +- .../ui/settings/PrivacySettings.vue | 2 +- .../settings/ResourceManagementSettings.vue | 2 +- .../src/components/ui/world/InstanceItem.vue | 2 +- .../components/ui/world/RecentWorldsList.vue | 161 +++++++----- .../src/components/ui/world/WorldItem.vue | 52 +++- .../ui/world/modal/EditServerModal.vue | 37 ++- .../modal/EditSingleplayerWorldModal.vue | 26 +- .../ui/world/modal/HideFromHomeOption.vue | 18 ++ apps/app-frontend/src/helpers/pack.js | 9 +- apps/app-frontend/src/helpers/settings.js | 43 ---- apps/app-frontend/src/helpers/settings.ts | 78 ++++++ apps/app-frontend/src/helpers/types.d.ts | 27 ++ apps/app-frontend/src/helpers/worlds.ts | 34 ++- apps/app-frontend/src/pages/instance/Mods.vue | 165 ++++++------ .../src/pages/instance/Worlds.vue | 30 ++- apps/app-frontend/src/pages/project/Index.vue | 6 +- apps/app-frontend/src/store/install.js | 23 +- apps/app-frontend/src/store/state.js | 2 +- apps/app-frontend/src/store/theme.js | 38 --- apps/app-frontend/src/store/theme.ts | 70 ++++++ apps/app-playground/Cargo.toml | 1 + apps/app-playground/src/main.rs | 3 +- apps/app/Cargo.toml | 1 + apps/app/build.rs | 1 + apps/app/src/api/worlds.rs | 31 ++- apps/app/src/main.rs | 11 +- apps/app/tauri.conf.json | 2 +- apps/daedalus_client/src/forge.rs | 8 +- apps/labrinth/src/auth/oauth/errors.rs | 2 +- apps/labrinth/src/auth/oauth/mod.rs | 2 +- apps/labrinth/src/auth/templates/mod.rs | 2 +- .../database/models/legacy_loader_fields.rs | 3 +- .../src/database/models/loader_fields.rs | 6 +- .../src/database/models/version_item.rs | 2 +- apps/labrinth/src/models/v3/notifications.rs | 20 +- apps/labrinth/src/routes/internal/admin.rs | 9 +- apps/labrinth/src/routes/internal/flows.rs | 39 ++- apps/labrinth/src/routes/internal/pats.rs | 2 +- apps/labrinth/src/routes/updates.rs | 4 +- apps/labrinth/src/routes/v2_reroute.rs | 5 +- apps/labrinth/src/routes/v3/collections.rs | 2 +- apps/labrinth/src/routes/v3/oauth_clients.rs | 2 +- apps/labrinth/src/routes/v3/organizations.rs | 2 +- apps/labrinth/src/routes/v3/payouts.rs | 5 +- .../src/routes/v3/project_creation.rs | 6 +- apps/labrinth/src/routes/v3/projects.rs | 15 +- apps/labrinth/src/routes/v3/reports.rs | 6 +- apps/labrinth/src/routes/v3/threads.rs | 6 +- apps/labrinth/src/routes/v3/users.rs | 2 +- .../src/routes/v3/version_creation.rs | 8 +- apps/labrinth/src/sync/status.rs | 2 +- apps/labrinth/src/util/actix.rs | 15 +- apps/labrinth/src/util/img.rs | 5 +- apps/labrinth/tests/common/api_v2/project.rs | 21 +- apps/labrinth/tests/common/api_v2/user.rs | 6 +- apps/labrinth/tests/common/api_v2/version.rs | 10 +- .../tests/common/api_v3/collections.rs | 2 +- apps/labrinth/tests/common/api_v3/oauth.rs | 3 +- .../tests/common/api_v3/oauth_clients.rs | 6 +- apps/labrinth/tests/common/api_v3/project.rs | 31 +-- apps/labrinth/tests/common/api_v3/tags.rs | 2 +- apps/labrinth/tests/common/api_v3/user.rs | 6 +- apps/labrinth/tests/common/api_v3/version.rs | 20 +- apps/labrinth/tests/common/database.rs | 2 +- apps/labrinth/tests/common/permissions.rs | 33 +-- apps/labrinth/tests/loader_fields.rs | 4 +- apps/labrinth/tests/oauth.rs | 2 +- apps/labrinth/tests/pats.rs | 18 +- apps/labrinth/tests/search.rs | 2 +- apps/labrinth/tests/v2/search.rs | 2 +- ...ed46853d4e8b369d5f97303241993d9d3a8e3.json | 12 - ...8f4ec2e248f751f98140f77bea4f9d5971ef1.json | 12 + ...b787af281db4402c8ff45fe6a77b5be6c929.json} | 84 ++++--- ...28a597e90c2bf7ce5dc1b39edb6977e2f6da6.json | 20 ++ ...4938c41283e6091a1301fc3ca0b355ffcfa9.json} | 84 ++++--- ...dd18a4900021ee6ccfc165c9a6dad41046cba.json | 12 + ...f07f736c5772045b973dcc10573b399111344.json | 32 +++ packages/app-lib/Cargo.toml | 2 + ...0428171350_add-profile-feature-version.sql | 1 + ...20250429150111_add-attached-world-data.sql | 10 + packages/app-lib/src/api/logs.rs | 4 +- packages/app-lib/src/api/metadata.rs | 2 +- .../app-lib/src/api/pack/import/atlauncher.rs | 5 +- .../app-lib/src/api/pack/install_mrpack.rs | 5 +- packages/app-lib/src/api/profile/create.rs | 3 +- packages/app-lib/src/api/profile/mod.rs | 12 +- packages/app-lib/src/api/profile/update.rs | 4 +- packages/app-lib/src/api/worlds.rs | 185 ++++++++++++-- packages/app-lib/src/launcher/args.rs | 6 +- packages/app-lib/src/launcher/mod.rs | 18 +- .../app-lib/src/state/attached_world_data.rs | 99 ++++++++ packages/app-lib/src/state/cache.rs | 8 +- packages/app-lib/src/state/discord.rs | 15 +- packages/app-lib/src/state/fs_watcher.rs | 41 ++- .../app-lib/src/state/legacy_converter.rs | 7 +- packages/app-lib/src/state/minecraft_auth.rs | 2 +- packages/app-lib/src/state/mod.rs | 1 + packages/app-lib/src/state/process.rs | 11 +- packages/app-lib/src/state/profiles.rs | 236 +++++++++++++++++- packages/app-lib/src/state/server_join_log.rs | 1 + packages/app-lib/src/state/settings.rs | 2 + packages/app-lib/src/util/io.rs | 13 + packages/ui/src/components/base/FilterBar.vue | 3 +- .../components/content/ContentListPanel.vue | 2 +- .../src/components/settings/ThemeSelector.vue | 34 +-- packages/utils/types.ts | 42 ++++ 123 files changed, 1622 insertions(+), 744 deletions(-) create mode 100644 apps/app-frontend/src/components/ui/world/modal/HideFromHomeOption.vue delete mode 100644 apps/app-frontend/src/helpers/settings.js create mode 100644 apps/app-frontend/src/helpers/settings.ts delete mode 100644 apps/app-frontend/src/store/theme.js create mode 100644 apps/app-frontend/src/store/theme.ts delete mode 100644 packages/app-lib/.sqlx/query-06368b9c4d9d386e9ba03ca91bced46853d4e8b369d5f97303241993d9d3a8e3.json create mode 100644 packages/app-lib/.sqlx/query-27283e20fc86c941c7d6d09259d8f4ec2e248f751f98140f77bea4f9d5971ef1.json rename packages/app-lib/.sqlx/{query-1b9181a1f130a097ef016aec5d14e69cc86189d182f04ae50ef8f894053d93cb.json => query-6a434cc55635b6e325e9e5f06d21b787af281db4402c8ff45fe6a77b5be6c929.json} (75%) create mode 100644 packages/app-lib/.sqlx/query-a2184fc5d62570aec0a15c0a8d628a597e90c2bf7ce5dc1b39edb6977e2f6da6.json rename packages/app-lib/.sqlx/{query-30f436efc20582d160f9485ebfff6d3ababcde700fa4cf8324d87fa2181fc47d.json => query-c108849d77c7627d6a11d5be34984938c41283e6091a1301fc3ca0b355ffcfa9.json} (76%) create mode 100644 packages/app-lib/.sqlx/query-df600f2615979ab61bfe235a04add18a4900021ee6ccfc165c9a6dad41046cba.json create mode 100644 packages/app-lib/.sqlx/query-fd834e256e142820f25305ccffaf07f736c5772045b973dcc10573b399111344.json create mode 100644 packages/app-lib/migrations/20250428171350_add-profile-feature-version.sql create mode 100644 packages/app-lib/migrations/20250429150111_add-attached-world-data.sql create mode 100644 packages/app-lib/src/state/attached_world_data.rs diff --git a/Cargo.lock b/Cargo.lock index 230ae51d0..ee33ab45c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2604,6 +2604,28 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "enumset" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07a4b049558765cef5f0c1a273c3fc57084d768b44d2f98127aef4cceb17293" +dependencies = [ + "enumset_derive", + "serde", +] + +[[package]] +name = "enumset_derive" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59c3b24c345d8c314966bdc1832f6c2635bfcce8e7cf363bd115987bba2ee242" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "env_filter" version = "0.1.3" @@ -9239,6 +9261,7 @@ name = "theseus" version = "0.9.4" dependencies = [ "ariadne", + "async-compression", "async-recursion", "async-tungstenite", "async-walkdir", @@ -9253,6 +9276,7 @@ dependencies = [ "discord-rich-presence", "dunce", "either", + "enumset", "flate2", "fs4", "futures", @@ -9300,6 +9324,7 @@ dependencies = [ "daedalus", "dashmap 6.1.0", "either", + "enumset", "native-dialog", "objc", "opener", @@ -9333,6 +9358,7 @@ dependencies = [ name = "theseus_playground" version = "0.0.0" dependencies = [ + "enumset", "theseus", "tokio", "tracing", diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue index 85d252745..5ce8a76ea 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -24,7 +24,7 @@ import { useLoading, useTheming } from '@/store/state' import ModrinthAppLogo from '@/assets/modrinth_app.svg?component' import AccountsCard from '@/components/ui/AccountsCard.vue' import InstanceCreationModal from '@/components/ui/InstanceCreationModal.vue' -import { get } from '@/helpers/settings' +import { get } from '@/helpers/settings.ts' import Breadcrumbs from '@/components/ui/Breadcrumbs.vue' import RunningAppBar from '@/components/ui/RunningAppBar.vue' import SplashScreen from '@/components/ui/SplashScreen.vue' diff --git a/apps/app-frontend/src/assets/stylesheets/global.scss b/apps/app-frontend/src/assets/stylesheets/global.scss index bd6e46425..7ab08fd57 100644 --- a/apps/app-frontend/src/assets/stylesheets/global.scss +++ b/apps/app-frontend/src/assets/stylesheets/global.scss @@ -7,7 +7,7 @@ font-style: normal; font-display: swap; font-weight: 400; - src: url('https://cdn.modrinth.com/fonts/minecraft/regular.otf') format('opentype'); + src: url('https://cdn-raw.modrinth.com/fonts/minecraft/regular.otf') format('opentype'); } @font-face { @@ -15,7 +15,7 @@ font-style: italic; font-display: swap; font-weight: 400; - src: url('https://cdn.modrinth.com/fonts/minecraft/italic.otf') format('opentype'); + src: url('https://cdn-raw.modrinth.com/fonts/minecraft/italic.otf') format('opentype'); } @font-face { @@ -23,7 +23,7 @@ font-style: normal; font-display: swap; font-weight: 600; - src: url('https://cdn.modrinth.com/fonts/minecraft/bold.otf') format('opentype'); + src: url('https://cdn-raw.modrinth.com/fonts/minecraft/bold.otf') format('opentype'); } @font-face { @@ -31,7 +31,7 @@ font-style: italic; font-display: swap; font-weight: 600; - src: url('https://cdn.modrinth.com/fonts/minecraft/bold-italic.otf') format('opentype'); + src: url('https://cdn-raw.modrinth.com/fonts/minecraft/bold-italic.otf') format('opentype'); } .font-minecraft { diff --git a/apps/app-frontend/src/components/ui/ErrorModal.vue b/apps/app-frontend/src/components/ui/ErrorModal.vue index c3beffa9f..3daac536e 100644 --- a/apps/app-frontend/src/components/ui/ErrorModal.vue +++ b/apps/app-frontend/src/components/ui/ErrorModal.vue @@ -14,7 +14,7 @@ import { ref, computed } from 'vue' import { login as login_flow, set_default_user } from '@/helpers/auth.js' import { handleError } from '@/store/notifications.js' import { handleSevereError } from '@/store/error.js' -import { cancel_directory_change } from '@/helpers/settings.js' +import { cancel_directory_change } from '@/helpers/settings.ts' import { install } from '@/helpers/profile.js' import { trackEvent } from '@/helpers/analytics' import ModalWrapper from '@/components/ui/modal/ModalWrapper.vue' diff --git a/apps/app-frontend/src/components/ui/InstanceCreationModal.vue b/apps/app-frontend/src/components/ui/InstanceCreationModal.vue index 9d0c9b753..c09255a7c 100644 --- a/apps/app-frontend/src/components/ui/InstanceCreationModal.vue +++ b/apps/app-frontend/src/components/ui/InstanceCreationModal.vue @@ -1,5 +1,5 @@