Initial commit (code only without large binaries)

This commit is contained in:
robin
2026-02-15 18:58:44 +08:00
commit 35df75498f
9442 changed files with 1495866 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
{$layout}
{$template "../menu_domain"}
<table class="ui table definition selectable">
<tr>
<td class="title">域名</td>
<td>{{domain.name}}</td>
</tr>
<tr>
<td>状态</td>
<td>
<span v-if="!domain.isOn" class="red">已停用</span>
<span v-if="domain.isOn" :class="{green:domain.status == 'verified', red:domain.status == 'rejected' || domain.status == 'forbidden'}">{{domain.statusName}}</span>
&nbsp; &nbsp;
</td>
</tr>
<tr>
<td>所属分组</td>
<td>
<div v-if="domain.groups.length > 0">
<a :href="'/ns/domains?userId=' + group.userId + '&groupId=' + group.id" class="ui label small basic" v-for="group in domain.groups">{{group.name}}</a>
</div>
<span v-else class="disabled">暂时没有分组</span>
</td>
</tr>
</table>

View File

@@ -0,0 +1,3 @@
Tea.context(function () {
})

View File

@@ -0,0 +1,38 @@
{$layout "layout_popup"}
<h3 style="margin-bottom: 0.4em">验证域名</h3>
<p class="comment">当前域名验证后,其下的域名解析才会生效。</p>
<form class="ui form" data-tea-action="$" data-tea-before="before" data-tea-success="submitSuccess" data-tea-done="done">
<csrf-token></csrf-token>
<input type="hidden" name="domainId" :value="domain.id"/>
<table class="ui table definition selectable">
<tr>
<td class="title">域名</td>
<td>{{domain.name}}</td>
</tr>
<tr>
<td>DNS主机地址</td>
<td>
<span v-if="hosts.length > 0">
<span v-for="host in hosts" class="ui label basic small">{{host}}</span>
</span>
<span v-if="hosts.length == 0" class="red">管理员没有设置可用的DNS主机域名请联系客服。</span>
<p class="comment" v-if="hosts.length > 0">请修改域名的DNS主机地址为以上地址。</p>
</td>
</tr>
<tr v-if="requireTXT && txt.length > 0">
<td>TXT记录</td>
<td>
<span v-if="txt.length > 0" id="txt-text">{{txt}}</span> <copy-to-clipboard :v-target="'txt-text'"></copy-to-clipboard>
<p class="comment">由于当前域名已被别的用户添加并验证所以需要重新验证所有权。请在域名中加入以上TXT记录子域名为<code-label>yanzheng</code-label>,需要在{{txtExpiresTime}}之前完成验证。</p>
</td>
</tr>
</table>
<submit-btn v-if="domain.status == 'none' && hosts.length > 0 && (!requireTXT || txt.length > 0)">验证</submit-btn>
<div class="margin"></div>
<div>
<span v-if="isVerifying" class="red">验证中,请稍候...</span>
<span class="red" v-if="!isOk && errorMessage.length > 0">验证失败:{{errorMessage}} <span v-if="rawErrorMessage.length > 0">({{rawErrorMessage}})</span></span>
</div>
</form>

View File

@@ -0,0 +1,29 @@
Tea.context(function () {
this.isOk = false
this.errorMessage = ""
this.rawErrorMessage= ""
this.isVerifying = false
this.before = function () {
this.isOk = false
this.errorMessage = ""
this.rawErrorMessage= ""
this.isVerifying = true
}
this.submitSuccess = function (resp) {
this.isOk = resp.data.isOk
this.errorMessage = resp.data.message
this.rawErrorMessage = resp.data.rawErrorMessage
if (this.isOk) {
teaweb.success("验证完成", function () {
window.parent.location.reload()
})
}
}
this.done = function () {
this.isVerifying = false
}
})