mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 03:55:59 +00:00
qa: shared instances post release (#6893)
* fix: 20 user cap * qa: invite modal dropdown + other + clamp limits * fix: hide filters if just one type * feat: update req banner * feat: invite management frontend * fix: moderation issues with shared instances * feat: instance icon improvements * fix: better offline handling * fix: lint * feat: show avatar in install to play modal * feat: smaller qa points * fix: fmt * fix: fmt * fix: yeet svg * fix: 50 user limit
This commit is contained in:
@@ -43,8 +43,9 @@ import type { GameInstance } from '@/helpers/types'
|
||||
type UpdateCompleteCallback = () => void | Promise<void>
|
||||
|
||||
const emit = defineEmits<{
|
||||
accepted: []
|
||||
cancel: []
|
||||
complete: []
|
||||
complete: [successful: boolean]
|
||||
report: [event?: MouseEvent]
|
||||
sharedInstanceUnavailable: [reason: SharedInstanceUnavailableReason | null]
|
||||
}>()
|
||||
@@ -72,11 +73,14 @@ const diffs = computed<ContentDiffItem[]>(
|
||||
)
|
||||
|
||||
async function update() {
|
||||
let successful = false
|
||||
emit('accepted')
|
||||
try {
|
||||
if (instance.value) {
|
||||
const job = await install_update_shared_instance(instance.value.id)
|
||||
await wait_for_install_job(job.job_id)
|
||||
await onComplete.value()
|
||||
successful = true
|
||||
}
|
||||
} catch (error) {
|
||||
if (isSharedInstanceUnavailableError(error)) {
|
||||
@@ -85,7 +89,7 @@ async function update() {
|
||||
}
|
||||
notifySharedInstanceError(error)
|
||||
} finally {
|
||||
emit('complete')
|
||||
emit('complete', successful)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user