refactor: 修改模块配置,统一标题内容
This commit is contained in:
@@ -2,14 +2,32 @@
|
||||
|
||||
import { IS_DEV } from './env';
|
||||
|
||||
/** 启用“MINECRAFT 联动控制”模块 */
|
||||
export const ENABLE_MC_CTRL_MODULE = IS_DEV;
|
||||
/** 启用模块 */
|
||||
export const ABOUT_MODULE_ENABLED = true;
|
||||
|
||||
/** 启用“导航”模块 */
|
||||
export const ENABLE_NAV_MODULE = IS_DEV;
|
||||
/** 模块标题 */
|
||||
export const ABOUT_MODULE_TITLE = '关于';
|
||||
|
||||
/** 启用“搜索”模块 */
|
||||
export const ENABLE_SEARCH_MODULE = true;
|
||||
/** 启用模块 */
|
||||
export const MC_CTRL_MODULE_ENABLED = IS_DEV;
|
||||
|
||||
/** 启用“工具箱”模块 */
|
||||
export const ENABLE_TOOLBOX_MODULE = IS_DEV;
|
||||
/** 模块标题 */
|
||||
export const MC_CTRL_MODULE_TITLE = 'MINECRAFT 联动控制';
|
||||
|
||||
/** 启用模块 */
|
||||
export const NAV_MODULE_ENABLED = IS_DEV;
|
||||
|
||||
/** 模块标题 */
|
||||
export const NAV_MODULE_TITLE = '网址导航';
|
||||
|
||||
/** 启用模块 */
|
||||
export const SEARCH_MODULE_ENABLED = true;
|
||||
|
||||
/** 模块标题 */
|
||||
export const SEARCH_MODULE_TITLE = '搜索';
|
||||
|
||||
/** 启用模块 */
|
||||
export const TOOLBOX_MODULE_ENABLED = IS_DEV;
|
||||
|
||||
/** 模块标题 */
|
||||
export const TOOLBOX_MODULE_TITLE = '工具箱';
|
||||
|
@@ -8,10 +8,16 @@ import {
|
||||
} from '@/assets/js/utils';
|
||||
|
||||
import {
|
||||
ENABLE_MC_CTRL_MODULE,
|
||||
ENABLE_NAV_MODULE,
|
||||
ENABLE_SEARCH_MODULE,
|
||||
ENABLE_TOOLBOX_MODULE,
|
||||
ABOUT_MODULE_ENABLED,
|
||||
ABOUT_MODULE_TITLE,
|
||||
MC_CTRL_MODULE_ENABLED,
|
||||
MC_CTRL_MODULE_TITLE,
|
||||
NAV_MODULE_ENABLED,
|
||||
NAV_MODULE_TITLE,
|
||||
SEARCH_MODULE_ENABLED,
|
||||
SEARCH_MODULE_TITLE,
|
||||
TOOLBOX_MODULE_ENABLED,
|
||||
TOOLBOX_MODULE_TITLE,
|
||||
} from '@/config/modules';
|
||||
|
||||
import AboutView from '@/views/AboutView/AboutView.vue';
|
||||
@@ -36,8 +42,8 @@ export const router = createRouter({
|
||||
component: () => import('@/views/SearchView/SearchView.vue'),
|
||||
meta: {
|
||||
iconClass: 'mdi mdi-magnify',
|
||||
showInAside: ENABLE_SEARCH_MODULE,
|
||||
title: '搜索',
|
||||
showInAside: SEARCH_MODULE_ENABLED,
|
||||
title: SEARCH_MODULE_TITLE,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -46,8 +52,8 @@ export const router = createRouter({
|
||||
component: () => import('@/views/NavView/NavView.vue'),
|
||||
meta: {
|
||||
iconClass: 'mdi mdi-compass',
|
||||
showInAside: ENABLE_NAV_MODULE,
|
||||
title: '导航',
|
||||
showInAside: NAV_MODULE_ENABLED,
|
||||
title: NAV_MODULE_TITLE,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -56,8 +62,8 @@ export const router = createRouter({
|
||||
component: () => import('@/views/ToolboxView/ToolboxView.vue'),
|
||||
meta: {
|
||||
iconClass: 'mdi mdi-tools',
|
||||
showInAside: ENABLE_TOOLBOX_MODULE,
|
||||
title: '工具箱',
|
||||
showInAside: TOOLBOX_MODULE_ENABLED,
|
||||
title: TOOLBOX_MODULE_TITLE,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -66,8 +72,8 @@ export const router = createRouter({
|
||||
component: () => import('@/views/MinecraftCtrlView/MinecraftCtrlView.vue'),
|
||||
meta: {
|
||||
iconClass: 'mdi mdi-gamepad',
|
||||
showInAside: ENABLE_MC_CTRL_MODULE,
|
||||
title: 'MINECRAFT 联动控制',
|
||||
showInAside: MC_CTRL_MODULE_ENABLED,
|
||||
title: MC_CTRL_MODULE_TITLE,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -76,8 +82,8 @@ export const router = createRouter({
|
||||
component: AboutView,
|
||||
meta: {
|
||||
iconClass: 'mdi mdi-information',
|
||||
showInAside: true,
|
||||
title: '关于',
|
||||
showInAside: ABOUT_MODULE_ENABLED,
|
||||
title: ABOUT_MODULE_TITLE,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="about-view flex-col">
|
||||
<div class="app-view-header">
|
||||
<span>关于</span>
|
||||
<span>{{ ABOUT_MODULE_TITLE }}</span>
|
||||
</div>
|
||||
<div class="app-view-content with-margin">
|
||||
|
||||
@@ -34,8 +34,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { version } from '@package-json';
|
||||
import { NA, NH4, NLi, NP, NUl } from 'naive-ui';
|
||||
import { version } from '@package-json';
|
||||
import { ABOUT_MODULE_TITLE } from '@/config/modules';
|
||||
|
||||
/** Gitee 地址 */
|
||||
const URL_GITEE = 'https://gitee.com/frost-craft/frost-navigation';
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="search-view flex-col">
|
||||
<div class="app-view-header">
|
||||
<span>搜索</span>
|
||||
<span>{{ SEARCH_MODULE_TITLE }}</span>
|
||||
</div>
|
||||
<div class="app-view-content is-transparent">
|
||||
|
||||
@@ -72,6 +72,10 @@ import {
|
||||
openSearchResult,
|
||||
searchEngineList, searchEngineName, searchKeyword,
|
||||
} from '@/assets/js/search-engine';
|
||||
|
||||
import {
|
||||
SEARCH_MODULE_TITLE,
|
||||
} from '@/config/modules';
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
Reference in New Issue
Block a user