This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
374 additions
and
634 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ Copyright (C) 2022 MCSManager <[email protected]> | |
--> | ||
<template> | ||
<el-container> | ||
<!-- 管理用户 手机屏幕菜单栏 --> | ||
<!-- Manage users phone screen menu bar --> | ||
<el-drawer | ||
v-if="isTopPermission" | ||
size="240" | ||
|
@@ -16,7 +16,7 @@ Copyright (C) 2022 MCSManager <[email protected]> | |
<Aside /> | ||
</el-aside> | ||
</el-drawer> | ||
<!-- 管理用户 电脑屏幕菜单栏 --> | ||
<!-- Manage users Computer screen menu bar --> | ||
<div v-if="isTopPermission" id="app-menu" class="only-pc-display"> | ||
<el-aside width="240px" style="height: 100%"> | ||
<Aside /> | ||
|
@@ -29,7 +29,7 @@ Copyright (C) 2022 MCSManager <[email protected]> | |
<Header v-bind:breadcrumbsList="breadCrumbs" :aside="toAside" /> | ||
</el-col> | ||
</el-row> | ||
<div v-loading="loading" style="min-height:50px"> | ||
<div v-loading="loading" style="min-height: 50px"> | ||
<router-view v-if="!loading"></router-view> | ||
</div> | ||
</el-main> | ||
|
@@ -50,7 +50,7 @@ export default { | |
components: { Aside, Header }, | ||
data: function () { | ||
return { | ||
loading:true, | ||
loading: true, | ||
breadCrumbs: [], | ||
mode: 1, | ||
drawer: false | ||
|
@@ -82,7 +82,7 @@ export default { | |
}, | ||
async beforeCreate() { | ||
try { | ||
// 获取当前面板状态信息 | ||
// Get current panel status information | ||
const statusInfo = await getPanelStatus(); | ||
if (statusInfo?.isInstall === false) { | ||
return router.push({ path: "/install" }); | ||
|
@@ -92,22 +92,22 @@ export default { | |
} else { | ||
this.$i18n.locale = "en_us"; | ||
} | ||
// 第一次刷新后,尝试获取一次用户数据 | ||
// 如果失败,则导航至 / 视图进一步决定跳转路由 | ||
// After the first refresh, try to get user data once | ||
// If it fails, navigate to / view to further decide the jump route | ||
|
||
await setupUserInfo(); | ||
const userInfo = this.$store.state.userInfo; | ||
if (!userInfo || !userInfo.uuid) throw new Error("userInfo.uuid is null"); | ||
} catch (error) { | ||
router.push({ path: "/" }); | ||
}finally{ | ||
this.loading = false | ||
} finally { | ||
this.loading = false; | ||
} | ||
}, | ||
async mounted() { | ||
router.beforeEach((to, from, next) => { | ||
console.log("Router:", from, "->", to); | ||
// 设置在线信息全局状态 | ||
// Set the global status of online information | ||
this.$store.commit( | ||
"setOnlineNotice", | ||
window.onlineMCSManagerNotice ? window.onlineMCSManagerNotice() : null | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (C) 2022 MCSManager <[email protected]> | ||
|
||
import i18n from "../i18n" | ||
|
||
export default function (app) { | ||
app.directive("iszh", { | ||
// eslint-disable-next-line no-unused-vars | ||
mounted(el, binding, vnode) { | ||
const language = i18n.global.locale | ||
if (language != "zh_cn") el.style.display = 'none' | ||
} | ||
}) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
// Copyright (C) 2022 MCSManager <[email protected]> | ||
|
||
// 此文件为程序入口文件 | ||
|
||
import { createApp } from "vue"; | ||
import i18n from "./i18n" | ||
import elementPlus from "element-plus"; | ||
|
@@ -16,23 +14,21 @@ import "../assets/css/action.css"; | |
|
||
import App from "./App.vue"; | ||
import "./service/protocol"; | ||
import directive from "./directive" | ||
|
||
|
||
|
||
const app = createApp(App); | ||
|
||
// Vuex https://next.vuex.vuejs.org/zh/ | ||
// Vuex | ||
import store from "./store"; | ||
app.use(store); | ||
app.use(i18n) | ||
|
||
app.directive("iszh", { | ||
// eslint-disable-next-line no-unused-vars | ||
mounted(el, binding, vnode) { | ||
const language = i18n.global.locale | ||
if (language != "zh_cn") el.style.display = 'none' | ||
} | ||
}) | ||
|
||
// custom directive | ||
directive(app) | ||
|
||
|
||
// Vue-Router | ||
import router from "./router"; | ||
|
@@ -41,9 +37,8 @@ app.use(router); | |
// Install element-plus | ||
app.use(elementPlus); | ||
|
||
// 全局组件 | ||
// global component | ||
import ItemGroup from "../components/ItemGroup"; | ||
|
||
app.component("ItemGroup", ItemGroup); | ||
app.mount("#app"); | ||
|
||
app.mount("#app"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Copyright (C) 2022 MCSManager <[email protected]> | ||
|
||
export const TYPE_UNIVERSAL = "universal"; // 通用输入输出程序 | ||
export const TYPE_WEB_SHELL = "universal/web_shell"; // WebShell 程序 | ||
export const TYPE_UNIVERSAL = "universal"; | ||
export const TYPE_WEB_SHELL = "universal/web_shell"; | ||
export const TYPE_MINECRAFT_MCDR = "universal/mcdr"; | ||
|
||
export const TYPE_MINECRAFT_JAVA = "minecraft/java"; | ||
|
@@ -19,7 +19,7 @@ export const TYPE_MINECRAFT_BDS = "minecraft/bedrock/bds"; | |
export const TYPE_MINECRAFT_NUKKIT = "minecraft/bedrock/nukkit"; | ||
export const TYPE_STEAM_SERVER_UNIVERSAL = "steam/universal"; | ||
|
||
// 前端可选择类型列表 | ||
// Front-end selectable type list | ||
const INSTANCE_TYPE_TRANSLATION = {}; | ||
INSTANCE_TYPE_TRANSLATION[TYPE_UNIVERSAL] = "General console program"; | ||
INSTANCE_TYPE_TRANSLATION[TYPE_STEAM_SERVER_UNIVERSAL] = "Steam Game Server"; | ||
|
@@ -37,7 +37,7 @@ INSTANCE_TYPE_TRANSLATION[TYPE_MINECRAFT_GEYSER] = "MC Geyser"; | |
INSTANCE_TYPE_TRANSLATION[TYPE_MINECRAFT_MCDR] = "MC MCDR"; | ||
INSTANCE_TYPE_TRANSLATION[TYPE_WEB_SHELL] = "Web Shell"; | ||
|
||
// 不同类型的具体配置文件 | ||
// Different types of specific configuration files | ||
const INSTANCE_TYPE_DEF_CONFIG = { | ||
[TYPE_MINECRAFT_BUNGEECORD]: { | ||
stopCommand: "end" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
// Copyright (C) 2022 MCSManager <[email protected]> | ||
|
||
// This file is only for Chinese users, Added Chinese explanation to the configuration file | ||
// 此文件仅用于中国用户,其作用是为配置文件新增中文解释 | ||
|
||
import { | ||
TYPE_MINECRAFT_JAVA, | ||
TYPE_MINECRAFT_BDS, | ||
|
@@ -39,9 +42,9 @@ export const INSTANCE_CONFIGS = [ | |
// 配置文件中文解释 | ||
info: `Minecraft 服务端极其重要的配置文件,几乎绝大部分常用配置(端口,人数,视距等)均在此文件中进行编辑`, | ||
// 配置文件适配模块作者名 | ||
author: "Suwings", | ||
author: "Unitwk", | ||
// 配置文件 Github 地址(只能放置 Github 地址) | ||
github: "https://github.com/Suwings", | ||
github: "https://github.com/Unitwk", | ||
// 在哪些服务端类型下此配置文件可见 | ||
category: [ | ||
TYPE_MINECRAFT_SPIGOT, | ||
|
@@ -76,8 +79,8 @@ export const INSTANCE_CONFIGS = [ | |
redirect: "bukkit/spigot.yml", | ||
type: "yml", | ||
info: "Spigot 配置文件,能够进一步的控制服务器的行为和具体参数,一些更为高级的限制都在此配置文件中", | ||
author: "Suwings", | ||
github: "https://github.com/Suwings", | ||
author: "Unitwk", | ||
github: "https://github.com/Unitwk", | ||
category: [ | ||
TYPE_MINECRAFT_SPIGOT, | ||
TYPE_MINECRAFT_PAPER, | ||
|
@@ -91,8 +94,8 @@ export const INSTANCE_CONFIGS = [ | |
// redirect: "bukkit/permissions.yml", | ||
// type: "yml", | ||
// info: "基本权限配置文件,一般情况无需多过改动", | ||
// author: "Suwings", | ||
// github: "https://github.com/Suwings", | ||
// author: "Unitwk", | ||
// github: "https://github.com/Unitwk", | ||
// category: [TYPE_MINECRAFT_SPIGOT, TYPE_MINECRAFT_PAPER, TYPE_MINECRAFT_JAVA, TYPE_MINECRAFT_BUKKIT] | ||
// }, | ||
// { | ||
|
@@ -101,8 +104,8 @@ export const INSTANCE_CONFIGS = [ | |
// redirect: "bukkit/commands.yml", | ||
// type: "yml", | ||
// info: "Bukkit 原始命令文件,一般情况无需改动", | ||
// author: "Suwings", | ||
// github: "https://github.com/Suwings", | ||
// author: "Unitwk", | ||
// github: "https://github.com/Unitwk", | ||
// category: [TYPE_MINECRAFT_SPIGOT, TYPE_MINECRAFT_PAPER, TYPE_MINECRAFT_JAVA, TYPE_MINECRAFT_BUKKIT] | ||
// }, | ||
{ | ||
|
@@ -126,8 +129,8 @@ export const INSTANCE_CONFIGS = [ | |
// info: "服务器白名单", | ||
// path: "whitelist.json", | ||
// redirect: "bukkit/whitelist.json", | ||
// author: "Suwings", | ||
// github: "https://github.com/Suwings", | ||
// author: "Unitwk", | ||
// github: "https://github.com/Unitwk", | ||
// category: [TYPE_MINECRAFT_SPIGOT, TYPE_MINECRAFT_PAPER, TYPE_MINECRAFT_JAVA, TYPE_MINECRAFT_BUKKIT] | ||
// }, | ||
// { | ||
|
@@ -136,8 +139,8 @@ export const INSTANCE_CONFIGS = [ | |
// info: "服务器管理员列表", | ||
// path: "ops.json", | ||
// redirect: "bukkit/ops.json", | ||
// author: "Suwings", | ||
// github: "https://github.com/Suwings", | ||
// author: "Unitwk", | ||
// github: "https://github.com/Unitwk", | ||
// category: [TYPE_MINECRAFT_SPIGOT, TYPE_MINECRAFT_PAPER, TYPE_MINECRAFT_JAVA, TYPE_MINECRAFT_BUKKIT] | ||
// }, | ||
{ | ||
|
@@ -166,7 +169,7 @@ export const INSTANCE_CONFIGS = [ | |
redirect: "mohist/mohist.yml", | ||
type: "yml", | ||
info: "mohist.yml 服务端配置文件", | ||
author: "Suwings", | ||
author: "Unitwk", | ||
github: "https://github.com/LazyCreeper", | ||
category: [TYPE_MINECRAFT_JAVA, TYPE_MINECRAFT_MOHIST] | ||
}, | ||
|
Oops, something went wrong.