You've already forked AstralRinth
forked from didirus/AstralRinth
fix: undefined functions/properties across frontend (#4210)
* fix: notification mark as read * revert: composition API change * fix: categories * feat: enable vue/no-undef-properties in 'warn' mode. * fix: app undefined properties * revert: ss block * fix: eslint-disable for [version].vue
This commit is contained in:
@@ -173,7 +173,7 @@
|
||||
<span class="version-info">
|
||||
for
|
||||
<Categories
|
||||
:categories="notif.extra_data.version.loaders"
|
||||
:categories="loaderCategories"
|
||||
:type="notif.extra_data.project.project_type"
|
||||
class="categories"
|
||||
/>
|
||||
@@ -340,8 +340,11 @@ import {
|
||||
ProjectStatusBadge,
|
||||
useRelativeTime,
|
||||
} from '@modrinth/ui'
|
||||
import { getUserLink, renderString } from '@modrinth/utils'
|
||||
|
||||
import { markAsRead } from '~/helpers/platform-notifications'
|
||||
import { getProjectLink, getVersionLink } from '~/helpers/projects'
|
||||
import { acceptTeamInvite, removeSelfFromTeam } from '~/helpers/teams'
|
||||
|
||||
import ThreadSummary from './thread/ThreadSummary.vue'
|
||||
|
||||
@@ -388,6 +391,12 @@ const user = computed(() => props.notification.extra_data.user)
|
||||
const organization = computed(() => props.notification.extra_data.organization)
|
||||
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(() => {
|
||||
if (report.value) {
|
||||
return `/dashboard/report/${report.value.id}`
|
||||
|
||||
@@ -113,6 +113,7 @@ import { BoxIcon, SettingsIcon, TransferIcon, XIcon } from '@modrinth/assets'
|
||||
import { Avatar, Button, Checkbox, CopyCode, Modal } from '@modrinth/ui'
|
||||
import { formatProjectType } from '@modrinth/utils'
|
||||
|
||||
const EDIT_DETAILS = 1 << 2
|
||||
const modalOpen = ref(null)
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@@ -312,7 +312,14 @@ import { computed } from 'vue'
|
||||
|
||||
import { UiChartsChart as Chart, UiChartsCompactChart as CompactChart } from '#components'
|
||||
import PaletteIcon from '~/assets/icons/palette.svg?component'
|
||||
import { analyticsSetToCSVString, intToRgba } from '~/utils/analytics.js'
|
||||
import {
|
||||
analyticsSetToCSVString,
|
||||
countryCodeToFlag,
|
||||
countryCodeToName,
|
||||
formatPercent,
|
||||
getDefaultColor,
|
||||
intToRgba,
|
||||
} from '~/utils/analytics.js'
|
||||
|
||||
const router = useNativeRouter()
|
||||
const theme = useTheme()
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { EditIcon, SettingsIcon, TrashIcon } from '@modrinth/assets'
|
||||
import { SettingsIcon } from '@modrinth/assets'
|
||||
import {
|
||||
ButtonStyled,
|
||||
commonMessages,
|
||||
CopyCode,
|
||||
getDismissableMetadata,
|
||||
NOTICE_LEVELS,
|
||||
@@ -73,7 +71,7 @@ defineProps<{
|
||||
</TagItem>
|
||||
</div>
|
||||
<div class="col-span-2 flex gap-2 md:col-span-1">
|
||||
<ButtonStyled>
|
||||
<!-- <ButtonStyled>
|
||||
<button @click="() => startEditing(notice)">
|
||||
<EditIcon /> {{ formatMessage(commonMessages.editButton) }}
|
||||
</button>
|
||||
@@ -82,7 +80,7 @@ defineProps<{
|
||||
<button @click="() => deleteNotice(notice)">
|
||||
<TrashIcon /> {{ formatMessage(commonMessages.deleteLabel) }}
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
</ButtonStyled> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-full grid">
|
||||
|
||||
Reference in New Issue
Block a user