You've already forked AstralRinth
forked from didirus/AstralRinth
381ea51cce
* fix: files.vue bugs before styling changes * feat: move files tab to shared layout structure * fix: qa * fix: qa * fix: bugs * fix: lint * fix: admonition cleanup with progress + actions * fix: cleanup * fix: modals * fix: admon title * fix: i18n standard * fix: lint + i18n pass * fix: remove transition * fix: type errors * feat: files tab in app * fix: qa * fix: backup item minmax * fix: use ContentPageHeader for server panel * fix: lint * fix: lint * fix: lint * feat: page leave safety * fix: lint * fix: cargo fmt fix * fix: blank in prod * fix: content card table stuff * Revert "fix: blank in prod" This reverts commit 74758fe185cf85a4a20355857f889cb091b97ace. * fix: import * feat: browse worlds/servers flow * fix: worlds tab parity with content tab * fix: perf bug + shader filter pill copy * feat: singleplayer filter * fix: ordering * fix: breadcrumbs * fix: lint * fix: qa * feat: store server proj id when adding to a non-linked instance * fix: lint * fix: i18n + qa * fix: conflict * qa: already installed modal + placeholders not server-specific * fix: qa * fix: add + edit server modals * fix: qa * fix: security * fix: devin flags * fix: lint * chore: change file to break build cache * fix: admon * fix: import path stuff * feat: qa * fix: fmt fmt idiot --------- Signed-off-by: Calum H. <calum@modrinth.com>
92 lines
2.3 KiB
Vue
92 lines
2.3 KiB
Vue
<template>
|
|
<div
|
|
class="experimental-styles-within relative mx-auto mb-6 flex min-h-screen w-full max-w-[1280px] flex-col px-6"
|
|
>
|
|
<h1>Moderation</h1>
|
|
<NavTabs :links="moderationLinks" class="mb-4 hidden sm:flex" />
|
|
<div class="mb-4 sm:hidden">
|
|
<Chips
|
|
v-model="selectedChip"
|
|
:items="mobileNavOptions"
|
|
:never-empty="true"
|
|
@change="navigateToPage"
|
|
/>
|
|
</div>
|
|
<NuxtPage />
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { FolderIcon, ReportIcon, ShieldCheckIcon } from '@modrinth/assets'
|
|
import { Chips, defineMessages, NavTabs, useVIntl } from '@modrinth/ui'
|
|
|
|
definePageMeta({
|
|
middleware: 'auth',
|
|
})
|
|
|
|
useSeoMeta({
|
|
robots: 'noindex',
|
|
})
|
|
|
|
const { formatMessage } = useVIntl()
|
|
const route = useRoute()
|
|
const router = useRouter()
|
|
|
|
const messages = defineMessages({
|
|
projectsTitle: {
|
|
id: 'moderation.page.projects',
|
|
defaultMessage: 'Projects',
|
|
},
|
|
technicalReviewTitle: {
|
|
id: 'moderation.page.technicalReview',
|
|
defaultMessage: 'Technical Review',
|
|
},
|
|
reportsTitle: {
|
|
id: 'moderation.page.reports',
|
|
defaultMessage: 'Reports',
|
|
},
|
|
})
|
|
|
|
const moderationLinks = [
|
|
{ label: formatMessage(messages.projectsTitle), href: '/moderation', icon: FolderIcon },
|
|
{
|
|
label: formatMessage(messages.technicalReviewTitle),
|
|
href: '/moderation/technical-review',
|
|
icon: ShieldCheckIcon,
|
|
},
|
|
{ label: formatMessage(messages.reportsTitle), href: '/moderation/reports', icon: ReportIcon },
|
|
]
|
|
|
|
const mobileNavOptions = [
|
|
formatMessage(messages.projectsTitle),
|
|
formatMessage(messages.technicalReviewTitle),
|
|
formatMessage(messages.reportsTitle),
|
|
]
|
|
|
|
const selectedChip = computed({
|
|
get() {
|
|
const path = route.path
|
|
if (path === '/moderation/technical-review') {
|
|
return formatMessage(messages.technicalReviewTitle)
|
|
} else if (path.startsWith('/moderation/reports/')) {
|
|
return formatMessage(messages.reportsTitle)
|
|
} else {
|
|
return formatMessage(messages.projectsTitle)
|
|
}
|
|
},
|
|
set(value: string) {
|
|
navigateToPage(value)
|
|
},
|
|
})
|
|
|
|
function navigateToPage(selectedOption: string) {
|
|
if (selectedOption === formatMessage(messages.technicalReviewTitle)) {
|
|
router.push('/moderation/technical-review')
|
|
} else if (selectedOption === formatMessage(messages.reportsTitle)) {
|
|
router.push('/moderation/reports')
|
|
} else {
|
|
router.push('/moderation')
|
|
}
|
|
}
|
|
</script>
|