mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 17:54:32 +08:00
支持多语言英文
This commit is contained in:
@@ -1,14 +1,5 @@
|
||||
import {
|
||||
FormOutlined,
|
||||
FieldTimeOutlined,
|
||||
DiffOutlined,
|
||||
SettingOutlined,
|
||||
CodeOutlined,
|
||||
FolderOutlined,
|
||||
RadiusSettingOutlined,
|
||||
ControlOutlined,
|
||||
ContainerOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import intl from 'react-intl-universal';
|
||||
import { SettingOutlined } from '@ant-design/icons';
|
||||
import IconFont from '@/components/iconfont';
|
||||
import { BasicLayoutProps } from '@ant-design/pro-layout';
|
||||
|
||||
@@ -16,74 +7,74 @@ export default {
|
||||
route: {
|
||||
routes: [
|
||||
{
|
||||
name: '登录',
|
||||
name: intl.get('登录'),
|
||||
path: '/login',
|
||||
hideInMenu: true,
|
||||
component: '@/pages/login/index',
|
||||
},
|
||||
{
|
||||
name: '初始化',
|
||||
name: intl.get('初始化'),
|
||||
path: '/initialization',
|
||||
hideInMenu: true,
|
||||
component: '@/pages/initialization/index',
|
||||
},
|
||||
{
|
||||
name: '错误',
|
||||
name: intl.get('错误'),
|
||||
path: '/error',
|
||||
hideInMenu: true,
|
||||
component: '@/pages/error/index',
|
||||
},
|
||||
{
|
||||
path: '/crontab',
|
||||
name: '定时任务',
|
||||
name: intl.get('定时任务'),
|
||||
icon: <IconFont type="ql-icon-crontab" />,
|
||||
component: '@/pages/crontab/index',
|
||||
},
|
||||
{
|
||||
path: '/subscription',
|
||||
name: '订阅管理',
|
||||
name: intl.get('订阅管理'),
|
||||
icon: <IconFont type="ql-icon-subs" />,
|
||||
component: '@/pages/subscription/index',
|
||||
},
|
||||
{
|
||||
path: '/env',
|
||||
name: '环境变量',
|
||||
name: intl.get('环境变量'),
|
||||
icon: <IconFont type="ql-icon-env" />,
|
||||
component: '@/pages/env/index',
|
||||
},
|
||||
{
|
||||
path: '/config',
|
||||
name: '配置文件',
|
||||
name: intl.get('配置文件'),
|
||||
icon: <IconFont type="ql-icon-config" />,
|
||||
component: '@/pages/config/index',
|
||||
},
|
||||
{
|
||||
path: '/script',
|
||||
name: '脚本管理',
|
||||
name: intl.get('脚本管理'),
|
||||
icon: <IconFont type="ql-icon-script" />,
|
||||
component: '@/pages/script/index',
|
||||
},
|
||||
{
|
||||
path: '/dependence',
|
||||
name: '依赖管理',
|
||||
name: intl.get('依赖管理'),
|
||||
icon: <IconFont type="ql-icon-dependence" />,
|
||||
component: '@/pages/dependence/index',
|
||||
},
|
||||
{
|
||||
path: '/log',
|
||||
name: '日志管理',
|
||||
name: intl.get('日志管理'),
|
||||
icon: <IconFont type="ql-icon-log" />,
|
||||
component: '@/pages/log/index',
|
||||
},
|
||||
{
|
||||
path: '/diff',
|
||||
name: '对比工具',
|
||||
name: intl.get('对比工具'),
|
||||
icon: <IconFont type="ql-icon-diff" />,
|
||||
component: '@/pages/diff/index',
|
||||
},
|
||||
{
|
||||
path: '/setting',
|
||||
name: '系统设置',
|
||||
name: intl.get('系统设置'),
|
||||
icon: <SettingOutlined />,
|
||||
component: '@/pages/password/index',
|
||||
},
|
||||
|
||||
@@ -332,6 +332,8 @@ select:-webkit-autofill:focus {
|
||||
}
|
||||
|
||||
.ant-pro-sider-logo {
|
||||
padding-inline: 8px !important;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
height: 32px;
|
||||
|
||||
+11
-5
@@ -1,3 +1,4 @@
|
||||
import intl from 'react-intl-universal';
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import ProLayout, { PageLoading } from '@ant-design/pro-layout';
|
||||
import * as DarkReader from '@umijs/ssr-darkreader';
|
||||
@@ -264,7 +265,7 @@ export default function () {
|
||||
const menu: MenuProps = {
|
||||
items: [
|
||||
{
|
||||
label: '退出登录',
|
||||
label: intl.get('退出登录'),
|
||||
className: 'side-menu-user-drop-menu',
|
||||
onClick: logout,
|
||||
key: 'logout',
|
||||
@@ -283,7 +284,7 @@ export default function () {
|
||||
<>
|
||||
<Image preview={false} src="https://qn.whyour.cn/logo.png" />
|
||||
<div className="title">
|
||||
<span className="title">青龙</span>
|
||||
<span className="title">{intl.get('青龙')}</span>
|
||||
<a
|
||||
href={systemInfo?.changeLogLink}
|
||||
target="_blank"
|
||||
@@ -293,7 +294,11 @@ export default function () {
|
||||
}}
|
||||
>
|
||||
<Tooltip
|
||||
title={systemInfo?.branch === 'develop' ? '开发版' : '正式版'}
|
||||
title={
|
||||
systemInfo?.branch === 'develop'
|
||||
? intl.get('开发版')
|
||||
: intl.get('正式版')
|
||||
}
|
||||
>
|
||||
<Badge size="small" dot={systemInfo?.branch === 'develop'}>
|
||||
<span
|
||||
@@ -326,8 +331,9 @@ export default function () {
|
||||
}}
|
||||
pageTitleRender={(props, pageName, info) => {
|
||||
const title =
|
||||
(config.documentTitleMap as any)[location.pathname] || '未找到';
|
||||
return `${title} - 青龙`;
|
||||
(config.documentTitleMap as any)[location.pathname] ||
|
||||
intl.get('未找到');
|
||||
return `${title} - ${intl.get('青龙')}`;
|
||||
}}
|
||||
onCollapse={setCollapsed}
|
||||
collapsed={collapsed}
|
||||
|
||||
Reference in New Issue
Block a user