forked from AxTps/Starlight_Lancher
fix:修复一个引用错误
将原来的调用多人游戏页函数移除
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
import { Avatar, defineMessages, NewModal, useVIntl } from '@modrinth/ui'
|
import { Avatar, defineMessages, NewModal, useVIntl } from '@modrinth/ui'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,13 @@
|
|||||||
"name": "addre98",
|
"name": "addre98",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/111131309?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/u/111131309?v=4&s=96",
|
||||||
"url": "https://github.com/addre98",
|
"url": "https://github.com/addre98",
|
||||||
"contributions": 489
|
"contributions": 504
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CodeZhangBorui",
|
||||||
|
"avatarUrl": "https://avatars.githubusercontent.com/u/61909157?v=4&s=96",
|
||||||
|
"url": "https://github.com/CodeZhangBorui",
|
||||||
|
"contributions": 444
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "IMB11",
|
"name": "IMB11",
|
||||||
@ -27,13 +33,7 @@
|
|||||||
"name": "Mystic-Stars",
|
"name": "Mystic-Stars",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/97295993?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/u/97295993?v=4&s=96",
|
||||||
"url": "https://github.com/Mystic-Stars",
|
"url": "https://github.com/Mystic-Stars",
|
||||||
"contributions": 306
|
"contributions": 313
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "CodeZhangBorui",
|
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/61909157?v=4&s=96",
|
|
||||||
"url": "https://github.com/CodeZhangBorui",
|
|
||||||
"contributions": 261
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ItzJerry317",
|
"name": "ItzJerry317",
|
||||||
@ -75,7 +75,7 @@
|
|||||||
"name": "cyf112233",
|
"name": "cyf112233",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/122795125?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/u/122795125?v=4&s=96",
|
||||||
"url": "https://github.com/cyf112233",
|
"url": "https://github.com/cyf112233",
|
||||||
"contributions": 106
|
"contributions": 113
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fetchfern",
|
"name": "fetchfern",
|
||||||
@ -99,7 +99,7 @@
|
|||||||
"name": "github-actions[bot]",
|
"name": "github-actions[bot]",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/in/15368?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/in/15368?v=4&s=96",
|
||||||
"url": "https://github.com/apps/github-actions",
|
"url": "https://github.com/apps/github-actions",
|
||||||
"contributions": 67
|
"contributions": 69
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Mysterious-Dev",
|
"name": "Mysterious-Dev",
|
||||||
@ -143,6 +143,12 @@
|
|||||||
"url": "https://github.com/clrxbl",
|
"url": "https://github.com/clrxbl",
|
||||||
"contributions": 43
|
"contributions": 43
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "xinvxueyuan",
|
||||||
|
"avatarUrl": "https://avatars.githubusercontent.com/u/149921651?v=4&s=96",
|
||||||
|
"url": "https://github.com/xinvxueyuan",
|
||||||
|
"contributions": 42
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "piprett",
|
"name": "piprett",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/49862976?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/u/49862976?v=4&s=96",
|
||||||
@ -251,6 +257,12 @@
|
|||||||
"url": "https://github.com/bcmRayCrazy-coder",
|
"url": "https://github.com/bcmRayCrazy-coder",
|
||||||
"contributions": 14
|
"contributions": 14
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "HappyDIY",
|
||||||
|
"avatarUrl": "https://avatars.githubusercontent.com/u/87058180?v=4&s=96",
|
||||||
|
"url": "https://github.com/HappyDIY",
|
||||||
|
"contributions": 13
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Nitrrine",
|
"name": "Nitrrine",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/43351072?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/u/43351072?v=4&s=96",
|
||||||
@ -281,6 +293,12 @@
|
|||||||
"url": "https://github.com/Sychic",
|
"url": "https://github.com/Sychic",
|
||||||
"contributions": 11
|
"contributions": 11
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ijay11111",
|
||||||
|
"avatarUrl": "https://avatars.githubusercontent.com/u/315280651?v=4&s=96",
|
||||||
|
"url": "https://github.com/ijay11111",
|
||||||
|
"contributions": 10
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "jadelily18",
|
"name": "jadelily18",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/74706690?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/u/74706690?v=4&s=96",
|
||||||
@ -317,6 +335,12 @@
|
|||||||
"url": "https://github.com/isXander",
|
"url": "https://github.com/isXander",
|
||||||
"contributions": 6
|
"contributions": 6
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "LSGtorch",
|
||||||
|
"avatarUrl": "https://avatars.githubusercontent.com/u/115522101?v=4&s=96",
|
||||||
|
"url": "https://github.com/LSGtorch",
|
||||||
|
"contributions": 6
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "lumiscosity",
|
"name": "lumiscosity",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/26834471?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/u/26834471?v=4&s=96",
|
||||||
@ -359,12 +383,6 @@
|
|||||||
"url": "https://github.com/hiruocha",
|
"url": "https://github.com/hiruocha",
|
||||||
"contributions": 5
|
"contributions": 5
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "ijay11111",
|
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/315280651?v=4&s=96",
|
|
||||||
"url": "https://github.com/ijay11111",
|
|
||||||
"contributions": 5
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "IsQuyet",
|
"name": "IsQuyet",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/223657322?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/u/223657322?v=4&s=96",
|
||||||
@ -383,6 +401,12 @@
|
|||||||
"url": "https://github.com/khazoda",
|
"url": "https://github.com/khazoda",
|
||||||
"contributions": 5
|
"contributions": 5
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "leipishu",
|
||||||
|
"avatarUrl": "https://avatars.githubusercontent.com/u/177109629?v=4&s=96",
|
||||||
|
"url": "https://github.com/leipishu",
|
||||||
|
"contributions": 5
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Minenash",
|
"name": "Minenash",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/12193049?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/u/12193049?v=4&s=96",
|
||||||
@ -443,6 +467,12 @@
|
|||||||
"url": "https://github.com/4drian3d",
|
"url": "https://github.com/4drian3d",
|
||||||
"contributions": 3
|
"contributions": 3
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Again154922",
|
||||||
|
"avatarUrl": "https://avatars.githubusercontent.com/u/194348327?v=4&s=96",
|
||||||
|
"url": "https://github.com/Again154922",
|
||||||
|
"contributions": 3
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Awakened-Redstone",
|
"name": "Awakened-Redstone",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/40528665?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/u/40528665?v=4&s=96",
|
||||||
@ -503,12 +533,6 @@
|
|||||||
"url": "https://github.com/aervxa",
|
"url": "https://github.com/aervxa",
|
||||||
"contributions": 2
|
"contributions": 2
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Again154922",
|
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/194348327?v=4&s=96",
|
|
||||||
"url": "https://github.com/Again154922",
|
|
||||||
"contributions": 2
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "amueller0",
|
"name": "amueller0",
|
||||||
"avatarUrl": "https://avatars.githubusercontent.com/u/160637865?v=4&s=96",
|
"avatarUrl": "https://avatars.githubusercontent.com/u/160637865?v=4&s=96",
|
||||||
|
|||||||
@ -386,7 +386,6 @@
|
|||||||
@browse-modpacks="() => {}"
|
@browse-modpacks="() => {}"
|
||||||
@create="serverInstallContent.handleServerModpackFlowCreate"
|
@create="serverInstallContent.handleServerModpackFlowCreate"
|
||||||
/>
|
/>
|
||||||
<CreateModpackServerModal ref="modpackServerModal" @created="handleModpackServerCreated" />
|
|
||||||
<ScrollToTopButton />
|
<ScrollToTopButton />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -451,7 +450,6 @@ import { useRoute, useRouter } from 'vue-router'
|
|||||||
|
|
||||||
import { SwapIcon } from '@/assets/icons/index.js'
|
import { SwapIcon } from '@/assets/icons/index.js'
|
||||||
import BrowseInstanceSelector from '@/components/browse/BrowseInstanceSelector.vue'
|
import BrowseInstanceSelector from '@/components/browse/BrowseInstanceSelector.vue'
|
||||||
import CreateModpackServerModal from '@/components/multiplayer/servers/modpack/CreateModpackServerModal.vue'
|
|
||||||
import ContextMenu from '@/components/ui/ContextMenu.vue'
|
import ContextMenu from '@/components/ui/ContextMenu.vue'
|
||||||
import InstanceIndicator from '@/components/ui/InstanceIndicator.vue'
|
import InstanceIndicator from '@/components/ui/InstanceIndicator.vue'
|
||||||
import {
|
import {
|
||||||
@ -647,39 +645,10 @@ const favoriteSaved = computed(() =>
|
|||||||
const serverCapableModpack = computed(
|
const serverCapableModpack = computed(
|
||||||
() => data.value?.project_type === 'modpack' && data.value.server_side !== 'unsupported',
|
() => data.value?.project_type === 'modpack' && data.value.server_side !== 'unsupported',
|
||||||
)
|
)
|
||||||
const modpackServerModal = ref()
|
|
||||||
|
|
||||||
async function openModpackServerFlow(targetVersion) {
|
async function openModpackServerFlow() {
|
||||||
if (!data.value) return
|
// 服务器创建弹窗(CreateModpackServerModal)已在上游移除,此流程暂不可用。
|
||||||
// The version handed in by the UI can be an incomplete object that is missing
|
// 如需恢复:重新实现该组件,并在此处调用其 show() 方法。
|
||||||
// `id`/`loaders`/`game_versions`/`files`. Re-fetch a complete version from the
|
|
||||||
// API so the modpack server flow has the data it needs (otherwise it misdetects
|
|
||||||
// the loader as Vanilla and fails with "No server launcher available").
|
|
||||||
let version = targetVersion
|
|
||||||
const isComplete = (v) => !!v && Array.isArray(v.game_versions) && Array.isArray(v.files)
|
|
||||||
if (!isComplete(version)) {
|
|
||||||
const versionId = version?.id ?? data.value.versions?.[0]
|
|
||||||
version = versionId ? await get_version(versionId, 'bypass').catch(() => null) : null
|
|
||||||
}
|
|
||||||
if (!version) return
|
|
||||||
modpackServerModal.value?.show(data.value, version)
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleModpackServerCreated(serverId) {
|
|
||||||
popupNotificationManager.addPopupNotification({
|
|
||||||
title: formatMessage(messages.serverCreated),
|
|
||||||
text: formatMessage(messages.serverCreatedDescription, { name: data.value?.title ?? '' }),
|
|
||||||
type: 'success',
|
|
||||||
buttons: [
|
|
||||||
{
|
|
||||||
label: formatMessage(messages.openServer),
|
|
||||||
color: 'brand',
|
|
||||||
action: () => {
|
|
||||||
void router.push(`/multiplayer/servers/${encodeURIComponent(serverId)}`)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function toggleFavorite() {
|
async function toggleFavorite() {
|
||||||
|
|||||||
Reference in New Issue
Block a user