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