Open
Conversation
Contributor
Frontend previewsLast deployed commit is 05fbd5e12eb896603d10081187f79f411f487719
|
54f0a60 to
e70cd2c
Compare
…d client-only indicators
Upload cancellation and navigation guard:
- Add ConfirmLeaveModal that prompts when navigating away during upload
- Cancel in-flight XHR uploads when user confirms leaving the page
- Add beforeunload handler to warn on browser/tab close during upload
- Track uploadedBytes/totalBytes in UploadState for progress display
- Replace Collapsible with Transition for upload progress admonition
- Show byte progress and percentage in upload banner
- Clamp upload progress to prevent exceeding 100%
Installation settings (server.properties):
- Add KnownPropertiesFields and PropertiesFields types to Archon types
- Add buildProperties() to creation flow context to collect gamemode,
difficulty, seed, world type, structures, and generator settings
- Pass properties through installContent on onboarding, discovery, and
ServerSetupModal flows
Server setup and discovery flow improvements:
- Migrate ServerSetupModal from servers_v0.reinstall to content_v1.installContent
- Replace loaderApiNames lookup with toApiLoader() helper
- Remove eraseDataOnInstall toggle — always use soft_override: false
- Simplify modpack install on discovery page to use first available version
and route through creation flow modal for both onboarding and non-onboarding
- Differentiate post-install navigation: content page for onboarding,
loader options for existing servers
Modpack update flow:
- Replace updateModpack() call with installContent() using soft_override: true
to support version selection in the content updater modal
Client-only mod indicators:
- Add environment field to AddonVersion (reuses Labrinth.Projects.v3.Environment)
- Add environment to ContentItem and isClientOnly to ContentCardTableItem
- Show orange TriangleAlertIcon with tooltip on client-only mods in content table
- Add "Client-only" filter pill to content filtering (controlled via
showClientOnlyFilter on ContentManagerContext)
- Apply client-only indicators in both ContentPageLayout and ModpackContentModal
Misc:
- Add CLAUDE.md note about using prepr commands for lint checks
- Export ConfirmLeaveModal from instances barrel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ContentPageLayoutcomponent used by both the app frontend (Mods.vue) and hosting frontend (content.vue), eliminating duplicated UI codeContentManagerContextdependency injection provider that decouples platform-specific API logic from the shared layoutContentVersionEditModal)Content page layout (
ContentPageLayout.vue)Previously, the app's
Mods.vueand hosting'scontent.vueeach maintained their own implementations of the content management UI (search, filters, sorting, bulk actions, modpack card, empty states, confirmation modals, etc.). This PR extracts all of that into a singleContentPageLayoutcomponent in@modrinth/ui.The layout consumes its data and actions entirely through dependency injection rather than props, so platform-specific pages only need to provide their handlers via
provideContentManager()and then render<ContentPageLayout />.Shared composables were also extracted into
packages/ui/src/composables/content/:useContentSearch- fuzzy search via Fuse.jsuseContentFilters- dynamic filter pills (by type, updates, disabled)useContentSelection- multi-select stateuseBulkOperation- progress tracking with navigation guardsuseChangingItems- per-item loading statesDependency injection (
ContentManagerContext)A new DI provider at
packages/ui/src/providers/content-manager.tsdefines the contract betweenContentPageLayoutand its platform-specific implementations. The context includes:items,loading,error,refresh,toggleEnabled,deleteItem,browse,uploadFiles,mapToTableItembulkDeleteItems,bulkEnableItems,bulkDisableItems(hosting v1 only),updateItem,bulkUpdateItem,hasUpdateSupport(app only),shareItems,getOverflowOptions,uploadState, modpack actionsThis means the app's
Mods.vueprovides Tauri-backed handlers with update/share/export support, while hosting'scontent.vueprovides API-backed handlers with optional bulk operations — all feeding into the same layout.v0 → v1 content API migration
content.vueuses v1 endpoints (getAddons,addAddon,deleteAddon,enableAddon,disableAddon, bulk variants,unlinkModpack,updateAddon,updateModpack) withworldIdsupportdiscover/[type]/index.vue) migrated fromcontent_v0.list()/content_v0.install()tocontent_v1.getAddons()/content_v1.addAddon(), withworldIdpassed as a query param (wid) for SSR compatibilityArchonContentV0Module,Archon.Content.v0types, and the unusedContentVersionEditModal.vue(version editing is handled byInstallationSettingsLayout)Other changes
CreationFlowModalfor server onboarding with loader/modpack selectionInstallationSettingsLayoutextracted as a shared component for loader/startup configurationonboarding.vue) added with setup wizard flow