fix(app): properly show all versions and notify loaders (#4395)

* fix(app): properly show all versions and notify loaders

* fix lint
This commit is contained in:
teaSummer
2025-09-20 20:07:30 +08:00
committed by GitHub
parent ff50964f25
commit 0b8762cd0a
2 changed files with 13 additions and 7 deletions

View File

@@ -173,7 +173,7 @@
<span class="version-info"> <span class="version-info">
for for
<Categories <Categories
:categories="loaderCategories" :categories="getLoaderCategories(notif.extra_data.version)"
:type="notif.extra_data.project.project_type" :type="notif.extra_data.project.project_type"
class="categories" class="categories"
/> />
@@ -391,12 +391,6 @@ const user = computed(() => props.notification.extra_data.user)
const organization = computed(() => props.notification.extra_data.organization) const organization = computed(() => props.notification.extra_data.organization)
const invitedBy = computed(() => props.notification.extra_data.invited_by) const invitedBy = computed(() => props.notification.extra_data.invited_by)
const loaderCategories = computed(() => {
return tags.value.loaders.filter((loader) => {
return version.value?.loaders?.includes(loader.name)
})
})
const threadLink = computed(() => { const threadLink = computed(() => {
if (report.value) { if (report.value) {
return `/dashboard/report/${report.value.id}` return `/dashboard/report/${report.value.id}`
@@ -462,6 +456,12 @@ function getMessages() {
} }
return messages return messages
} }
function getLoaderCategories(ver) {
return tags.value.loaders.filter((loader) => {
return ver?.loaders?.includes(loader.name)
})
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -1664,6 +1664,12 @@ if (!route.name.startsWith('type-id-settings')) {
const onUserCollectProject = useClientTry(userCollectProject) const onUserCollectProject = useClientTry(userCollectProject)
const { version, loader } = route.query const { version, loader } = route.query
if (
project.value.game_versions.length > 0 &&
project.value.game_versions.every((v) => v.includes('w') || v.includes('-'))
) {
showAllVersions.value = true
}
if (version !== undefined && project.value.game_versions.includes(version)) { if (version !== undefined && project.value.game_versions.includes(version)) {
userSelectedGameVersion.value = version userSelectedGameVersion.value = version
} }