mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 12:05:53 +00:00
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:
@@ -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[]>
|
||||
|
||||
Reference in New Issue
Block a user