Skip to content

Commit

Permalink
style: Optimize some internationalization styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu committed Jan 10, 2025
1 parent aab8df6 commit cd669d0
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 18 deletions.
8 changes: 8 additions & 0 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import { GlobalStore } from '@/store';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import zhTw from 'element-plus/es/locale/lang/zh-tw';
import en from 'element-plus/es/locale/lang/en';
import ja from 'element-plus/es/locale/lang/ja';
import ms from 'element-plus/es/locale/lang/ms';
import ptBR from 'element-plus/es/locale/lang/pt-br';
import ru from 'element-plus/es/locale/lang/ru';
import { useTheme } from '@/hooks/use-theme';
useTheme();
Expand All @@ -22,6 +26,10 @@ const i18nLocale = computed(() => {
if (globalStore.language === 'zh') return zhCn;
if (globalStore.language === 'tw') return zhTw;
if (globalStore.language === 'en') return en;
if (globalStore.language === 'ja') return ja;
if (globalStore.language === 'ms') return ms;
if (globalStore.language === 'ru') return ru;
if (globalStore.language === 'pt-br') return ptBR;
return zhCn;
});
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/lang/modules/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ const message = {
remote: 'リモート',
remoteDB: 'リモートサーバー|リモートサーバー',
manageRemoteDB: 'リモートDB',
createRemoteDB: 'bind @.lower:database.remotedb',
unBindRemoteDB: 'unbind @.lower:database.remotedb',
createRemoteDB: 'モートサーバーを追加',
unBindRemoteDB: 'モートサーバーのバインドを解除',
unBindForce: '強制バインド',
unBindForceHelper: '結合プロセス中にすべてのエラーを無視して最終操作が成功するようにします',
unBindRemoteHelper:
Expand Down Expand Up @@ -1136,7 +1136,7 @@ const message = {
clamLog: '@:toolbox.clam.clamconfログ',
freshClam: 'フレッシュクラム',
freshClamLog: '@:toolbox.clam.freshclamログ',
alertHelper: 'ProfessionalバージョンはスケジュールされたスキャンとSMSアラートをサポートしています',
alertHelper: 'ロフェッショナル版は定期スキャンとSMSアラート機能をサポートしています',
alertTitle: 'ウイルススキャンタスク({0}」感染したファイルアラートが検出されました',
},
},
Expand Down Expand Up @@ -1677,7 +1677,8 @@ const message = {
},
license: {
community: '無',
pro: 'Pro',
oss: '無',
pro: '専',
trial: 'トライアル',
office: '正',
trialInfo: 'バージョン',
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/views/container/container/terminal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@
prop="command"
:rules="Rules.requiredInput"
>
<el-checkbox style="width: 100px" border v-model="form.isCustom" @change="onChangeCommand">
<el-checkbox style="width: 180px" border v-model="form.isCustom" @change="onChangeCommand">
{{ $t('container.custom') }}
</el-checkbox>
<el-input style="width: calc(100% - 100px)" clearable v-model="form.command" />
<el-input style="width: calc(100% - 180px)" clearable v-model="form.command" />
</el-form-item>
<el-form-item
v-if="!form.isCustom"
:label="$t('container.command')"
prop="command"
:rules="Rules.requiredSelect"
>
<el-checkbox style="width: 100px" border v-model="form.isCustom" @change="onChangeCommand">
<el-checkbox style="width: 180px" border v-model="form.isCustom" @change="onChangeCommand">
{{ $t('container.custom') }}
</el-checkbox>
<el-select style="width: calc(100% - 100px)" filterable clearable v-model="form.command">
<el-select style="width: calc(100% - 180px)" filterable clearable v-model="form.command">
<el-option value="/bin/ash" label="/bin/ash" />
<el-option value="/bin/bash" label="/bin/bash" />
<el-option value="/bin/sh" label="/bin/sh" />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/mysql/conn/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
prop="password"
>
<el-input
style="width: calc(100% - 147px)"
style="width: calc(100% - 167px)"
type="password"
show-password
clearable
Expand Down
36 changes: 28 additions & 8 deletions frontend/src/views/home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,20 @@
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
<CardWithHeader :header="$t('home.systemInfo')">
<template #body>
<el-scrollbar>
<el-descriptions :column="1" class="h-systemInfo" border>
<div class="h-systemInfo">
<el-descriptions :column="1" border>
<el-descriptions-item class-name="system-content" label-class-name="system-label">
<template #label>
<span>{{ $t('home.hostname') }}</span>
</template>
{{ baseInfo.hostname }}
<el-tooltip
v-if="baseInfo.hostname.length > 30"
:content="baseInfo.hostname"
placement="bottom"
>
{{ baseInfo.hostname.substring(0, 27) + '...' }}
</el-tooltip>
<span v-else>{{ baseInfo.hostname }}</span>
</el-descriptions-item>
<el-descriptions-item class-name="system-content" label-class-name="system-label">
<template #label>
Expand All @@ -191,7 +198,14 @@
<template #label>
<span>{{ $t('home.kernelVersion') }}</span>
</template>
{{ baseInfo.kernelVersion }}
<el-tooltip
v-if="baseInfo.kernelVersion.length > 30"
:content="baseInfo.kernelVersion"
placement="bottom"
>
{{ baseInfo.kernelVersion.substring(0, 27) + '...' }}
</el-tooltip>
<span v-else>{{ baseInfo.kernelVersion }}</span>
</el-descriptions-item>
<el-descriptions-item class-name="system-content" label-class-name="system-label">
<template #label>
Expand Down Expand Up @@ -232,7 +246,7 @@
{{ loadUpTime(currentInfo.uptime) }}
</el-descriptions-item>
</el-descriptions>
</el-scrollbar>
</div>
</template>
</CardWithHeader>

Expand Down Expand Up @@ -681,7 +695,8 @@ onBeforeUnmount(() => {
.h-systemInfo {
margin-left: 18px;
height: 276px;
height: 296px;
overflow: auto;
}
@-moz-document url-prefix() {
.h-systemInfo {
Expand All @@ -695,15 +710,20 @@ onBeforeUnmount(() => {
color: var(--panel-text-color);
border: none !important;
background: none !important;
width: fit-content !important;
white-space: nowrap !important;
max-width: 150px !important;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.system-content {
font-size: 13px !important;
border: none !important;
width: 100% !important;
}
.el-descriptions__label {
width: 150px;
}
.monitor-tags {
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<el-row :gutter="20" v-loading="loading">
<el-col :xs="24" :sm="18" :md="8" :lg="8" :xl="8">
<el-col :xs="24" :sm="18" :md="9" :lg="9" :xl="9">
<el-form ref="websiteForm" label-position="right" label-width="150px" :model="form" :rules="rules">
<el-form-item :label="$t('website.primaryDomain')" prop="primaryDomain">
<el-input v-model="form.primaryDomain"></el-input>
Expand Down

0 comments on commit cd669d0

Please sign in to comment.