Skip to content

Commit

Permalink
fix: 容器配置界面样式调整 (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu authored May 15, 2023
1 parent b966ab3 commit 212c863
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
9 changes: 6 additions & 3 deletions frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,10 @@ const message = {
imageRepo: 'Image repo',
repoHelper: 'Does it include a mirror repository/organization/project?',
auth: 'Auth',
mirrorHelper: 'One in a row, for example:\nhttps://hub-mirror.c.163.com \nhttps://reg-mirror.qiniu.com',
registrieHelper: 'One in a row, for example:\n172.16.10.111:8081 \n172.16.10.112:8081',
mirrorHelper:
'If there are multiple mirrors, newlines must be displayed, for example:\nhttps://hub-mirror.c.163.com \nhttps://reg-mirror.qiniu.com',
registrieHelper:
'If multiple private repositories exist, newlines must be displayed, for example:\n172.16.10.111:8081 \n172.16.10.112:8081',

compose: 'Compose',
fromChangeHelper: 'Switching the source will clear the current edited content. Do you want to continue?',
Expand Down Expand Up @@ -576,7 +578,8 @@ const message = {
daemonJsonPathHelper: 'Ensure that the configuration path is the same as that specified in docker.service.',
mirrors: 'Registry mirrors',
mirrorsHelper:
'Redirecting requests for a Docker image repository to a specified image accelerator can improve the download speed of the image',
'The acceleration URL is preferred to perform operations. If this parameter is set to empty, mirror acceleration is disabled.',
mirrorsHelper2: 'For details, see the official documents, ',
registries: 'Insecure registries',
liveHelper:
'Allows the running container state to be preserved in case of unexpected shutdown or crash of the Docker daemon',
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,9 @@ const message = {
imageRepo: '镜像仓库',
repoHelper: '是否包含镜像仓库/组织/项目?',
auth: '认',
mirrorHelper: '一行一个\nhttps://hub-mirror.c.163.com \nhttps://reg-mirror.qiniu.com',
registrieHelper: '一行一个\n172.16.10.111:8081 \n172.16.10.112:8081',
mirrorHelper:
'当存在多个加速器时需要换行显示\nhttp://xxxxxx.m.daocloud.io \nhttps://xxxxxx.mirror.aliyuncs.com',
registrieHelper: '当存在多个私有仓库时需要换行显示\n172.16.10.111:8081 \n172.16.10.112:8081',

compose: '编',
fromChangeHelper: '切换来源将清空当前已编辑内容是否继续?',
Expand Down Expand Up @@ -590,7 +591,8 @@ const message = {
dockerStatus: 'Docker 服务',
daemonJsonPathHelper: '请保证配置路径与 docker.service 中指定的配置路径保持一致。',
mirrors: '镜像加速',
mirrorsHelper: '将 Docker 镜像库的请求重定向到指定的镜像加速器从而提高镜像的下载速度',
mirrorsHelper: '优先使用加速 URL 执行操作设置为空则取消镜像加速。',
mirrorsHelper2: '具体操作配置请参照官方文档,',
registries: '私有仓库',
liveHelper: '允许在 Docker 守护进程发生意外停机或崩溃时保留正在运行的容器状态',
liveWithSwarmHelper: 'live-restore 守护进程配置与 Swarm 模式不兼容',
Expand Down
17 changes: 16 additions & 1 deletion frontend/src/views/container/setting/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<el-row style="margin-top: 20px" v-if="confShowType === 'base'">
<el-col :span="1"><br /></el-col>
<el-col :span="10">
<el-form :model="form" label-position="left" ref="formRef" label-width="120px">
<el-form :model="form" label-position="left" ref="formRef" label-width="150px">
<el-form-item :label="$t('container.mirrors')" prop="mirrors">
<el-input
type="textarea"
Expand All @@ -53,6 +53,17 @@
v-model="form.mirrors"
/>
<span class="input-help">{{ $t('container.mirrorsHelper') }}</span>
<span class="input-help">
{{ $t('container.mirrorsHelper2') }}
<el-link
style="font-size: 12px; margin-left: 5px"
icon="Position"
@click="toDoc()"
type="primary"
>
{{ $t('firewall.quickJump') }}
</el-link>
</span>
</el-form-item>
<el-form-item :label="$t('container.registries')" prop="registries">
<el-input
Expand Down Expand Up @@ -219,6 +230,10 @@ const onSaveFile = async () => {
confirmDialogRef.value!.acceptParams(params);
};
const toDoc = () => {
window.open('https://1panel.cn/docs/user_manual/containers/setting/', '_blank');
};
const onChangeIptables = () => {
if (!form.iptables) {
iptablesVisiable.value = true;
Expand Down

0 comments on commit 212c863

Please sign in to comment.