mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-07 17:10:07 +08:00
fix: 调整面板设置样式 (#2765)
This commit is contained in:
parent
d15bd1d6b4
commit
05029a3eda
@ -63,11 +63,13 @@ func Start() {
|
|||||||
*net.TCPListener
|
*net.TCPListener
|
||||||
}
|
}
|
||||||
if global.CONF.System.SSL == "enable" {
|
if global.CONF.System.SSL == "enable" {
|
||||||
certificate, err := os.ReadFile(path.Join(global.CONF.System.BaseDir, "1panel/secret/server.crt"))
|
certPath := path.Join(global.CONF.System.BaseDir, "1panel/secret/server.crt")
|
||||||
|
keyPath := path.Join(global.CONF.System.BaseDir, "1panel/secret/server.key")
|
||||||
|
certificate, err := os.ReadFile(certPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
key, err := os.ReadFile(path.Join(global.CONF.System.BaseDir, "1panel/secret/server.key"))
|
key, err := os.ReadFile(keyPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@ -80,7 +82,7 @@ func Start() {
|
|||||||
}
|
}
|
||||||
global.LOG.Infof("listen at https://%s:%s [%s]", global.CONF.System.BindAddress, global.CONF.System.Port, tcpItem)
|
global.LOG.Infof("listen at https://%s:%s [%s]", global.CONF.System.BindAddress, global.CONF.System.Port, tcpItem)
|
||||||
|
|
||||||
if err := server.ServeTLS(tcpKeepAliveListener{ln.(*net.TCPListener)}, "", ""); err != nil {
|
if err := server.ServeTLS(tcpKeepAliveListener{ln.(*net.TCPListener)}, certPath, keyPath); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1162,6 +1162,7 @@ const message = {
|
|||||||
|
|
||||||
bindDomain: 'Bind Domain',
|
bindDomain: 'Bind Domain',
|
||||||
unBindDomain: 'Unbind domain',
|
unBindDomain: 'Unbind domain',
|
||||||
|
panelSSL: 'Panel SSL',
|
||||||
unBindDomainHelper:
|
unBindDomainHelper:
|
||||||
'The action of unbinding a domain name may cause system insecurity. Do you want to continue?',
|
'The action of unbinding a domain name may cause system insecurity. Do you want to continue?',
|
||||||
bindDomainHelper:
|
bindDomainHelper:
|
||||||
|
@ -1150,6 +1150,7 @@ const message = {
|
|||||||
complexityHelper: '開啟後密碼必須滿足密碼長度大於 8 位且包含字母、數字及特殊字符',
|
complexityHelper: '開啟後密碼必須滿足密碼長度大於 8 位且包含字母、數字及特殊字符',
|
||||||
bindDomain: '域名綁定',
|
bindDomain: '域名綁定',
|
||||||
unBindDomain: '域名解綁',
|
unBindDomain: '域名解綁',
|
||||||
|
panelSSL: '面板 SSL',
|
||||||
unBindDomainHelper: '解除域名綁定可能造成系統不安全,是否繼續?',
|
unBindDomainHelper: '解除域名綁定可能造成系統不安全,是否繼續?',
|
||||||
bindDomainHelper: '設置域名綁定後,僅能通過設置中域名訪問 1Panel 服務',
|
bindDomainHelper: '設置域名綁定後,僅能通過設置中域名訪問 1Panel 服務',
|
||||||
bindDomainHelper1: '綁定域名為空時,則取消域名綁定',
|
bindDomainHelper1: '綁定域名為空時,則取消域名綁定',
|
||||||
|
@ -1151,6 +1151,7 @@ const message = {
|
|||||||
complexityHelper: '开启后密码必须满足密码长度大于 8 位且包含字母、数字及特殊字符',
|
complexityHelper: '开启后密码必须满足密码长度大于 8 位且包含字母、数字及特殊字符',
|
||||||
bindDomain: '域名绑定',
|
bindDomain: '域名绑定',
|
||||||
unBindDomain: '域名解绑',
|
unBindDomain: '域名解绑',
|
||||||
|
panelSSL: '面板 SSL',
|
||||||
unBindDomainHelper: '解除域名绑定可能造成系统不安全,是否继续?',
|
unBindDomainHelper: '解除域名绑定可能造成系统不安全,是否继续?',
|
||||||
bindDomainHelper: '设置域名绑定后,仅能通过设置中域名访问 1Panel 服务',
|
bindDomainHelper: '设置域名绑定后,仅能通过设置中域名访问 1Panel 服务',
|
||||||
bindDomainHelper1: '绑定域名为空时,则取消域名绑定',
|
bindDomainHelper1: '绑定域名为空时,则取消域名绑定',
|
||||||
|
@ -126,41 +126,39 @@
|
|||||||
<div class="mainClass">
|
<div class="mainClass">
|
||||||
<el-row :gutter="20" v-show="hasRecords" class="mainRowClass">
|
<el-row :gutter="20" v-show="hasRecords" class="mainRowClass">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div>
|
<div class="infinite-list" style="overflow: auto">
|
||||||
<ul class="infinite-list" style="overflow: auto">
|
<el-table :data="records" border :show-header="false" @row-click="forDetail">
|
||||||
<el-card
|
<el-table-column>
|
||||||
v-for="(item, index) in records"
|
<template #default="{ row }">
|
||||||
:key="index"
|
<span v-if="row.id === currentRecord.id" class="select-sign"></span>
|
||||||
:class="item.id === currentRecord.id ? 'select-card' : 'primary-card'"
|
<el-tag v-if="row.status === 'Success'" type="success">
|
||||||
@click="forDetail(item)"
|
{{ $t('commons.status.success') }}
|
||||||
>
|
</el-tag>
|
||||||
<el-tag v-if="item.status === 'Success'" type="success">
|
<el-tag v-if="row.status === 'Waiting'" type="info">
|
||||||
{{ $t('commons.status.success') }}
|
{{ $t('commons.status.waiting') }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="item.status === 'Waiting'" type="info">
|
<el-tag v-if="row.status === 'Failed'" type="danger">
|
||||||
{{ $t('commons.status.waiting') }}
|
{{ $t('commons.status.failed') }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="item.status === 'Failed'" type="danger">
|
<span>
|
||||||
{{ $t('commons.status.failed') }}
|
{{ dateFormat(0, 0, row.startTime) }}
|
||||||
</el-tag>
|
</span>
|
||||||
<span>
|
</template>
|
||||||
{{ dateFormat(0, 0, item.startTime) }}
|
</el-table-column>
|
||||||
</span>
|
</el-table>
|
||||||
</el-card>
|
</div>
|
||||||
</ul>
|
<div class="page-item">
|
||||||
<div class="page-item">
|
<el-pagination
|
||||||
<el-pagination
|
:page-size="searchInfo.pageSize"
|
||||||
:page-size="searchInfo.pageSize"
|
:current-page="searchInfo.page"
|
||||||
:current-page="searchInfo.page"
|
@current-change="handleCurrentChange"
|
||||||
@current-change="handleCurrentChange"
|
@size-change="handleSizeChange"
|
||||||
@size-change="handleSizeChange"
|
:pager-count="5"
|
||||||
:pager-count="5"
|
:page-sizes="[6, 8, 10, 12, 14]"
|
||||||
:page-sizes="[6, 8, 10, 12, 14]"
|
small
|
||||||
small
|
layout="total, sizes, prev, pager, next"
|
||||||
layout="total, sizes, prev, pager, next"
|
:total="searchInfo.recordTotal"
|
||||||
:total="searchInfo.recordTotal"
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
@ -318,7 +316,7 @@
|
|||||||
:placeholder="$t('cronjob.noLogs')"
|
:placeholder="$t('cronjob.noLogs')"
|
||||||
:indent-with-tab="true"
|
:indent-with-tab="true"
|
||||||
:tabSize="4"
|
:tabSize="4"
|
||||||
style="height: calc(100vh - 484px); width: 100%; margin-top: 5px"
|
style="height: calc(100vh - 488px); width: 100%; margin-top: 5px"
|
||||||
:lineWrapping="true"
|
:lineWrapping="true"
|
||||||
:matchBrackets="true"
|
:matchBrackets="true"
|
||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
@ -719,36 +717,22 @@ defineExpose({
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.infinite-list {
|
.infinite-list {
|
||||||
height: calc(100vh - 416px);
|
height: calc(100vh - 420px);
|
||||||
padding: 0;
|
.select-sign {
|
||||||
margin: 0;
|
|
||||||
.el-card {
|
|
||||||
border: var(--panel-border) !important;
|
|
||||||
&:hover {
|
|
||||||
box-shadow: 2px 2px 2px #888888;
|
|
||||||
}
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
height: 40px;
|
|
||||||
font-size: 14px;
|
|
||||||
margin: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.select-card {
|
|
||||||
color: var(--el-color-primary);
|
|
||||||
border: 1px solid var(--el-color-primary) !important;
|
|
||||||
box-shadow: 2px 2px 2px #888888;
|
|
||||||
&::before {
|
&::before {
|
||||||
position: absolute;
|
float: left;
|
||||||
|
margin-left: -3px;
|
||||||
|
position: relative;
|
||||||
width: 3px;
|
width: 3px;
|
||||||
height: 40px;
|
height: 24px;
|
||||||
content: '';
|
content: '';
|
||||||
background: $primary-color;
|
background: $primary-color;
|
||||||
border-radius: 10px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.el-tag {
|
.el-tag {
|
||||||
margin-right: 15px;
|
margin-left: 20px;
|
||||||
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +88,27 @@
|
|||||||
<span class="input-help">{{ $t('setting.bindDomainHelper') }}</span>
|
<span class="input-help">{{ $t('setting.bindDomainHelper') }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item :label="$t('setting.panelSSL')" prop="ssl">
|
||||||
|
<el-switch
|
||||||
|
@change="handleSSL"
|
||||||
|
v-model="form.ssl"
|
||||||
|
active-value="enable"
|
||||||
|
inactive-value="disable"
|
||||||
|
/>
|
||||||
|
<span class="input-help">{{ $t('setting.https') }}</span>
|
||||||
|
<div v-if="form.ssl === 'enable' && sslInfo">
|
||||||
|
<el-tag>{{ $t('setting.domainOrIP') }} {{ sslInfo.domain }}</el-tag>
|
||||||
|
<el-tag style="margin-left: 5px">
|
||||||
|
{{ $t('setting.timeOut') }} {{ sslInfo.timeout }}
|
||||||
|
</el-tag>
|
||||||
|
<div>
|
||||||
|
<el-button link type="primary" @click="handleSSL">
|
||||||
|
{{ $t('commons.button.view') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('setting.expirationTime')" prop="expirationTime">
|
<el-form-item :label="$t('setting.expirationTime')" prop="expirationTime">
|
||||||
<el-input disabled v-model="form.expirationTime">
|
<el-input disabled v-model="form.expirationTime">
|
||||||
<template #append>
|
<template #append>
|
||||||
@ -128,27 +149,6 @@
|
|||||||
{{ $t('setting.mfaHelper') }}
|
{{ $t('setting.mfaHelper') }}
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="HTTPS" prop="ssl">
|
|
||||||
<el-switch
|
|
||||||
@change="handleSSL"
|
|
||||||
v-model="form.ssl"
|
|
||||||
active-value="enable"
|
|
||||||
inactive-value="disable"
|
|
||||||
/>
|
|
||||||
<span class="input-help">{{ $t('setting.https') }}</span>
|
|
||||||
<div v-if="form.ssl === 'enable' && sslInfo">
|
|
||||||
<el-tag>{{ $t('setting.domainOrIP') }} {{ sslInfo.domain }}</el-tag>
|
|
||||||
<el-tag style="margin-left: 5px">
|
|
||||||
{{ $t('setting.timeOut') }} {{ sslInfo.timeout }}
|
|
||||||
</el-tag>
|
|
||||||
<div>
|
|
||||||
<el-button link type="primary" @click="handleSSL">
|
|
||||||
{{ $t('commons.button.view') }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user