mirror of
https://github.com/modrinth/code.git
synced 2026-08-27 01:54:47 +00:00
fix: buttons qa (#7067)
* fix: broken minecraft required modal button * fix: app close icon issue * fix: versions tooltip missing * fix: instance not found bug on btn press
This commit is contained in:
@@ -1385,14 +1385,14 @@ provideContentManager({
|
||||
project: linkedModpackProject.value,
|
||||
projectLink: {
|
||||
path: `/project/${linkedModpackProject.value.slug ?? linkedModpackProject.value.id}`,
|
||||
query: { i: instance.value.id },
|
||||
query: { i: instancePage.instanceId.value },
|
||||
},
|
||||
version: linkedModpackVersion.value ?? undefined,
|
||||
versionLink:
|
||||
linkedModpackProject.value && linkedModpackVersion.value
|
||||
? {
|
||||
path: `/project/${linkedModpackProject.value.slug ?? linkedModpackProject.value.id}/version/${linkedModpackVersion.value.id}`,
|
||||
query: { i: instance.value.id },
|
||||
query: { i: instancePage.instanceId.value },
|
||||
}
|
||||
: undefined,
|
||||
owner: linkedModpackOwner.value
|
||||
@@ -1479,7 +1479,7 @@ provideContentManager({
|
||||
icon_url: null,
|
||||
},
|
||||
projectLink: item.project?.id
|
||||
? { path: `/project/${item.project.id}`, query: { i: instance.value.id } }
|
||||
? { path: `/project/${item.project.id}`, query: { i: instancePage.instanceId.value } }
|
||||
: undefined,
|
||||
version: item.version ?? {
|
||||
id: item.file_name,
|
||||
@@ -1490,7 +1490,7 @@ provideContentManager({
|
||||
item.project?.id && item.version?.id
|
||||
? {
|
||||
path: `/project/${item.project.id}/version/${item.version.id}`,
|
||||
query: { i: instance.value.id },
|
||||
query: { i: instancePage.instanceId.value },
|
||||
}
|
||||
: undefined,
|
||||
owner: item.owner
|
||||
|
||||
@@ -180,7 +180,7 @@ const showInstancePlayTime = computed(() => themeStore.getFeatureFlag('show_inst
|
||||
|
||||
const online = useOnline()
|
||||
const offline = computed(() => !online.value)
|
||||
const instanceId = computed(() => String(route.params.id ?? ''))
|
||||
const instanceId = ref(String(route.params.id ?? ''))
|
||||
const instanceQuery = useQuery(
|
||||
computed(() => ({
|
||||
...instanceDetailQueryOptions(instanceId.value),
|
||||
@@ -259,6 +259,7 @@ onBeforeRouteUpdate(async (to, from) => {
|
||||
|
||||
try {
|
||||
await ensureCriticalInstanceData(targetInstanceId)
|
||||
instanceId.value = targetInstanceId
|
||||
} catch (error) {
|
||||
if (isUnmanagedInstanceError(error)) return { path: '/' }
|
||||
handleError(error)
|
||||
|
||||
@@ -14,8 +14,13 @@
|
||||
:members="members"
|
||||
:dependency-link-creator="createDependencyLink"
|
||||
>
|
||||
<template #headerActions>
|
||||
<template #headerActions="{ primaryFile }">
|
||||
<Button
|
||||
v-tooltip="
|
||||
primaryFile?.url
|
||||
? primaryFile.filename + ' (' + formatBytes(primaryFile.size) + ')'
|
||||
: undefined
|
||||
"
|
||||
type="colored"
|
||||
color="brand"
|
||||
:disabled="installing || (installed && installedVersion === version.id)"
|
||||
@@ -92,6 +97,7 @@ import {
|
||||
commonMessages,
|
||||
defineMessages,
|
||||
type DependencyContext,
|
||||
useFormatBytes,
|
||||
useVIntl,
|
||||
VersionPage,
|
||||
} from '@modrinth/ui'
|
||||
@@ -103,6 +109,7 @@ import { get_project_many, get_version_many } from '@/helpers/cache.js'
|
||||
import { useBreadcrumb } from '@/providers/breadcrumbs'
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
const formatBytes = useFormatBytes()
|
||||
|
||||
const messages = defineMessages({
|
||||
allVersions: {
|
||||
|
||||
Reference in New Issue
Block a user