This commit is contained in:
Calum H.
2026-03-12 23:09:26 +00:00
committed by GitHub
parent ba06c89a0e
commit 32d76b8025
8 changed files with 39 additions and 14 deletions

View File

@@ -379,7 +379,6 @@ watch(effectiveRequestParams, () => {
}, 200)
})
async function refreshSearch() {
const version = ++searchVersion
debugLog('refreshSearch start', { version, projectType: projectType.value })

View File

@@ -76,10 +76,10 @@ import {
useVIntl,
} from '@modrinth/ui'
import { ContentCardLayout as ContentPageLayout } from '@modrinth/ui'
import { useDebounceFn } from '@vueuse/core'
import { getCurrentWebview } from '@tauri-apps/api/webview'
import { open } from '@tauri-apps/plugin-dialog'
import { openUrl } from '@tauri-apps/plugin-opener'
import { useDebounceFn } from '@vueuse/core'
import { computed, nextTick, onUnmounted, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
@@ -699,8 +699,10 @@ provideContentManager({
getItemId: (item) => item.file_name,
contentTypeLabel: ref(formatMessage(messages.contentTypeProject)),
toggleEnabled: toggleDisableMod,
bulkEnableItems: (items) => Promise.all(items.map((item) => toggleDisableMod(item))).then(() => {}),
bulkDisableItems: (items) => Promise.all(items.map((item) => toggleDisableMod(item))).then(() => {}),
bulkEnableItems: (items) =>
Promise.all(items.map((item) => toggleDisableMod(item))).then(() => {}),
bulkDisableItems: (items) =>
Promise.all(items.map((item) => toggleDisableMod(item))).then(() => {}),
deleteItem: removeMod,
bulkDeleteItems: (items) => Promise.all(items.map((item) => removeMod(item))).then(() => {}),
refresh: () => initProjects('must_revalidate'),
@@ -725,17 +727,16 @@ provideContentManager({
title: item.file_name.replace('.disabled', ''),
icon_url: null,
},
projectLink: item.project?.id
? `/project/${item.project.id}`
: undefined,
projectLink: item.project?.id ? `/project/${item.project.id}` : undefined,
version: item.version ?? {
id: item.file_name,
version_number: formatMessage(messages.unknownVersion),
file_name: item.file_name,
},
versionLink: item.project?.id && item.version?.id
? `/project/${item.project.id}/version/${item.version.id}`
: undefined,
versionLink:
item.project?.id && item.version?.id
? `/project/${item.project.id}/version/${item.version.id}`
: undefined,
owner: item.owner
? {
...item.owner,

View File

@@ -465,7 +465,10 @@ export function createContentInstall(opts: {
await installVersionDependencies(
instance,
version,
(depProject: Labrinth.Projects.v2.Project, depVersion?: Labrinth.Versions.v2.Version) => {
(
depProject: Labrinth.Projects.v2.Project,
depVersion?: Labrinth.Versions.v2.Version,
) => {
addInstallingItem(instancePath, depProject, depVersion)
installedProjectIds.push(depProject.id)
},

View File

@@ -98,7 +98,10 @@ const fileNameRef = ref<HTMLElement | null>(null)
/>
<div class="flex min-w-0 items-center gap-3">
<div v-tooltip="installing ? formatMessage(commonMessages.installingLabel) : undefined" class="relative shrink-0">
<div
v-tooltip="installing ? formatMessage(commonMessages.installingLabel) : undefined"
class="relative shrink-0"
>
<Avatar
:src="project.icon_url"
:alt="project.title"

View File

@@ -284,7 +284,9 @@ function handleSort(column: ContentCardTableSortColumn) {
'border-0 border-t border-solid border-surface-4',
visibleRange.start + idx === items.length - 1 && !flat ? 'rounded-b-[20px]' : '',
]"
@update:selected="(val) => toggleItemSelection(item.id, val ?? false, visibleRange.start + idx)"
@update:selected="
(val) => toggleItemSelection(item.id, val ?? false, visibleRange.start + idx)
"
@update:enabled="(val) => emit('update:enabled', item.id, val)"
@delete="emit('delete', item.id)"
@update="emit('update', item.id)"

View File

@@ -187,7 +187,9 @@ export function useInlineBackup(backupName: string | (() => string)) {
text: 'The backup has been cancelled. You can create a new one or proceed without a backup.',
})
} catch {
isBackingUp.value = false
isCancelling.value = false
backupFailed.value = true
}
}

View File

@@ -665,7 +665,7 @@ async function handleModpackUpdate() {
addNotification({
type: 'error',
title: formatMessage(messages.failedToLoadVersions),
text: err instanceof Error ? err.message : undefined,
text: err instanceof Error ? err.message : undefined,
})
} finally {
loadingVersions.value = false

View File

@@ -506,6 +506,18 @@
"header.category.resolutions": {
"defaultMessage": "Resolution"
},
"hosting.content.failed-to-bulk-delete": {
"defaultMessage": "Failed to delete content"
},
"hosting.content.failed-to-bulk-disable": {
"defaultMessage": "Failed to disable content"
},
"hosting.content.failed-to-bulk-enable": {
"defaultMessage": "Failed to enable content"
},
"hosting.content.failed-to-bulk-update": {
"defaultMessage": "Failed to update content"
},
"hosting.content.failed-to-load-modpack-content": {
"defaultMessage": "Failed to load modpack content"
},
@@ -893,6 +905,9 @@
"label.installed-modpack": {
"defaultMessage": "Installed modpack"
},
"label.installing": {
"defaultMessage": "Installing..."
},
"label.loading": {
"defaultMessage": "Loading..."
},