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,38 @@
{$layout}
{$template "../menu"}
<table class="ui table selectable celled">
<thead>
<tr>
<th style="width: 3em">ID</th>
<th style="width: 12em">国家/地区名称</th>
<th style="width: 12em">内置别名</th>
<th style="width: 12em">自定义名称 <tip-icon content="修改在界面上显示的国家/地区名称"></tip-icon></th>
<th style="width: 12em">自定义别名 <tip-icon content="可以在IP库中通过别名找到当前国家/地区,比如通过美国、美利坚合众国都可以找到美国这个国家"></tip-icon></th>
<th class="one op">操作</th>
</tr>
</thead>
<tr v-for="country in countries">
<td>{{country.id}}</td>
<td>{{country.name}}</td>
<td>
<div v-if="country.codes.length > 0">
<span v-for="code in country.codes" class="ui label basic">{{code}}</span>
</div>
<span v-else class="disabled"></span>
</td>
<td>
<span v-if="country.customName.length > 0">{{country.customName}}</span>
<span v-else class="disabled">暂无</span>
</td>
<td>
<div v-if="country.customCodes.length > 0">
<span v-for="code in country.customCodes" class="ui label basic">{{code}}</span>
</div>
<span v-else class="disabled">暂无</span>
</td>
<td>
<a href="" @click.prevent="updateCountry(country.id)">修改</a>
</td>
</tr>
</table>

View File

@@ -0,0 +1,9 @@
Tea.context(function () {
this.updateCountry = function (countryId) {
teaweb.popup("/settings/ip-library/countries/updatePopup?countryId=" + countryId, {
callback: function () {
teaweb.successRefresh("保存成功")
}
})
}
})

View File

@@ -0,0 +1,35 @@
{$layout "layout_popup"}
<h3>定制国家/地区信息</h3>
<form class="ui form" data-tea-action="$" data-tea-success="success">
<csrf-token></csrf-token>
<input type="hidden" name="countryId" :value="country.id"/>
<table class="ui table definition selectable">
<tr>
<td class="title">国家/地区名称</td>
<td>{{country.name}}</td>
</tr>
<tr>
<td>内置别名</td>
<td>
<div v-if="country.codes.length > 0">
<span v-for="code in country.codes" class="ui label basic">{{code}}</span>
</div>
<span v-else class="disabled"></span>
</td>
</tr>
<tr>
<td>自定义名称</td>
<td>
<input type="text" name="customName" maxlength="100" v-model="country.customName"/>
</td>
</tr>
<tr>
<td>自定义别名</td>
<td>
<values-box name="customCodes" :v-values="country.customCodes"></values-box>
</td>
</tr>
</table>
<submit-btn></submit-btn>
</form>