You've already forked AstralRinth
forked from didirus/AstralRinth
Bump nuxt version (#1093)
* Bump nuxt version * tests * bump again * fix modals
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div v-if="shown">
|
||||||
<div
|
<div
|
||||||
:class="{
|
:class="{
|
||||||
shown: shown,
|
shown: actuallyShown,
|
||||||
noblur: !$orElse($cosmetics.advancedRendering, true),
|
noblur: !$orElse($cosmetics.advancedRendering, true),
|
||||||
}"
|
}"
|
||||||
class="modal-overlay"
|
class="modal-overlay"
|
||||||
@click="hide"
|
@click="hide"
|
||||||
/>
|
/>
|
||||||
<div class="modal-container" :class="{ shown }">
|
<div class="modal-container" :class="{ shown: actuallyShown }">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div v-if="header" class="header">
|
<div v-if="header" class="header">
|
||||||
<h1>{{ header }}</h1>
|
<h1>{{ header }}</h1>
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -40,14 +41,21 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
shown: false,
|
shown: false,
|
||||||
|
actuallyShown: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
show() {
|
show() {
|
||||||
this.shown = true
|
this.shown = true
|
||||||
|
setTimeout(() => {
|
||||||
|
this.actuallyShown = true
|
||||||
|
}, 50)
|
||||||
},
|
},
|
||||||
hide() {
|
hide() {
|
||||||
this.shown = false
|
this.actuallyShown = false
|
||||||
|
setTimeout(() => {
|
||||||
|
this.shown = false
|
||||||
|
}, 300)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [
|
plugins: [
|
||||||
|
eslintPlugin(),
|
||||||
svgLoader({
|
svgLoader({
|
||||||
svgoConfig: {
|
svgoConfig: {
|
||||||
plugins: [
|
plugins: [
|
||||||
@@ -149,7 +150,6 @@ export default defineNuxtConfig({
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
eslintPlugin(),
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
dayjs: {
|
dayjs: {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"eslint": "^8.33.0",
|
"eslint": "^8.33.0",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
"eslint-plugin-vue": "^9.9.0",
|
"eslint-plugin-vue": "^9.9.0",
|
||||||
"nuxt": "^3.3.3",
|
"nuxt": "^3.4.1",
|
||||||
"prettier": "^2.8.3",
|
"prettier": "^2.8.3",
|
||||||
"sass": "^1.58.0",
|
"sass": "^1.58.0",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^4.9.5",
|
||||||
|
|||||||
@@ -132,6 +132,7 @@
|
|||||||
/>
|
/>
|
||||||
</Head>
|
</Head>
|
||||||
<ModalModeration
|
<ModalModeration
|
||||||
|
v-if="$auth.user"
|
||||||
ref="modalModeration"
|
ref="modalModeration"
|
||||||
:project="project"
|
:project="project"
|
||||||
:status="moderationStatus"
|
:status="moderationStatus"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Head>
|
<Head>
|
||||||
<Title> {{ project.title }} - Gallery </Title>
|
<Title>{{ project.title }} - Gallery</Title>
|
||||||
<Meta name="og:title" :content="`${project.title} - Gallery`" />
|
<Meta name="og:title" :content="`${project.title} - Gallery`" />
|
||||||
<Meta name="description" :content="metaDescription" />
|
<Meta name="description" :content="metaDescription" />
|
||||||
<Meta name="apple-mobile-web-app-title" :content="`${project.title} - Gallery`" />
|
<Meta name="apple-mobile-web-app-title" :content="`${project.title} - Gallery`" />
|
||||||
|
|||||||
@@ -6,6 +6,16 @@
|
|||||||
'alt-layout': $cosmetics.searchLayout,
|
'alt-layout': $cosmetics.searchLayout,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
<Head>
|
||||||
|
<Title>Search {{ $formatProjectType(projectType.display) }}s - Modrinth</Title>
|
||||||
|
<Meta name="og:title" :content="`Search ${$formatProjectType(projectType.display)}s`" />
|
||||||
|
<Meta name="description" :content="metaDescription" />
|
||||||
|
<Meta
|
||||||
|
name="apple-mobile-web-app-title"
|
||||||
|
:content="`Search ${$formatProjectType(projectType.display)}s`"
|
||||||
|
/>
|
||||||
|
<Meta name="og:description" :content="metaDescription" />
|
||||||
|
</Head>
|
||||||
<aside
|
<aside
|
||||||
:class="{
|
:class="{
|
||||||
'normal-page__sidebar': true,
|
'normal-page__sidebar': true,
|
||||||
@@ -406,6 +416,14 @@ export default defineNuxtComponent({
|
|||||||
const currentPage = ref(1)
|
const currentPage = ref(1)
|
||||||
const projectType = ref({ id: 'mod', display: 'mod', actual: 'mod' })
|
const projectType = ref({ id: 'mod', display: 'mod', actual: 'mod' })
|
||||||
|
|
||||||
|
const metaDescription = computed(
|
||||||
|
() =>
|
||||||
|
`Search and browse thousands of Minecraft ${data.$formatProjectType(
|
||||||
|
projectType.value.display
|
||||||
|
)}s on Modrinth with instant, accurate search results. Our filters help you quickly find the best Minecraft ${data.$formatProjectType(
|
||||||
|
projectType.value.display
|
||||||
|
)}s.`
|
||||||
|
)
|
||||||
if (route.query.q) {
|
if (route.query.q) {
|
||||||
query.value = route.query.q
|
query.value = route.query.q
|
||||||
}
|
}
|
||||||
@@ -676,6 +694,7 @@ export default defineNuxtComponent({
|
|||||||
getSearchUrl,
|
getSearchUrl,
|
||||||
searchLoading,
|
searchLoading,
|
||||||
noLoad,
|
noLoad,
|
||||||
|
metaDescription,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
export default defineNuxtPlugin((nuxtApp) => {
|
export default defineNuxtPlugin((nuxtApp) => {
|
||||||
const themeStore = useTheme()
|
const themeStore = useTheme()
|
||||||
|
|
||||||
// nuxtApp.hook('app:mounted', () => {
|
nuxtApp.hook('app:mounted', () => {
|
||||||
// if (process.client && themeStore.value.preference === 'system') {
|
if (process.client && themeStore.value.preference === 'system') {
|
||||||
// const colorSchemeQueryList = window.matchMedia('(prefers-color-scheme: light)')
|
const colorSchemeQueryList = window.matchMedia('(prefers-color-scheme: light)')
|
||||||
//
|
|
||||||
// const setColorScheme = (e) => {
|
const setColorScheme = (e) => {
|
||||||
// if (themeStore.value.preference === 'system') {
|
if (themeStore.value.preference === 'system') {
|
||||||
// if (e.matches) {
|
if (e.matches) {
|
||||||
// updateTheme('light')
|
updateTheme('light')
|
||||||
// } else {
|
} else {
|
||||||
// updateTheme('dark')
|
updateTheme('dark')
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// setColorScheme(colorSchemeQueryList)
|
setColorScheme(colorSchemeQueryList)
|
||||||
// colorSchemeQueryList.addEventListener('change', setColorScheme)
|
colorSchemeQueryList.addEventListener('change', setColorScheme)
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
|
|
||||||
nuxtApp.provide('colorMode', themeStore.value)
|
nuxtApp.provide('colorMode', themeStore.value)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user