mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 12:05:53 +00:00
feat: server play frontend draft
This commit is contained in:
@@ -58,6 +58,7 @@ export const DEFAULT_FEATURE_FLAGS = validateValues({
|
||||
alwaysShowVersionDevInfo: false,
|
||||
advancedFiltersCollapsed: true,
|
||||
dismissedPhotosensitivityFilterWarning: false,
|
||||
ServerPlayFrontend: false,
|
||||
} as const)
|
||||
|
||||
export type FeatureFlag = keyof typeof DEFAULT_FEATURE_FLAGS
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
:resolve-viewer="resolveViewer"
|
||||
:show-copy-id-action="flags.developerMode"
|
||||
:show-advanced-debug-info="flags.advancedDebugInfo"
|
||||
:show-play-tab="flags.ServerPlayFrontend"
|
||||
:stripe-publishable-key="config.public.stripePublishableKey as string"
|
||||
:site-url="config.public.siteUrl as string"
|
||||
:products="products"
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
import { injectModrinthServerContext, ServersManagePlayPage } from '@modrinth/ui'
|
||||
|
||||
const { server } = injectModrinthServerContext()
|
||||
const flags = useFeatureFlags()
|
||||
const route = useNativeRoute()
|
||||
|
||||
if (!flags.value.ServerPlayFrontend) {
|
||||
await navigateTo(`/hosting/manage/${String(route.params.id)}`, { replace: true })
|
||||
}
|
||||
|
||||
useHead({
|
||||
title: computed(() => `Play - ${server.value?.name ?? 'Server'} - Modrinth`),
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ServersManagePlayPage />
|
||||
</template>
|
||||
Reference in New Issue
Block a user