feat: sync individual content installation states on panel (#6909)

* feat: sync individual content installation states on panel

* feat: improve handling

* fix: lint

* fix: ws connection duplication + disconnecting during browse

* fix: sse feats

* fix: qa

* fix: qa

* fix: prepr

* fix: bug

* fix: lint
This commit is contained in:
Calum H.
2026-08-14 16:38:36 +00:00
committed by GitHub
parent 99683f570a
commit 9628b4c269
54 changed files with 2006 additions and 2429 deletions
+9 -3
View File
@@ -2,6 +2,10 @@ import type { Archon, UploadState } from '@modrinth/api-client'
import type { ComputedRef, Ref } from 'vue'
import type { MessageDescriptor } from '#ui/composables/i18n'
import type {
ServerInstallationKey,
ServerInstallationState,
} from '#ui/composables/server-installation-tracker'
import type { FileOperation } from '#ui/layouts/shared/files-tab/types'
import { createContext } from '.'
@@ -49,9 +53,11 @@ export interface ModrinthServerContext {
readonly isServerRunning: ComputedRef<boolean>
readonly stats: Ref<ServerStats>
readonly uptimeSeconds: Ref<number>
// Content sync state
readonly isSyncingContent: Ref<boolean>
readonly installProgressItems: Ref<Archon.Websocket.v0.InstallProgressItem[]>
readonly installation: ComputedRef<ServerInstallationState | null>
beginInstallation: (key: ServerInstallationKey) => void
cancelOptimisticInstallation: () => void
dismissInstallation: (id: string) => void
// Busy state — when non-empty, all write operations should be disabled
readonly busyReasons: ComputedRef<BusyReason[]>