改进文字提示

This commit is contained in:
GoEdgeLab
2022-11-27 22:00:35 +08:00
parent 92a36f99f1
commit 5c20606430
4 changed files with 35 additions and 6 deletions

View File

@@ -23,14 +23,14 @@
<tr>
<td class="title">节点名称 *</td>
<td>
<input type="text" name="name" maxlength="50" ref="focus"/>
<input type="text" name="name" maxlength="50" ref="focus" v-model="name" @input="changeName"/>
</td>
</tr>
<tr>
<td>IP地址 *</td>
<td>
<node-ip-addresses-box></node-ip-addresses-box>
<p class="comment">用于访问节点和域名解析等。</p>
<p class="comment">用于访问节点和域名解析等<span v-if="defaultIP.length > 0"><strong>,如果没有填写默认为{{defaultIP}}</strong></span></p>
</td>
</tr>
<tr v-if="dnsRoutes.length > 0">

View File

@@ -5,6 +5,7 @@ Tea.context(function () {
this.sshPort = ""
this.grantId = 0
this.step = "info"
this.name = ""
this.success = function (resp) {
this.node = resp.data.node
@@ -170,4 +171,32 @@ Tea.context(function () {
this.createNext = function () {
teaweb.reload()
}
this.defaultIP = ""
this.changeName = function () {
if (this.validateIP(this.name)) {
this.defaultIP = this.name
} else {
this.defaultIP = ""
}
}
this.validateIP = function (v) {
// 目前只支持ipv4
let pieces = v.split(".")
if (pieces.length != 4) {
return false
}
for (let i = 0; i < pieces.length; i++) {
if (!/^\d{1,3}$/.test(pieces[i])) {
return false
}
let p = parseInt(pieces[i], 10)
if (p > 255) {
return false
}
}
return true
}
})

View File

@@ -8,7 +8,7 @@
<tr>
<td class="title">证书包含的域名 *</td>
<td>
<span v-if="serverNames.length == 0" class="disabled">还没有设置域名,暂时不能申请。</span>
<span v-if="serverNames.length == 0" class="disabled">还没有需要申请证书的域名,暂时不能申请。</span>
<div v-if="serverNames.length > 0">
<div v-for="(serverName, index) in serverNames" class="ui tiny basic label">
<input type="hidden" name="serverNames" :value="serverName"/>

View File

@@ -47,10 +47,10 @@
<!-- 介绍 -->
<div v-show="step == STEP_INTRO">
<div>感谢你选择使用<strong>GoEdge</strong>集群服务系统,下面让我们一起开始配置系统。</div>
<div class="margin">在这之前如果你还没有可用的MySQL数据库请先安装数据库再进行。</div>
<div>感谢你选择使用<strong>GoEdge</strong>CDN系统,下面让我们一起开始配置系统。</div>
<div class="margin">在这之前如果你还没有可用的MySQL数据库请先安装MySQL数据库再进行。</div>
<div class="margin" style="color: grey">免责声明GoEdge软件开发者并不对您的软件使用方法、服务对象、服务内容负道德或法律上的约束责任在使用本软件时产生的一切法律风险自负。</div>
<div class="margin" style="color: grey">用户协议请在遵守中华人民共和国政策、法律、法规的前提下使用本软件自愿承担因不当使用本软件产生的一切法律后果承认GoEdge开发者拥有本软件的著作权点击"开始"安装表示你同意此用户协议。</div>
<div class="margin" style="color: grey">用户协议请在遵守中华人民共和国政策、法律、法规的前提下使用本软件自愿承担因不当使用本软件产生的一切法律后果承认GoEdge开发者拥有本软件的所有著作权;点击"开始"安装表示你同意此用户协议。</div>
<button class="ui button primary" style="margin-top: 10em" type="button" @click.prevent="goIntroNext()">开始<i class="icon long arrow right"></i></button>
</div>