Update Nuxt to v3.12.1 (#1720)
* Update Nuxt dependencies * Fix ref access in ChartDisplay * Fix feature flags cookie options type error * Specify type-only imports * Fix shorthands access to tags outside of reactive scope * Replace most useRoute calls with useRoute from vue-router Nuxt's version of this composable is horrendously broken (nuxt/nuxt#21340) * Import all svgs with ?component parameter Fixes weird hydration issues + gives correct type
This commit is contained in:
parent
c6d8476963
commit
34fd9d29c8
@ -35,19 +35,19 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ModrinthIcon from '~/assets/images/logo.svg'
|
||||
import ModeratorIcon from '~/assets/images/sidebar/admin.svg'
|
||||
import CreatorIcon from '~/assets/images/utils/box.svg'
|
||||
import ListIcon from '~/assets/images/utils/list.svg'
|
||||
import EyeOffIcon from '~/assets/images/utils/eye-off.svg'
|
||||
import DraftIcon from '~/assets/images/utils/file-text.svg'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg'
|
||||
import ArchiveIcon from '~/assets/images/utils/archive.svg'
|
||||
import ProcessingIcon from '~/assets/images/utils/updated.svg'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg'
|
||||
import LockIcon from '~/assets/images/utils/lock.svg'
|
||||
import CalendarIcon from '~/assets/images/utils/calendar.svg'
|
||||
import CloseIcon from '~/assets/images/utils/check-circle.svg'
|
||||
import ModrinthIcon from '~/assets/images/logo.svg?component'
|
||||
import ModeratorIcon from '~/assets/images/sidebar/admin.svg?component'
|
||||
import CreatorIcon from '~/assets/images/utils/box.svg?component'
|
||||
import ListIcon from '~/assets/images/utils/list.svg?component'
|
||||
import EyeOffIcon from '~/assets/images/utils/eye-off.svg?component'
|
||||
import DraftIcon from '~/assets/images/utils/file-text.svg?component'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
import ArchiveIcon from '~/assets/images/utils/archive.svg?component'
|
||||
import ProcessingIcon from '~/assets/images/utils/updated.svg?component'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg?component'
|
||||
import LockIcon from '~/assets/images/utils/lock.svg?component'
|
||||
import CalendarIcon from '~/assets/images/utils/calendar.svg?component'
|
||||
import CloseIcon from '~/assets/images/utils/check-circle.svg?component'
|
||||
|
||||
defineProps({
|
||||
type: {
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg'
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg?component'
|
||||
|
||||
defineProps({
|
||||
linkStack: {
|
||||
|
||||
@ -25,8 +25,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CheckIcon from '~/assets/images/utils/check.svg'
|
||||
import DropdownIcon from '~/assets/images/utils/dropdown.svg'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg?component'
|
||||
import DropdownIcon from '~/assets/images/utils/dropdown.svg?component'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CheckIcon from '~/assets/images/utils/check.svg'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg?component'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CheckIcon from '~/assets/images/utils/check.svg'
|
||||
import ClipboardCopyIcon from '~/assets/images/utils/clipboard-copy.svg'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg?component'
|
||||
import ClipboardCopyIcon from '~/assets/images/utils/clipboard-copy.svg?component'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@ -48,10 +48,10 @@
|
||||
</span>
|
||||
</template>
|
||||
<script setup>
|
||||
import InfoIcon from '~/assets/images/utils/info.svg'
|
||||
import ClientIcon from '~/assets/images/utils/client.svg'
|
||||
import GlobeIcon from '~/assets/images/utils/globe.svg'
|
||||
import ServerIcon from '~/assets/images/utils/server.svg'
|
||||
import InfoIcon from '~/assets/images/utils/info.svg?component'
|
||||
import ClientIcon from '~/assets/images/utils/client.svg?component'
|
||||
import GlobeIcon from '~/assets/images/utils/globe.svg?component'
|
||||
import ServerIcon from '~/assets/images/utils/server.svg?component'
|
||||
|
||||
defineProps({
|
||||
type: {
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CrossIcon from '~/assets/images/utils/x.svg'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
|
||||
<script>
|
||||
import { renderString } from 'omorphia'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg'
|
||||
import TrashIcon from '~/assets/images/utils/trash.svg'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
import TrashIcon from '~/assets/images/utils/trash.svg?component'
|
||||
import Modal from '~/components/ui/Modal.vue'
|
||||
|
||||
export default {
|
||||
|
||||
@ -74,8 +74,8 @@
|
||||
|
||||
<script>
|
||||
import { Multiselect } from 'vue-multiselect'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg'
|
||||
import CheckIcon from '~/assets/images/utils/right-arrow.svg'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
import CheckIcon from '~/assets/images/utils/right-arrow.svg?component'
|
||||
import Modal from '~/components/ui/Modal.vue'
|
||||
|
||||
export default {
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg'
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg?component'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@ -289,15 +289,15 @@
|
||||
|
||||
<script setup>
|
||||
import { renderString } from 'omorphia'
|
||||
import InvitationIcon from '~/assets/images/utils/user-plus.svg'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg'
|
||||
import NotificationIcon from '~/assets/images/sidebar/notifications.svg'
|
||||
import ReadIcon from '~/assets/images/utils/check-circle.svg'
|
||||
import CalendarIcon from '~/assets/images/utils/calendar.svg'
|
||||
import VersionIcon from '~/assets/images/utils/version.svg'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg'
|
||||
import ExternalIcon from '~/assets/images/utils/external.svg'
|
||||
import InvitationIcon from '~/assets/images/utils/user-plus.svg?component'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg?component'
|
||||
import NotificationIcon from '~/assets/images/sidebar/notifications.svg?component'
|
||||
import ReadIcon from '~/assets/images/utils/check-circle.svg?component'
|
||||
import CalendarIcon from '~/assets/images/utils/calendar.svg?component'
|
||||
import VersionIcon from '~/assets/images/utils/version.svg?component'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg?component'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
import ExternalIcon from '~/assets/images/utils/external.svg?component'
|
||||
import ThreadSummary from '~/components/ui/thread/ThreadSummary.vue'
|
||||
import { getProjectLink, getVersionLink } from '~/helpers/projects.js'
|
||||
import { getUserLink } from '~/helpers/users.js'
|
||||
|
||||
@ -51,9 +51,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GapIcon from '~/assets/images/utils/gap.svg'
|
||||
import LeftArrowIcon from '~/assets/images/utils/left-arrow.svg'
|
||||
import RightArrowIcon from '~/assets/images/utils/right-arrow.svg'
|
||||
import GapIcon from '~/assets/images/utils/gap.svg?component'
|
||||
import LeftArrowIcon from '~/assets/images/utils/left-arrow.svg?component'
|
||||
import RightArrowIcon from '~/assets/images/utils/right-arrow.svg?component'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@ -94,10 +94,10 @@ import Categories from '~/components/ui/search/Categories.vue'
|
||||
import Badge from '~/components/ui/Badge.vue'
|
||||
import EnvironmentIndicator from '~/components/ui/EnvironmentIndicator.vue'
|
||||
|
||||
import CalendarIcon from '~/assets/images/utils/calendar.svg'
|
||||
import EditIcon from '~/assets/images/utils/updated.svg'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg'
|
||||
import HeartIcon from '~/assets/images/utils/heart.svg'
|
||||
import CalendarIcon from '~/assets/images/utils/calendar.svg?component'
|
||||
import EditIcon from '~/assets/images/utils/updated.svg?component'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg?component'
|
||||
import HeartIcon from '~/assets/images/utils/heart.svg?component'
|
||||
import Avatar from '~/components/ui/Avatar.vue'
|
||||
|
||||
export default {
|
||||
|
||||
@ -108,14 +108,14 @@
|
||||
<script setup>
|
||||
import { formatProjectType } from '~/plugins/shorthands.js'
|
||||
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg'
|
||||
import DropdownIcon from '~/assets/images/utils/dropdown.svg'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg'
|
||||
import RequiredIcon from '~/assets/images/utils/asterisk.svg'
|
||||
import SuggestionIcon from '~/assets/images/utils/lightbulb.svg'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg'
|
||||
import SendIcon from '~/assets/images/utils/send.svg'
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg?component'
|
||||
import DropdownIcon from '~/assets/images/utils/dropdown.svg?component'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg?component'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
import RequiredIcon from '~/assets/images/utils/asterisk.svg?component'
|
||||
import SuggestionIcon from '~/assets/images/utils/lightbulb.svg?component'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg?component'
|
||||
import SendIcon from '~/assets/images/utils/send.svg?component'
|
||||
import { acceptTeamInvite, removeTeamMember } from '~/helpers/teams.js'
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
<script setup>
|
||||
import { Multiselect } from 'vue-multiselect'
|
||||
import Checkbox from '~/components/ui/Checkbox.vue'
|
||||
import ClearIcon from '~/assets/images/utils/clear.svg'
|
||||
import ClearIcon from '~/assets/images/utils/clear.svg?component'
|
||||
|
||||
const props = defineProps({
|
||||
versions: {
|
||||
@ -98,7 +98,7 @@ const props = defineProps({
|
||||
})
|
||||
const emit = defineEmits(['switch-page'])
|
||||
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
const tags = useTags()
|
||||
|
||||
@ -131,7 +131,7 @@ const selectedVersionTypes = shallowRef(getArrayOrString(route.query.c) ?? [])
|
||||
|
||||
async function updateQuery() {
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
await router.replace({
|
||||
query: {
|
||||
|
||||
@ -160,7 +160,7 @@
|
||||
<div
|
||||
:style="{
|
||||
'--color-brand': isUsingProjectColors
|
||||
? intToRgba(project.color, project.id, theme.value ?? undefined)
|
||||
? intToRgba(project.color, project.id, theme ?? undefined)
|
||||
: getDefaultColor(project.id),
|
||||
}"
|
||||
class="legend__item__color"
|
||||
@ -306,7 +306,7 @@ import { analyticsSetToCSVString, intToRgba } from '~/utils/analytics.js'
|
||||
|
||||
import { UiChartsCompactChart as CompactChart, UiChartsChart as Chart } from '#components'
|
||||
|
||||
import PaletteIcon from '~/assets/icons/palette.svg'
|
||||
import PaletteIcon from '~/assets/icons/palette.svg?component'
|
||||
|
||||
const router = useRouter()
|
||||
const theme = useTheme()
|
||||
|
||||
@ -91,9 +91,9 @@
|
||||
import { renderHighlightedString } from '~/helpers/highlight.js'
|
||||
import Avatar from '~/components/ui/Avatar.vue'
|
||||
import Badge from '~/components/ui/Badge.vue'
|
||||
import ReportIcon from '~/assets/images/utils/report.svg'
|
||||
import UnknownIcon from '~/assets/images/utils/unknown.svg'
|
||||
import VersionIcon from '~/assets/images/utils/version.svg'
|
||||
import ReportIcon from '~/assets/images/utils/report.svg?component'
|
||||
import UnknownIcon from '~/assets/images/utils/unknown.svg?component'
|
||||
import VersionIcon from '~/assets/images/utils/version.svg?component'
|
||||
import ThreadSummary from '~/components/ui/thread/ThreadSummary.vue'
|
||||
import CopyCode from '~/components/ui/CopyCode.vue'
|
||||
|
||||
|
||||
@ -199,13 +199,13 @@
|
||||
import { OverflowMenu, MarkdownEditor, DropdownIcon } from 'omorphia'
|
||||
import { useImageUpload } from '~/composables/image-upload.ts'
|
||||
import CopyCode from '~/components/ui/CopyCode.vue'
|
||||
import ReplyIcon from '~/assets/images/utils/reply.svg'
|
||||
import SendIcon from '~/assets/images/utils/send.svg'
|
||||
import CloseIcon from '~/assets/images/utils/check-circle.svg'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg'
|
||||
import EyeOffIcon from '~/assets/images/utils/eye-off.svg'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg'
|
||||
import ReplyIcon from '~/assets/images/utils/reply.svg?component'
|
||||
import SendIcon from '~/assets/images/utils/send.svg?component'
|
||||
import CloseIcon from '~/assets/images/utils/check-circle.svg?component'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
import EyeOffIcon from '~/assets/images/utils/eye-off.svg?component'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg?component'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg?component'
|
||||
import ThreadMessage from '~/components/ui/thread/ThreadMessage.vue'
|
||||
import { isStaff } from '~/helpers/users.js'
|
||||
import { isApproved, isRejected } from '~/helpers/projects.js'
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg'
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg?component'
|
||||
import ThreadMessage from '~/components/ui/thread/ThreadMessage.vue'
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@ -94,7 +94,7 @@ export const initAuth = async (oldToken = null) => {
|
||||
|
||||
export const getAuthUrl = (provider, redirect = '') => {
|
||||
const config = useRuntimeConfig()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
if (redirect === '') {
|
||||
redirect = route.path
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { createFormatter, type Formatter } from '@vintl/compact-number'
|
||||
import { IntlController } from '@vintl/vintl/controller'
|
||||
import type { IntlController } from '@vintl/vintl/controller'
|
||||
|
||||
const formatters = new WeakMap<IntlController<any>, Formatter>()
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CookieOptions } from '#app'
|
||||
import type { CookieOptions } from '#app'
|
||||
|
||||
export type ProjectDisplayMode = 'list' | 'grid' | 'gallery'
|
||||
export type DarkColorTheme = 'dark' | 'oled' | 'retro'
|
||||
@ -58,13 +58,13 @@ export type AllFeatureFlags = {
|
||||
|
||||
export type PartialFeatureFlags = Partial<AllFeatureFlags>
|
||||
|
||||
const COOKIE_OPTIONS: CookieOptions<PartialFeatureFlags> = {
|
||||
const COOKIE_OPTIONS = {
|
||||
maxAge: 60 * 60 * 24 * 365 * 10,
|
||||
sameSite: 'lax',
|
||||
secure: true,
|
||||
httpOnly: false,
|
||||
path: '/',
|
||||
}
|
||||
} satisfies CookieOptions<PartialFeatureFlags>
|
||||
|
||||
export const useFeatureFlags = () =>
|
||||
useState<AllFeatureFlags>('featureFlags', () => {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { createFormatter, type Formatter } from '@vintl/how-ago'
|
||||
import { IntlController } from '@vintl/vintl/controller'
|
||||
import type { IntlController } from '@vintl/vintl/controller'
|
||||
|
||||
const formatters = new WeakMap<IntlController<any>, Formatter>()
|
||||
|
||||
|
||||
1
composables/nuxt-bugfest.ts
Normal file
1
composables/nuxt-bugfest.ts
Normal file
@ -0,0 +1 @@
|
||||
export { useRoute as useNativeRoute } from 'vue-router'
|
||||
@ -5,6 +5,6 @@
|
||||
* @returns {import('vue').Ref<string | string[] | undefined>}
|
||||
*/
|
||||
export const useRouteId = (key = 'id') => {
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
return route.params?.[key] || undefined
|
||||
}
|
||||
|
||||
@ -428,21 +428,21 @@ import {
|
||||
Button,
|
||||
ReportIcon,
|
||||
} from 'omorphia'
|
||||
import HamburgerIcon from '~/assets/images/utils/hamburger.svg'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg'
|
||||
import SearchIcon from '~/assets/images/utils/search.svg'
|
||||
import HamburgerIcon from '~/assets/images/utils/hamburger.svg?component'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
import SearchIcon from '~/assets/images/utils/search.svg?component'
|
||||
|
||||
import NotificationIcon from '~/assets/images/sidebar/notifications.svg'
|
||||
import SettingsIcon from '~/assets/images/sidebar/settings.svg'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg'
|
||||
import HomeIcon from '~/assets/images/sidebar/home.svg'
|
||||
import NotificationIcon from '~/assets/images/sidebar/notifications.svg?component'
|
||||
import SettingsIcon from '~/assets/images/sidebar/settings.svg?component'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg?component'
|
||||
import HomeIcon from '~/assets/images/sidebar/home.svg?component'
|
||||
|
||||
import MoonIcon from '~/assets/images/utils/moon.svg'
|
||||
import SunIcon from '~/assets/images/utils/sun.svg'
|
||||
import PlusIcon from '~/assets/images/utils/plus.svg'
|
||||
import DropdownIcon from '~/assets/images/utils/dropdown.svg'
|
||||
import LogOutIcon from '~/assets/images/utils/log-out.svg'
|
||||
import ChartIcon from '~/assets/images/utils/chart.svg'
|
||||
import MoonIcon from '~/assets/images/utils/moon.svg?component'
|
||||
import SunIcon from '~/assets/images/utils/sun.svg?component'
|
||||
import PlusIcon from '~/assets/images/utils/plus.svg?component'
|
||||
import DropdownIcon from '~/assets/images/utils/dropdown.svg?component'
|
||||
import LogOutIcon from '~/assets/images/utils/log-out.svg?component'
|
||||
import ChartIcon from '~/assets/images/utils/chart.svg?component'
|
||||
|
||||
import NavRow from '~/components/ui/NavRow.vue'
|
||||
import ModalCreation from '~/components/ui/ModalCreation.vue'
|
||||
@ -460,7 +460,7 @@ const flags = useFeatureFlags()
|
||||
const tags = useTags()
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
const link = config.public.siteUrl + route.path.replace(/\/+$/, '')
|
||||
|
||||
const verifyEmailBannerMessages = defineMessages({
|
||||
|
||||
10
package.json
10
package.json
@ -13,9 +13,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@formatjs/cli": "^6.1.2",
|
||||
"@nuxt/devtools": "^0.7.0",
|
||||
"@nuxt/devtools": "^1.3.3",
|
||||
"@nuxtjs/eslint-config-typescript": "^12.0.0",
|
||||
"@nuxtjs/turnstile": "^0.5.0",
|
||||
"@nuxtjs/turnstile": "^0.8.0",
|
||||
"@types/node": "^20.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
||||
"@typescript-eslint/parser": "^5.59.8",
|
||||
@ -29,12 +29,12 @@
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-vue": "^9.14.1",
|
||||
"glob": "^10.2.7",
|
||||
"nuxt": "^3.5.3",
|
||||
"nuxt": "^3.12.1",
|
||||
"prettier": "^2.8.8",
|
||||
"sass": "^1.58.0",
|
||||
"typescript": "^5.0.4",
|
||||
"typescript": "^5.4.5",
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-svg-loader": "^4.0.0",
|
||||
"vite-svg-loader": "^5.1.0",
|
||||
"vue-tsc": "^1.6.5"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@ -1080,26 +1080,26 @@ import {
|
||||
CheckIcon,
|
||||
XIcon,
|
||||
} from 'omorphia'
|
||||
import CrownIcon from '~/assets/images/utils/crown.svg'
|
||||
import CalendarIcon from '~/assets/images/utils/calendar.svg'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg'
|
||||
import UpdateIcon from '~/assets/images/utils/updated.svg'
|
||||
import QueuedIcon from '~/assets/images/utils/list-end.svg'
|
||||
import CodeIcon from '~/assets/images/sidebar/mod.svg'
|
||||
import ExternalIcon from '~/assets/images/utils/external.svg'
|
||||
import ReportIcon from '~/assets/images/utils/report.svg'
|
||||
import HeartIcon from '~/assets/images/utils/heart.svg'
|
||||
import IssuesIcon from '~/assets/images/utils/issues.svg'
|
||||
import WikiIcon from '~/assets/images/utils/wiki.svg'
|
||||
import DiscordIcon from '~/assets/images/external/discord.svg'
|
||||
import BuyMeACoffeeLogo from '~/assets/images/external/bmac.svg'
|
||||
import PatreonIcon from '~/assets/images/external/patreon.svg'
|
||||
import KoFiIcon from '~/assets/images/external/kofi.svg'
|
||||
import PayPalIcon from '~/assets/images/external/paypal.svg'
|
||||
import OpenCollectiveIcon from '~/assets/images/external/opencollective.svg'
|
||||
import UnknownIcon from '~/assets/images/utils/unknown-donation.svg'
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg'
|
||||
import BoxIcon from '~/assets/images/utils/box.svg'
|
||||
import CrownIcon from '~/assets/images/utils/crown.svg?component'
|
||||
import CalendarIcon from '~/assets/images/utils/calendar.svg?component'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg?component'
|
||||
import UpdateIcon from '~/assets/images/utils/updated.svg?component'
|
||||
import QueuedIcon from '~/assets/images/utils/list-end.svg?component'
|
||||
import CodeIcon from '~/assets/images/sidebar/mod.svg?component'
|
||||
import ExternalIcon from '~/assets/images/utils/external.svg?component'
|
||||
import ReportIcon from '~/assets/images/utils/report.svg?component'
|
||||
import HeartIcon from '~/assets/images/utils/heart.svg?component'
|
||||
import IssuesIcon from '~/assets/images/utils/issues.svg?component'
|
||||
import WikiIcon from '~/assets/images/utils/wiki.svg?component'
|
||||
import DiscordIcon from '~/assets/images/external/discord.svg?component'
|
||||
import BuyMeACoffeeLogo from '~/assets/images/external/bmac.svg?component'
|
||||
import PatreonIcon from '~/assets/images/external/patreon.svg?component'
|
||||
import KoFiIcon from '~/assets/images/external/kofi.svg?component'
|
||||
import PayPalIcon from '~/assets/images/external/paypal.svg?component'
|
||||
import OpenCollectiveIcon from '~/assets/images/external/opencollective.svg?component'
|
||||
import UnknownIcon from '~/assets/images/utils/unknown-donation.svg?component'
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg?component'
|
||||
import BoxIcon from '~/assets/images/utils/box.svg?component'
|
||||
import Badge from '~/components/ui/Badge.vue'
|
||||
import Categories from '~/components/ui/search/Categories.vue'
|
||||
import EnvironmentIndicator from '~/components/ui/EnvironmentIndicator.vue'
|
||||
@ -1111,26 +1111,26 @@ import NavStack from '~/components/ui/NavStack.vue'
|
||||
import NavStackItem from '~/components/ui/NavStackItem.vue'
|
||||
import ProjectMemberHeader from '~/components/ui/ProjectMemberHeader.vue'
|
||||
import MessageBanner from '~/components/ui/MessageBanner.vue'
|
||||
import SettingsIcon from '~/assets/images/utils/settings.svg'
|
||||
import UsersIcon from '~/assets/images/utils/users.svg'
|
||||
import CategoriesIcon from '~/assets/images/utils/tags.svg'
|
||||
import DescriptionIcon from '~/assets/images/utils/align-left.svg'
|
||||
import LinksIcon from '~/assets/images/utils/link.svg'
|
||||
import CopyrightIcon from '~/assets/images/utils/copyright.svg'
|
||||
import LicenseIcon from '~/assets/images/utils/book-text.svg'
|
||||
import GalleryIcon from '~/assets/images/utils/image.svg'
|
||||
import VersionIcon from '~/assets/images/utils/version.svg'
|
||||
import SettingsIcon from '~/assets/images/utils/settings.svg?component'
|
||||
import UsersIcon from '~/assets/images/utils/users.svg?component'
|
||||
import CategoriesIcon from '~/assets/images/utils/tags.svg?component'
|
||||
import DescriptionIcon from '~/assets/images/utils/align-left.svg?component'
|
||||
import LinksIcon from '~/assets/images/utils/link.svg?component'
|
||||
import CopyrightIcon from '~/assets/images/utils/copyright.svg?component'
|
||||
import LicenseIcon from '~/assets/images/utils/book-text.svg?component'
|
||||
import GalleryIcon from '~/assets/images/utils/image.svg?component'
|
||||
import VersionIcon from '~/assets/images/utils/version.svg?component'
|
||||
import { reportProject } from '~/utils/report-helpers.ts'
|
||||
import Breadcrumbs from '~/components/ui/Breadcrumbs.vue'
|
||||
import { userCollectProject } from '~/composables/user.js'
|
||||
import CollectionCreateModal from '~/components/ui/CollectionCreateModal.vue'
|
||||
import OrganizationIcon from '~/assets/images/utils/organization.svg'
|
||||
import OrganizationIcon from '~/assets/images/utils/organization.svg?component'
|
||||
import ModerationChecklist from '~/components/ui/ModerationChecklist.vue'
|
||||
import ModeratorIcon from '~/assets/images/sidebar/admin.svg'
|
||||
import ModeratorIcon from '~/assets/images/sidebar/admin.svg?component'
|
||||
import { getVersionsToDisplay } from '~/helpers/projects.js'
|
||||
|
||||
const data = useNuxtApp()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
const config = useRuntimeConfig()
|
||||
|
||||
const auth = await useAuth()
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg?component'
|
||||
import { renderHighlightedString } from '~/helpers/highlight.js'
|
||||
import VersionFilterControl from '~/components/ui/VersionFilterControl.vue'
|
||||
import Pagination from '~/components/ui/Pagination.vue'
|
||||
@ -103,7 +103,7 @@ useSeoMeta({
|
||||
ogDescription: description,
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
const currentPage = ref(Number(route.query.p ?? 1))
|
||||
const filteredVersions = computed(() => {
|
||||
const selectedGameVersions = getArrayOrString(route.query.g) ?? []
|
||||
@ -127,7 +127,7 @@ function switchPage(page) {
|
||||
currentPage.value = page
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
router.replace({
|
||||
query: {
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
<script>
|
||||
import { MarkdownEditor } from 'omorphia'
|
||||
import Chips from '~/components/ui/Chips.vue'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg?component'
|
||||
import { renderHighlightedString } from '~/helpers/highlight.js'
|
||||
import { useImageUpload } from '~/composables/image-upload.ts'
|
||||
|
||||
|
||||
@ -247,12 +247,12 @@ import Avatar from '~/components/ui/Avatar.vue'
|
||||
import ModalConfirm from '~/components/ui/ModalConfirm.vue'
|
||||
import FileInput from '~/components/ui/FileInput.vue'
|
||||
|
||||
import UploadIcon from '~/assets/images/utils/upload.svg'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg'
|
||||
import TrashIcon from '~/assets/images/utils/trash.svg'
|
||||
import ExitIcon from '~/assets/images/utils/x.svg'
|
||||
import IssuesIcon from '~/assets/images/utils/issues.svg'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg'
|
||||
import UploadIcon from '~/assets/images/utils/upload.svg?component'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg?component'
|
||||
import TrashIcon from '~/assets/images/utils/trash.svg?component'
|
||||
import ExitIcon from '~/assets/images/utils/x.svg?component'
|
||||
import IssuesIcon from '~/assets/images/utils/issues.svg?component'
|
||||
import CheckIcon from '~/assets/images/utils/check.svg?component'
|
||||
|
||||
const props = defineProps({
|
||||
project: {
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
<script>
|
||||
import Multiselect from 'vue-multiselect'
|
||||
import Checkbox from '~/components/ui/Checkbox'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg?component'
|
||||
|
||||
export default defineNuxtComponent({
|
||||
components: {
|
||||
|
||||
@ -123,7 +123,7 @@
|
||||
|
||||
<script setup>
|
||||
import { DropdownSelect } from 'omorphia'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg?component'
|
||||
|
||||
const tags = useTags()
|
||||
|
||||
|
||||
@ -521,12 +521,12 @@ import { Multiselect } from 'vue-multiselect'
|
||||
import { Avatar, Badge, Card, Checkbox, TransferIcon, CheckIcon, UsersIcon } from 'omorphia'
|
||||
|
||||
import ModalConfirm from '~/components/ui/ModalConfirm.vue'
|
||||
import DropdownIcon from '~/assets/images/utils/dropdown.svg'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg'
|
||||
import UserPlusIcon from '~/assets/images/utils/user-plus.svg'
|
||||
import UserRemoveIcon from '~/assets/images/utils/user-x.svg'
|
||||
import OrganizationIcon from '~/assets/images/utils/organization.svg'
|
||||
import CrownIcon from '~/assets/images/utils/crown.svg'
|
||||
import DropdownIcon from '~/assets/images/utils/dropdown.svg?component'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg?component'
|
||||
import UserPlusIcon from '~/assets/images/utils/user-plus.svg?component'
|
||||
import UserRemoveIcon from '~/assets/images/utils/user-x.svg?component'
|
||||
import OrganizationIcon from '~/assets/images/utils/organization.svg?component'
|
||||
import CrownIcon from '~/assets/images/utils/crown.svg?component'
|
||||
|
||||
import { removeSelfFromTeam } from '~/helpers/teams.js'
|
||||
|
||||
|
||||
@ -114,8 +114,8 @@
|
||||
|
||||
<script>
|
||||
import Checkbox from '~/components/ui/Checkbox.vue'
|
||||
import StarIcon from '~/assets/images/utils/star.svg'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg'
|
||||
import StarIcon from '~/assets/images/utils/star.svg?component'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg?component'
|
||||
|
||||
export default defineNuxtComponent({
|
||||
components: {
|
||||
|
||||
@ -631,23 +631,23 @@ import Chips from '~/components/ui/Chips.vue'
|
||||
import Checkbox from '~/components/ui/Checkbox.vue'
|
||||
import FileInput from '~/components/ui/FileInput.vue'
|
||||
|
||||
import FileIcon from '~/assets/images/utils/file.svg'
|
||||
import TrashIcon from '~/assets/images/utils/trash.svg'
|
||||
import EditIcon from '~/assets/images/utils/edit.svg'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg'
|
||||
import StarIcon from '~/assets/images/utils/star.svg'
|
||||
import ReportIcon from '~/assets/images/utils/report.svg'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg'
|
||||
import HashIcon from '~/assets/images/utils/hash.svg'
|
||||
import PlusIcon from '~/assets/images/utils/plus.svg'
|
||||
import TransferIcon from '~/assets/images/utils/transfer.svg'
|
||||
import UploadIcon from '~/assets/images/utils/upload.svg'
|
||||
import BackIcon from '~/assets/images/utils/left-arrow.svg'
|
||||
import BoxIcon from '~/assets/images/utils/box.svg'
|
||||
import RightArrowIcon from '~/assets/images/utils/right-arrow.svg'
|
||||
import FileIcon from '~/assets/images/utils/file.svg?component'
|
||||
import TrashIcon from '~/assets/images/utils/trash.svg?component'
|
||||
import EditIcon from '~/assets/images/utils/edit.svg?component'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg?component'
|
||||
import StarIcon from '~/assets/images/utils/star.svg?component'
|
||||
import ReportIcon from '~/assets/images/utils/report.svg?component'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg?component'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
import HashIcon from '~/assets/images/utils/hash.svg?component'
|
||||
import PlusIcon from '~/assets/images/utils/plus.svg?component'
|
||||
import TransferIcon from '~/assets/images/utils/transfer.svg?component'
|
||||
import UploadIcon from '~/assets/images/utils/upload.svg?component'
|
||||
import BackIcon from '~/assets/images/utils/left-arrow.svg?component'
|
||||
import BoxIcon from '~/assets/images/utils/box.svg?component'
|
||||
import RightArrowIcon from '~/assets/images/utils/right-arrow.svg?component'
|
||||
import Modal from '~/components/ui/Modal.vue'
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg'
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg?component'
|
||||
|
||||
export default defineNuxtComponent({
|
||||
components: {
|
||||
@ -725,7 +725,7 @@ export default defineNuxtComponent({
|
||||
},
|
||||
async setup(props) {
|
||||
const data = useNuxtApp()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
const auth = await useAuth()
|
||||
const tags = useTags()
|
||||
|
||||
@ -99,9 +99,9 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { acceptFileFromProjectType } from '~/helpers/fileUtils.js'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg'
|
||||
import UploadIcon from '~/assets/images/utils/upload.svg'
|
||||
import InfoIcon from '~/assets/images/utils/info.svg'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg?component'
|
||||
import UploadIcon from '~/assets/images/utils/upload.svg?component'
|
||||
import InfoIcon from '~/assets/images/utils/info.svg?component'
|
||||
import VersionBadge from '~/components/ui/Badge.vue'
|
||||
import FileInput from '~/components/ui/FileInput.vue'
|
||||
import DropArea from '~/components/ui/DropArea.vue'
|
||||
@ -151,7 +151,7 @@ useSeoMeta({
|
||||
ogDescription: description,
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
const currentPage = ref(Number(route.query.p ?? 1))
|
||||
const filteredVersions = computed(() => {
|
||||
const selectedGameVersions = getArrayOrString(route.query.g) ?? []
|
||||
@ -175,7 +175,7 @@ function switchPage(page) {
|
||||
currentPage.value = page
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
router.replace({
|
||||
query: {
|
||||
|
||||
@ -11,9 +11,9 @@ import {
|
||||
import Avatar from '~/components/ui/Avatar.vue'
|
||||
import LogoAnimated from '~/components/brand/LogoAnimated.vue'
|
||||
import Badge from '~/components/ui/Badge.vue'
|
||||
import PrismIcon from '~/assets/images/external/prism.svg'
|
||||
import ATLauncher from '~/assets/images/external/atlauncher.svg'
|
||||
import CurseForge from '~/assets/images/external/curseforge.svg'
|
||||
import PrismIcon from '~/assets/images/external/prism.svg?component'
|
||||
import ATLauncher from '~/assets/images/external/atlauncher.svg?component'
|
||||
import CurseForge from '~/assets/images/external/curseforge.svg?component'
|
||||
import Checkbox from '~/components/ui/Checkbox.vue'
|
||||
|
||||
const os = ref(null)
|
||||
|
||||
@ -118,7 +118,7 @@ const messages = defineMessages({
|
||||
|
||||
const data = useNuxtApp()
|
||||
|
||||
const router = useRoute()
|
||||
const router = useNativeRoute()
|
||||
const auth = await useAuth()
|
||||
const { scopesToDefinitions } = useScopes()
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ if (auth.value.user) {
|
||||
await navigateTo('/dashboard')
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
const step = ref('choose_method')
|
||||
|
||||
|
||||
@ -177,7 +177,7 @@ useHead({
|
||||
})
|
||||
|
||||
const auth = await useAuth()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
const redirectTarget = route.query.redirect || ''
|
||||
|
||||
|
||||
@ -201,7 +201,7 @@ useHead({
|
||||
})
|
||||
|
||||
const auth = await useAuth()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
const redirectTarget = route.query.redirect
|
||||
|
||||
|
||||
@ -121,7 +121,7 @@ useHead({
|
||||
const auth = await useAuth()
|
||||
|
||||
const success = ref(false)
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
if (route.query.flow) {
|
||||
try {
|
||||
|
||||
@ -72,7 +72,7 @@ useHead({
|
||||
const subscribe = ref(true)
|
||||
|
||||
async function continueSignUp() {
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
await useAuth(route.query.authToken)
|
||||
await useUser()
|
||||
|
||||
@ -480,7 +480,7 @@ const messages = defineMessages({
|
||||
})
|
||||
|
||||
const data = useNuxtApp()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
const auth = await useAuth()
|
||||
const cosmetics = useCosmetics()
|
||||
const tags = useTags()
|
||||
|
||||
@ -46,12 +46,12 @@ import { LibraryIcon, ChartIcon } from 'omorphia'
|
||||
import NavStack from '~/components/ui/NavStack.vue'
|
||||
import NavStackItem from '~/components/ui/NavStackItem.vue'
|
||||
|
||||
import DashboardIcon from '~/assets/images/utils/dashboard.svg'
|
||||
import CurrencyIcon from '~/assets/images/utils/currency.svg'
|
||||
import ListIcon from '~/assets/images/utils/list.svg'
|
||||
import ReportIcon from '~/assets/images/utils/report.svg'
|
||||
import NotificationsIcon from '~/assets/images/utils/bell.svg'
|
||||
import OrganizationIcon from '~/assets/images/utils/organization.svg'
|
||||
import DashboardIcon from '~/assets/images/utils/dashboard.svg?component'
|
||||
import CurrencyIcon from '~/assets/images/utils/currency.svg?component'
|
||||
import ListIcon from '~/assets/images/utils/list.svg?component'
|
||||
import ReportIcon from '~/assets/images/utils/report.svg?component'
|
||||
import NotificationsIcon from '~/assets/images/utils/bell.svg?component'
|
||||
import OrganizationIcon from '~/assets/images/utils/organization.svg?component'
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
@ -59,5 +59,5 @@ definePageMeta({
|
||||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
</script>
|
||||
|
||||
@ -89,7 +89,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { Avatar, BoxIcon, SearchIcon, XIcon, Button, PlusIcon, LinkIcon, LockIcon } from 'omorphia'
|
||||
import WorldIcon from '~/assets/images/utils/world.svg'
|
||||
import WorldIcon from '~/assets/images/utils/world.svg?component'
|
||||
import CollectionCreateModal from '~/components/ui/CollectionCreateModal.vue'
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
@ -108,8 +108,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg'
|
||||
import HistoryIcon from '~/assets/images/utils/history.svg'
|
||||
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg?component'
|
||||
import HistoryIcon from '~/assets/images/utils/history.svg?component'
|
||||
import Avatar from '~/components/ui/Avatar.vue'
|
||||
import NotificationItem from '~/components/ui/NotificationItem.vue'
|
||||
import { fetchExtraNotificationData, groupNotifications } from '~/helpers/notifications.js'
|
||||
|
||||
@ -58,7 +58,7 @@ import {
|
||||
} from '~/helpers/notifications.js'
|
||||
import NotificationItem from '~/components/ui/NotificationItem.vue'
|
||||
import Chips from '~/components/ui/Chips.vue'
|
||||
import CheckCheckIcon from '~/assets/images/utils/check-check.svg'
|
||||
import CheckCheckIcon from '~/assets/images/utils/check-check.svg?component'
|
||||
import Breadcrumbs from '~/components/ui/Breadcrumbs.vue'
|
||||
import Pagination from '~/components/ui/Pagination.vue'
|
||||
|
||||
@ -68,7 +68,7 @@ useHead({
|
||||
|
||||
const auth = await useAuth()
|
||||
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
const router = useRouter()
|
||||
|
||||
const history = computed(() => {
|
||||
|
||||
@ -309,15 +309,15 @@ import Avatar from '~/components/ui/Avatar.vue'
|
||||
import ModalCreation from '~/components/ui/ModalCreation.vue'
|
||||
import CopyCode from '~/components/ui/CopyCode.vue'
|
||||
|
||||
import SettingsIcon from '~/assets/images/utils/settings.svg'
|
||||
import TrashIcon from '~/assets/images/utils/trash.svg'
|
||||
import IssuesIcon from '~/assets/images/utils/issues.svg'
|
||||
import PlusIcon from '~/assets/images/utils/plus.svg'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg'
|
||||
import EditIcon from '~/assets/images/utils/edit.svg'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg'
|
||||
import AscendingIcon from '~/assets/images/utils/sort-asc.svg'
|
||||
import DescendingIcon from '~/assets/images/utils/sort-desc.svg'
|
||||
import SettingsIcon from '~/assets/images/utils/settings.svg?component'
|
||||
import TrashIcon from '~/assets/images/utils/trash.svg?component'
|
||||
import IssuesIcon from '~/assets/images/utils/issues.svg?component'
|
||||
import PlusIcon from '~/assets/images/utils/plus.svg?component'
|
||||
import CrossIcon from '~/assets/images/utils/x.svg?component'
|
||||
import EditIcon from '~/assets/images/utils/edit.svg?component'
|
||||
import SaveIcon from '~/assets/images/utils/save.svg?component'
|
||||
import AscendingIcon from '~/assets/images/utils/sort-asc.svg?component'
|
||||
import DescendingIcon from '~/assets/images/utils/sort-desc.svg?component'
|
||||
|
||||
export default defineNuxtComponent({
|
||||
components: {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<script setup>
|
||||
import ReportView from '~/components/ui/report/ReportView.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
const auth = await useAuth()
|
||||
|
||||
useHead({
|
||||
|
||||
@ -104,8 +104,8 @@ import {
|
||||
capitalizeString,
|
||||
} from 'omorphia'
|
||||
import dayjs from 'dayjs'
|
||||
import TremendousIcon from '~/assets/images/external/tremendous.svg'
|
||||
import VenmoIcon from '~/assets/images/external/venmo-small.svg'
|
||||
import TremendousIcon from '~/assets/images/external/tremendous.svg?component'
|
||||
import VenmoIcon from '~/assets/images/external/venmo-small.svg?component'
|
||||
|
||||
const vintl = useVIntl()
|
||||
const { formatMessage } = vintl
|
||||
|
||||
@ -196,7 +196,7 @@ import {
|
||||
Breadcrumbs,
|
||||
} from 'omorphia'
|
||||
import { all } from 'iso-3166-1'
|
||||
import VenmoIcon from '~/assets/images/external/venmo.svg'
|
||||
import VenmoIcon from '~/assets/images/external/venmo.svg?component'
|
||||
|
||||
const auth = await useAuth()
|
||||
const data = useNuxtApp()
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { FeatureFlag, DEFAULT_FEATURE_FLAGS, saveFeatureFlags } from '~/composables/featureFlags.ts'
|
||||
import {
|
||||
type FeatureFlag,
|
||||
DEFAULT_FEATURE_FLAGS,
|
||||
saveFeatureFlags,
|
||||
} from '~/composables/featureFlags.ts'
|
||||
|
||||
const flags = shallowReactive(useFeatureFlags().value)
|
||||
</script>
|
||||
|
||||
@ -505,11 +505,11 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { Multiselect } from 'vue-multiselect'
|
||||
import SearchIcon from '~/assets/images/utils/search.svg'
|
||||
import CalendarIcon from '~/assets/images/utils/calendar.svg'
|
||||
import ModrinthIcon from '~/assets/images/logo.svg'
|
||||
import PrismLauncherLogo from '~/assets/images/external/prism.svg'
|
||||
import ATLauncherLogo from '~/assets/images/external/atlauncher.svg'
|
||||
import SearchIcon from '~/assets/images/utils/search.svg?component'
|
||||
import CalendarIcon from '~/assets/images/utils/calendar.svg?component'
|
||||
import ModrinthIcon from '~/assets/images/logo.svg?component'
|
||||
import PrismLauncherLogo from '~/assets/images/external/prism.svg?component'
|
||||
import ATLauncherLogo from '~/assets/images/external/atlauncher.svg?component'
|
||||
import Avatar from '~/components/ui/Avatar.vue'
|
||||
import ProjectCard from '~/components/ui/ProjectCard.vue'
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ import {
|
||||
import NavStack from '~/components/ui/NavStack.vue'
|
||||
import NavStackItem from '~/components/ui/NavStackItem.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -25,9 +25,9 @@
|
||||
import NavStack from '~/components/ui/NavStack.vue'
|
||||
import NavStackItem from '~/components/ui/NavStackItem.vue'
|
||||
|
||||
import ModrinthIcon from '~/assets/images/utils/modrinth.svg'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg'
|
||||
import ReportIcon from '~/assets/images/utils/report.svg'
|
||||
import ModrinthIcon from '~/assets/images/utils/modrinth.svg?component'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg?component'
|
||||
import ReportIcon from '~/assets/images/utils/report.svg?component'
|
||||
|
||||
definePageMeta({
|
||||
middleware: 'auth',
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
import ReportView from '~/components/ui/report/ReportView.vue'
|
||||
|
||||
const auth = await useAuth()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
useHead({
|
||||
title: `Report ${route.params.id} - Modrinth`,
|
||||
|
||||
@ -103,12 +103,12 @@
|
||||
<script setup>
|
||||
import Chips from '~/components/ui/Chips.vue'
|
||||
import Avatar from '~/components/ui/Avatar.vue'
|
||||
import UnknownIcon from '~/assets/images/utils/unknown.svg'
|
||||
import EyeIcon from '~/assets/images/utils/eye.svg'
|
||||
import SortAscIcon from '~/assets/images/utils/sort-asc.svg'
|
||||
import SortDescIcon from '~/assets/images/utils/sort-desc.svg'
|
||||
import WarningIcon from '~/assets/images/utils/issues.svg'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg'
|
||||
import UnknownIcon from '~/assets/images/utils/unknown.svg?component'
|
||||
import EyeIcon from '~/assets/images/utils/eye.svg?component'
|
||||
import SortAscIcon from '~/assets/images/utils/sort-asc.svg?component'
|
||||
import SortDescIcon from '~/assets/images/utils/sort-desc.svg?component'
|
||||
import WarningIcon from '~/assets/images/utils/issues.svg?component'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg?component'
|
||||
import Badge from '~/components/ui/Badge.vue'
|
||||
import { formatProjectType } from '~/plugins/shorthands.js'
|
||||
|
||||
|
||||
@ -235,12 +235,12 @@ import NavStack from '~/components/ui/NavStack.vue'
|
||||
import NavStackItem from '~/components/ui/NavStackItem.vue'
|
||||
import NavRow from '~/components/ui/NavRow.vue'
|
||||
import ModalCreation from '~/components/ui/ModalCreation.vue'
|
||||
import UpToDate from '~/assets/images/illustrations/up_to_date.svg'
|
||||
import UpToDate from '~/assets/images/illustrations/up_to_date.svg?component'
|
||||
import ProjectCard from '~/components/ui/ProjectCard.vue'
|
||||
|
||||
import OrganizationIcon from '~/assets/images/utils/organization.svg'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg'
|
||||
import CrownIcon from '~/assets/images/utils/crown.svg'
|
||||
import OrganizationIcon from '~/assets/images/utils/organization.svg?component'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg?component'
|
||||
import CrownIcon from '~/assets/images/utils/crown.svg?component'
|
||||
import { acceptTeamInvite, removeTeamMember } from '~/helpers/teams.js'
|
||||
|
||||
const vintl = useVIntl()
|
||||
@ -251,7 +251,7 @@ const formatCompactNumber = useCompactNumber()
|
||||
const auth = await useAuth()
|
||||
const user = await useUser()
|
||||
const cosmetics = useCosmetics()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
const tags = useTags()
|
||||
|
||||
let orgId = useRouteId()
|
||||
|
||||
@ -231,7 +231,7 @@ import {
|
||||
Button,
|
||||
} from 'omorphia'
|
||||
import { ref } from 'vue'
|
||||
import CrownIcon from '~/assets/images/utils/crown.svg'
|
||||
import CrownIcon from '~/assets/images/utils/crown.svg?component'
|
||||
|
||||
import { removeTeamMember } from '~/helpers/teams.js'
|
||||
import { isPermission } from '~/utils/permissions.ts'
|
||||
|
||||
@ -96,7 +96,7 @@ import { Card, Button, MarkdownEditor, DropdownSelect, SaveIcon } from 'omorphia
|
||||
import { useImageUpload } from '~/composables/image-upload.ts'
|
||||
|
||||
const tags = useTags()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
const accessQuery = (id: string): string => {
|
||||
return route.query?.[id]?.toString() || ''
|
||||
|
||||
@ -351,21 +351,21 @@ import SearchFilter from '~/components/ui/search/SearchFilter.vue'
|
||||
import Checkbox from '~/components/ui/Checkbox.vue'
|
||||
import LogoAnimated from '~/components/brand/LogoAnimated.vue'
|
||||
|
||||
import ClientIcon from '~/assets/images/categories/client.svg'
|
||||
import ServerIcon from '~/assets/images/categories/server.svg'
|
||||
import ClientIcon from '~/assets/images/categories/client.svg?component'
|
||||
import ServerIcon from '~/assets/images/categories/server.svg?component'
|
||||
|
||||
import SearchIcon from '~/assets/images/utils/search.svg'
|
||||
import ClearIcon from '~/assets/images/utils/clear.svg'
|
||||
import FilterIcon from '~/assets/images/utils/filter.svg'
|
||||
import GridIcon from '~/assets/images/utils/grid.svg'
|
||||
import ListIcon from '~/assets/images/utils/list.svg'
|
||||
import ImageIcon from '~/assets/images/utils/image.svg'
|
||||
import SearchIcon from '~/assets/images/utils/search.svg?component'
|
||||
import ClearIcon from '~/assets/images/utils/clear.svg?component'
|
||||
import FilterIcon from '~/assets/images/utils/filter.svg?component'
|
||||
import GridIcon from '~/assets/images/utils/grid.svg?component'
|
||||
import ListIcon from '~/assets/images/utils/list.svg?component'
|
||||
import ImageIcon from '~/assets/images/utils/image.svg?component'
|
||||
|
||||
const sidebarMenuOpen = ref(false)
|
||||
const showAllLoaders = ref(false)
|
||||
|
||||
const data = useNuxtApp()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
|
||||
const cosmetics = useCosmetics()
|
||||
const tags = useTags()
|
||||
|
||||
@ -84,13 +84,13 @@ import {
|
||||
} from 'omorphia'
|
||||
import NavStack from '~/components/ui/NavStack.vue'
|
||||
import NavStackItem from '~/components/ui/NavStackItem.vue'
|
||||
import MonitorSmartphoneIcon from '~/assets/images/utils/monitor-smartphone.svg'
|
||||
import MonitorSmartphoneIcon from '~/assets/images/utils/monitor-smartphone.svg?component'
|
||||
|
||||
import { commonMessages, commonSettingsMessages } from '~/utils/common-messages.ts'
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
const auth = await useAuth()
|
||||
const isStaging = useRuntimeConfig().public.siteUrl !== 'https://modrinth.com'
|
||||
</script>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import Fuse from 'fuse.js/dist/fuse.basic'
|
||||
import RadioButtonIcon from '~/assets/images/utils/radio-button.svg'
|
||||
import RadioButtonCheckedIcon from '~/assets/images/utils/radio-button-checked.svg'
|
||||
import WarningIcon from '~/assets/images/utils/issues.svg'
|
||||
import RadioButtonIcon from '~/assets/images/utils/radio-button.svg?component'
|
||||
import RadioButtonCheckedIcon from '~/assets/images/utils/radio-button-checked.svg?component'
|
||||
import WarningIcon from '~/assets/images/utils/issues.svg?component'
|
||||
import { isModifierKeyDown } from '~/helpers/events.ts'
|
||||
import { commonSettingsMessages } from '~/utils/common-messages.ts'
|
||||
|
||||
|
||||
@ -285,18 +285,18 @@ import ProjectCard from '~/components/ui/ProjectCard.vue'
|
||||
import Badge from '~/components/ui/Badge.vue'
|
||||
import { reportUser } from '~/utils/report-helpers.ts'
|
||||
|
||||
import ReportIcon from '~/assets/images/utils/report.svg'
|
||||
import SunriseIcon from '~/assets/images/utils/sunrise.svg'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg'
|
||||
import SettingsIcon from '~/assets/images/utils/settings.svg'
|
||||
import UpToDate from '~/assets/images/illustrations/up_to_date.svg'
|
||||
import UserIcon from '~/assets/images/utils/user.svg'
|
||||
import EditIcon from '~/assets/images/utils/edit.svg'
|
||||
import HeartIcon from '~/assets/images/utils/heart.svg'
|
||||
import GridIcon from '~/assets/images/utils/grid.svg'
|
||||
import ListIcon from '~/assets/images/utils/list.svg'
|
||||
import ImageIcon from '~/assets/images/utils/image.svg'
|
||||
import WorldIcon from '~/assets/images/utils/world.svg'
|
||||
import ReportIcon from '~/assets/images/utils/report.svg?component'
|
||||
import SunriseIcon from '~/assets/images/utils/sunrise.svg?component'
|
||||
import DownloadIcon from '~/assets/images/utils/download.svg?component'
|
||||
import SettingsIcon from '~/assets/images/utils/settings.svg?component'
|
||||
import UpToDate from '~/assets/images/illustrations/up_to_date.svg?component'
|
||||
import UserIcon from '~/assets/images/utils/user.svg?component'
|
||||
import EditIcon from '~/assets/images/utils/edit.svg?component'
|
||||
import HeartIcon from '~/assets/images/utils/heart.svg?component'
|
||||
import GridIcon from '~/assets/images/utils/grid.svg?component'
|
||||
import ListIcon from '~/assets/images/utils/list.svg?component'
|
||||
import ImageIcon from '~/assets/images/utils/image.svg?component'
|
||||
import WorldIcon from '~/assets/images/utils/world.svg?component'
|
||||
import ModalCreation from '~/components/ui/ModalCreation.vue'
|
||||
import NavRow from '~/components/ui/NavRow.vue'
|
||||
import CopyCode from '~/components/ui/CopyCode.vue'
|
||||
@ -304,7 +304,7 @@ import Avatar from '~/components/ui/Avatar.vue'
|
||||
import CollectionCreateModal from '~/components/ui/CollectionCreateModal.vue'
|
||||
|
||||
const data = useNuxtApp()
|
||||
const route = useRoute()
|
||||
const route = useNativeRoute()
|
||||
const auth = await useAuth()
|
||||
const cosmetics = useCosmetics()
|
||||
const tags = useTags()
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
import { getProjectTypeForUrlShorthand } from '~/helpers/projects.js'
|
||||
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
const tagStore = useTags()
|
||||
|
||||
nuxtApp.provide('formatNumber', formatNumber)
|
||||
nuxtApp.provide('capitalizeString', capitalizeString)
|
||||
nuxtApp.provide('formatMoney', formatMoney)
|
||||
nuxtApp.provide('formatVersion', (versionsArray) => formatVersions(versionsArray))
|
||||
nuxtApp.provide('formatVersion', (versionsArray) => formatVersions(tagStore, versionsArray))
|
||||
nuxtApp.provide('orElse', (first, otherwise) => first ?? otherwise)
|
||||
nuxtApp.provide('external', () => {
|
||||
const cosmeticsStore = useCosmetics().value
|
||||
@ -76,8 +78,6 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
.sort((a, b) => nuxtApp.$dayjs(b.date_published) - nuxtApp.$dayjs(a.date_published))
|
||||
})
|
||||
nuxtApp.provide('getProjectTypeForDisplay', (type, categories) => {
|
||||
const tagStore = useTags()
|
||||
|
||||
if (type === 'mod') {
|
||||
const isPlugin = categories.some((category) => {
|
||||
return tagStore.value.loaderData.allPluginLoaders.includes(category)
|
||||
@ -111,8 +111,6 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
)
|
||||
nuxtApp.provide('cycleValue', cycleValue)
|
||||
nuxtApp.provide('sortedCategories', () => {
|
||||
const tagStore = useTags()
|
||||
|
||||
return tagStore.value.categories.slice().sort((a, b) => {
|
||||
const headerCompare = a.header.localeCompare(b.header)
|
||||
if (headerCompare !== 0) {
|
||||
@ -252,8 +250,7 @@ export const formatProjectStatus = (name) => {
|
||||
return capitalizeString(name)
|
||||
}
|
||||
|
||||
export const formatVersions = (versionArray) => {
|
||||
const tag = useTags()
|
||||
export const formatVersions = (tag, versionArray) => {
|
||||
const allVersions = tag.value.gameVersions.slice().reverse()
|
||||
const allReleases = allVersions.filter((x) => x.version_type === 'release')
|
||||
|
||||
|
||||
10012
pnpm-lock.yaml
generated
10012
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user