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