mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 00:55:25 +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:
@@ -23,9 +23,8 @@
|
||||
</IconButton>
|
||||
<IconButton
|
||||
type="quiet"
|
||||
color="red"
|
||||
label="Close window"
|
||||
class="relative expanded-button close-button hover:!bg-red focus-visible:!bg-red"
|
||||
class="relative expanded-button close-button"
|
||||
@click="handleClose"
|
||||
>
|
||||
<XIcon />
|
||||
|
||||
+3
-9
@@ -20,18 +20,12 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-6 px-6 pb-6">
|
||||
<div class="flex justify-end gap-2">
|
||||
<ButtonLink class="w-full" href="https://support.modrinth.com" @click="modal?.hide()">
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<ButtonLink href="https://support.modrinth.com" @click="modal?.hide()">
|
||||
<MessagesSquareIcon />
|
||||
{{ formatMessage(messages.getSupport) }}
|
||||
</ButtonLink>
|
||||
<Button
|
||||
type="colored"
|
||||
color="brand"
|
||||
class="w-full"
|
||||
:disabled="loadingSignIn"
|
||||
@click="signIn"
|
||||
>
|
||||
<Button type="colored" color="brand" :disabled="loadingSignIn" @click="signIn">
|
||||
<SpinnerIcon v-if="loadingSignIn" class="animate-spin" />
|
||||
<svg
|
||||
v-else
|
||||
|
||||
@@ -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