File tree Expand file tree Collapse file tree 8 files changed +2877
-4
lines changed
Expand file tree Collapse file tree 8 files changed +2877
-4
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ type Login struct {
2929 Captcha string `json:"captcha"`
3030 CaptchaID string `json:"captchaID"`
3131 AuthMethod string `json:"authMethod" validate:"required,oneof=jwt session"`
32- Language string `json:"language" validate:"required,oneof=zh en tw"`
32+ Language string `json:"language" validate:"required,oneof=zh en tw ru "`
3333}
3434
3535type MFALogin struct {
Original file line number Diff line number Diff line change @@ -75,7 +75,6 @@ func GetMsgByKey(key string) string {
7575 return content
7676}
7777
78- //go:embed lang/*
7978var fs embed.FS
8079var bundle * i18n.Bundle
8180
@@ -100,6 +99,7 @@ func Init() {
10099 _ , _ = bundle .LoadMessageFileFS (fs , "lang/zh-Hant.yaml" )
101100 _ , _ = bundle .LoadMessageFileFS (fs , "lang/fa.yaml" )
102101 _ , _ = bundle .LoadMessageFileFS (fs , "lang/pt.yaml" )
102+ _ , _ = bundle .LoadMessageFileFS (fs , "lang/ru.yaml" )
103103}
104104
105105func UseI18nForCmd (lang string ) {
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { createI18n } from 'vue-i18n';
22import zh from './modules/zh' ;
33import tw from './modules/tw' ;
44import en from './modules/en' ;
5+ import ru from './modules/ru' ;
56
67const i18n = createI18n ( {
78 legacy : false ,
@@ -12,6 +13,7 @@ const i18n = createI18n({
1213 zh,
1314 tw,
1415 en,
16+ ru,
1517 } ,
1618 warnHtmlMessage : false ,
1719} ) ;
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 11<template >
2- <el-row :gutter =" 10" >
2+ <el-row :gutter =" 10" class = " status-container " >
33 <el-col :xs =" 12" :sm =" 12" :md =" 6" :lg =" 6" :xl =" 6" align =" center" >
44 <el-popover placement =" bottom" :width =" loadWidth()" trigger =" hover" v-if =" chartsOption['cpu']" >
55 <div >
5252 </span >
5353 </el-col >
5454 <el-col :xs =" 12" :sm =" 12" :md =" 6" :lg =" 6" :xl =" 6" align =" center" >
55- <el-popover placement =" bottom" :width =" 160 " trigger =" hover" v-if =" chartsOption['memory']" >
55+ <el-popover placement =" bottom" :width =" 200 " trigger =" hover" v-if =" chartsOption['memory']" >
5656 <el-tag style =" font-weight : 500 " >{{ $t('home.mem') }}:</el-tag >
5757 <el-tag class =" tagClass" >{{ $t('home.total') }}: {{ computeSize(currentInfo.memoryTotal) }}</el-tag >
5858 <el-tag class =" tagClass" >{{ $t('home.used') }}: {{ computeSize(currentInfo.memoryUsed) }}</el-tag >
@@ -431,6 +431,39 @@ defineExpose({
431431 </script >
432432
433433<style scoped lang="scss">
434+ .status-container {
435+ :deep (.el-button ) {
436+ min-width : 180px ;
437+ padding : 8px 16px ;
438+ height : auto ;
439+ white-space : normal ;
440+ line-height : 1.5 ;
441+ text-align : left ;
442+ }
443+
444+ :deep(.el-tag ) {
445+ min-width : 180px ;
446+ padding : 8px 12px ;
447+ height : auto ;
448+ white-space : normal ;
449+ line-height : 1.5 ;
450+ margin : 4px ;
451+ text-align : left ;
452+ }
453+
454+ :deep(.el-button--primary ) {
455+ background-color : var (--el-color-primary );
456+ & .is-plain {
457+ background : var (--el-color-primary-light-9 );
458+ color : var (--el-color-primary );
459+ & :hover {
460+ background : var (--el-color-primary );
461+ color : white ;
462+ }
463+ }
464+ }
465+ }
466+
434467.cpuModeTag {
435468 justify-content : flex-start !important ;
436469 text-align : left !important ;
@@ -445,6 +478,10 @@ defineExpose({
445478}
446479.tagClass {
447480 margin-top : 3px ;
481+ min-width : 140px ;
482+ white-space : normal ;
483+ height : auto ;
484+ line-height : 1.5 ;
448485}
449486
450487.tagCPUClass {
@@ -460,6 +497,14 @@ defineExpose({
460497 margin-top : 28% ;
461498 font-size : 14px ;
462499}
500+
501+ .input-help {
502+ display : inline-block ;
503+ min-width : 120px ;
504+ white-space : normal ;
505+ line-height : 1.2 ;
506+ padding : 2px 4px ;
507+ }
463508.nameTag {
464509 margin-top : 3px ;
465510 height : auto ;
Original file line number Diff line number Diff line change 5555 <el-dropdown-item v-if =" globalStore.isIntl" command =" en" >
5656 English
5757 </el-dropdown-item >
58+ <el-dropdown-item v-if =" globalStore.isIntl" command =" ru" >
59+ Русский
60+ </el-dropdown-item >
5861 <el-dropdown-item command =" zh" >中文(简体)</el-dropdown-item >
5962 <el-dropdown-item command =" tw" >中文(繁體)</el-dropdown-item >
6063 <el-dropdown-item v-if =" !globalStore.isIntl" command =" en" >
6164 English
6265 </el-dropdown-item >
6366 </el-dropdown-menu >
67+ <el-dropdown-item v-if =" !globalStore.isIntl" command =" ru" >Русский</el-dropdown-item >
6468 </template >
6569 </el-dropdown >
6670 </div >
@@ -272,6 +276,8 @@ function handleCommand(command: string) {
272276 dropdownText .value = ' English' ;
273277 } else if (command === ' tw' ) {
274278 dropdownText .value = ' 中文(繁體)' ;
279+ } else if (command === ' ru' ) {
280+ dropdownText .value = ' Русский' ;
275281 }
276282 nextTick (() => {
277283 loginFormRef .value .clearValidate ();
Original file line number Diff line number Diff line change 7878 v-model =" form.language"
7979 >
8080 <el-radio v-if =" globalStore.isIntl" value =" en" >English</el-radio >
81+ <el-radio v-if =" globalStore.isIntl" value =" ru" >Русский</el-radio >
8182 <el-radio value =" zh" >中文(简体)</el-radio >
8283 <el-radio value =" tw" >中文(繁體)</el-radio >
8384 <el-radio v-if =" !globalStore.isIntl" value =" en" >English</el-radio >
85+ <el-radio v-if =" !globalStore.isIntl" value =" ru" >Русский</el-radio >
8486 </el-radio-group >
8587 </el-form-item >
8688
You can’t perform that action at this time.
0 commit comments