mirror of
https://github.com/modrinth/code.git
synced 2026-08-28 10:34:53 +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>
|
||||||
<IconButton
|
<IconButton
|
||||||
type="quiet"
|
type="quiet"
|
||||||
color="red"
|
|
||||||
label="Close window"
|
label="Close window"
|
||||||
class="relative expanded-button close-button hover:!bg-red focus-visible:!bg-red"
|
class="relative expanded-button close-button"
|
||||||
@click="handleClose"
|
@click="handleClose"
|
||||||
>
|
>
|
||||||
<XIcon />
|
<XIcon />
|
||||||
|
|||||||
+3
-9
@@ -20,18 +20,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col gap-6 px-6 pb-6">
|
<div class="flex flex-col gap-6 px-6 pb-6">
|
||||||
<div class="flex justify-end gap-2">
|
<div class="grid grid-cols-2 gap-2">
|
||||||
<ButtonLink class="w-full" href="https://support.modrinth.com" @click="modal?.hide()">
|
<ButtonLink href="https://support.modrinth.com" @click="modal?.hide()">
|
||||||
<MessagesSquareIcon />
|
<MessagesSquareIcon />
|
||||||
{{ formatMessage(messages.getSupport) }}
|
{{ formatMessage(messages.getSupport) }}
|
||||||
</ButtonLink>
|
</ButtonLink>
|
||||||
<Button
|
<Button type="colored" color="brand" :disabled="loadingSignIn" @click="signIn">
|
||||||
type="colored"
|
|
||||||
color="brand"
|
|
||||||
class="w-full"
|
|
||||||
:disabled="loadingSignIn"
|
|
||||||
@click="signIn"
|
|
||||||
>
|
|
||||||
<SpinnerIcon v-if="loadingSignIn" class="animate-spin" />
|
<SpinnerIcon v-if="loadingSignIn" class="animate-spin" />
|
||||||
<svg
|
<svg
|
||||||
v-else
|
v-else
|
||||||
|
|||||||
@@ -1385,14 +1385,14 @@ provideContentManager({
|
|||||||
project: linkedModpackProject.value,
|
project: linkedModpackProject.value,
|
||||||
projectLink: {
|
projectLink: {
|
||||||
path: `/project/${linkedModpackProject.value.slug ?? linkedModpackProject.value.id}`,
|
path: `/project/${linkedModpackProject.value.slug ?? linkedModpackProject.value.id}`,
|
||||||
query: { i: instance.value.id },
|
query: { i: instancePage.instanceId.value },
|
||||||
},
|
},
|
||||||
version: linkedModpackVersion.value ?? undefined,
|
version: linkedModpackVersion.value ?? undefined,
|
||||||
versionLink:
|
versionLink:
|
||||||
linkedModpackProject.value && linkedModpackVersion.value
|
linkedModpackProject.value && linkedModpackVersion.value
|
||||||
? {
|
? {
|
||||||
path: `/project/${linkedModpackProject.value.slug ?? linkedModpackProject.value.id}/version/${linkedModpackVersion.value.id}`,
|
path: `/project/${linkedModpackProject.value.slug ?? linkedModpackProject.value.id}/version/${linkedModpackVersion.value.id}`,
|
||||||
query: { i: instance.value.id },
|
query: { i: instancePage.instanceId.value },
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
owner: linkedModpackOwner.value
|
owner: linkedModpackOwner.value
|
||||||
@@ -1479,7 +1479,7 @@ provideContentManager({
|
|||||||
icon_url: null,
|
icon_url: null,
|
||||||
},
|
},
|
||||||
projectLink: item.project?.id
|
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,
|
: undefined,
|
||||||
version: item.version ?? {
|
version: item.version ?? {
|
||||||
id: item.file_name,
|
id: item.file_name,
|
||||||
@@ -1490,7 +1490,7 @@ provideContentManager({
|
|||||||
item.project?.id && item.version?.id
|
item.project?.id && item.version?.id
|
||||||
? {
|
? {
|
||||||
path: `/project/${item.project.id}/version/${item.version.id}`,
|
path: `/project/${item.project.id}/version/${item.version.id}`,
|
||||||
query: { i: instance.value.id },
|
query: { i: instancePage.instanceId.value },
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
owner: item.owner
|
owner: item.owner
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ const showInstancePlayTime = computed(() => themeStore.getFeatureFlag('show_inst
|
|||||||
|
|
||||||
const online = useOnline()
|
const online = useOnline()
|
||||||
const offline = computed(() => !online.value)
|
const offline = computed(() => !online.value)
|
||||||
const instanceId = computed(() => String(route.params.id ?? ''))
|
const instanceId = ref(String(route.params.id ?? ''))
|
||||||
const instanceQuery = useQuery(
|
const instanceQuery = useQuery(
|
||||||
computed(() => ({
|
computed(() => ({
|
||||||
...instanceDetailQueryOptions(instanceId.value),
|
...instanceDetailQueryOptions(instanceId.value),
|
||||||
@@ -259,6 +259,7 @@ onBeforeRouteUpdate(async (to, from) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await ensureCriticalInstanceData(targetInstanceId)
|
await ensureCriticalInstanceData(targetInstanceId)
|
||||||
|
instanceId.value = targetInstanceId
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (isUnmanagedInstanceError(error)) return { path: '/' }
|
if (isUnmanagedInstanceError(error)) return { path: '/' }
|
||||||
handleError(error)
|
handleError(error)
|
||||||
|
|||||||
@@ -14,8 +14,13 @@
|
|||||||
:members="members"
|
:members="members"
|
||||||
:dependency-link-creator="createDependencyLink"
|
:dependency-link-creator="createDependencyLink"
|
||||||
>
|
>
|
||||||
<template #headerActions>
|
<template #headerActions="{ primaryFile }">
|
||||||
<Button
|
<Button
|
||||||
|
v-tooltip="
|
||||||
|
primaryFile?.url
|
||||||
|
? primaryFile.filename + ' (' + formatBytes(primaryFile.size) + ')'
|
||||||
|
: undefined
|
||||||
|
"
|
||||||
type="colored"
|
type="colored"
|
||||||
color="brand"
|
color="brand"
|
||||||
:disabled="installing || (installed && installedVersion === version.id)"
|
:disabled="installing || (installed && installedVersion === version.id)"
|
||||||
@@ -92,6 +97,7 @@ import {
|
|||||||
commonMessages,
|
commonMessages,
|
||||||
defineMessages,
|
defineMessages,
|
||||||
type DependencyContext,
|
type DependencyContext,
|
||||||
|
useFormatBytes,
|
||||||
useVIntl,
|
useVIntl,
|
||||||
VersionPage,
|
VersionPage,
|
||||||
} from '@modrinth/ui'
|
} from '@modrinth/ui'
|
||||||
@@ -103,6 +109,7 @@ import { get_project_many, get_version_many } from '@/helpers/cache.js'
|
|||||||
import { useBreadcrumb } from '@/providers/breadcrumbs'
|
import { useBreadcrumb } from '@/providers/breadcrumbs'
|
||||||
|
|
||||||
const { formatMessage } = useVIntl()
|
const { formatMessage } = useVIntl()
|
||||||
|
const formatBytes = useFormatBytes()
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
allVersions: {
|
allVersions: {
|
||||||
|
|||||||
Reference in New Issue
Block a user