Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/app-frontend/src/components/ui/WindowControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions apps/app-frontend/src/pages/instance/content/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion apps/app-frontend/src/pages/instance/layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -242,6 +242,7 @@ onBeforeRouteUpdate(async (to, from) => {

try {
await ensureCriticalInstanceData(targetInstanceId)
instanceId.value = targetInstanceId
} catch (error) {
if (isUnmanagedInstanceError(error)) return { path: '/' }
handleError(error)
Expand Down
9 changes: 8 additions & 1 deletion apps/app-frontend/src/pages/project/Version.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -92,6 +97,7 @@ import {
commonMessages,
defineMessages,
type DependencyContext,
useFormatBytes,
useVIntl,
VersionPage,
} from '@modrinth/ui'
Expand All @@ -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: {
Expand Down
Loading