mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-06 05:30:05 +00:00
✨ add theme hotaru
This commit is contained in:
22
resource/template/dashboard/error.html
Normal file
22
resource/template/dashboard/error.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{define "dashboard/error"}}
|
||||
{{template "common/header" .}}
|
||||
<div class="login-form">
|
||||
<div class="ui middle aligned center aligned grid">
|
||||
<div class="column">
|
||||
<h2 class="ui teal image header">
|
||||
<img src="/static/logo.png" class="image">
|
||||
<div class="content">
|
||||
访问受限
|
||||
</div>
|
||||
</h2>
|
||||
<div class="ui message">
|
||||
<p>
|
||||
{{.Msg}}
|
||||
</p>
|
||||
<a href="{{.Link}}">{{.Btn}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "common/footer" .}}
|
||||
{{end}}
|
||||
20
resource/template/dashboard/login.html
Normal file
20
resource/template/dashboard/login.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{{define "dashboard/login"}}
|
||||
{{template "common/header" .}}
|
||||
<div class="login-form">
|
||||
<div class="ui middle aligned center aligned grid">
|
||||
<div class="column">
|
||||
<h2 class="ui teal image header">
|
||||
<img src="static/logo.png" class="image">
|
||||
<div class="content">
|
||||
使用 GitHub 账号登录
|
||||
</div>
|
||||
</h2>
|
||||
<a href="/oauth2/login" class="ui fluid large teal submit button">登录</a>
|
||||
<div class="ui message">
|
||||
没有账号? <a href="https://github.com/join" target="_blank">注册</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "common/footer" .}}
|
||||
{{end}}
|
||||
49
resource/template/dashboard/server.html
Normal file
49
resource/template/dashboard/server.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{{define "dashboard/server"}}
|
||||
{{template "common/header" .}}
|
||||
{{template "common/menu" .}}
|
||||
<div class="nb-container">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
<div class="right floated right aligned twelve wide column">
|
||||
<button class="ui right labeled positive icon button" onclick="addOrEditServer()"><i
|
||||
class="add icon"></i> 添加服务器
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<table class="ui very basic table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>备注</th>
|
||||
<th>密钥</th>
|
||||
<th>最后活跃</th>
|
||||
<th>管理</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range $server := .Servers}}
|
||||
<tr>
|
||||
<td>{{$server.ID}}</td>
|
||||
<td>{{$server.Name}}</td>
|
||||
<td>{{$server.Secret}}</td>
|
||||
<td>{{$server.LastActive}}</td>
|
||||
<td>
|
||||
<div class="ui mini icon buttons">
|
||||
<button class="ui button" onclick="addOrEditServer({{$server.Marshal}})">
|
||||
<i class="edit icon"></i>
|
||||
</button>
|
||||
<button class="ui button"
|
||||
onclick="showConfirm('删除节点','确认删除此监控节点?',deleteRequest,'/api/server/'+{{$server.ID}})">
|
||||
<i class="delete icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{template "component/server"}}
|
||||
{{template "common/footer" .}}
|
||||
{{end}}
|
||||
40
resource/template/dashboard/setting.html
Normal file
40
resource/template/dashboard/setting.html
Normal file
@@ -0,0 +1,40 @@
|
||||
{{define "dashboard/setting"}}
|
||||
{{template "common/header" .}}
|
||||
{{template "common/menu" .}}
|
||||
<div class="nb-container">
|
||||
<div class="ui container">
|
||||
<form id="settingForm" class="ui large form" onsubmit="return false;">
|
||||
<div class="field">
|
||||
<label>站点标题</label>
|
||||
<input type="text" name="Title" placeholder="哪吒面板" value="{{.Conf.Site.Brand}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>管理员列表</label>
|
||||
<input type="text" name="Admin" placeholder="1010,2020" value="{{.Conf.GitHub.Admin}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<select name="Theme">
|
||||
<option value="default">默认主题</option>
|
||||
<option value="hotaru">CakeMine-Hotaru</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="ui button" type="submit">保存</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{template "common/footer" .}}
|
||||
<script>
|
||||
$('#settingForm').submit(function () {
|
||||
$.post('/api/setting', $('#settingForm').serialize()).then((resp) => {
|
||||
if (resp.code == 200) {
|
||||
alert("保存成功")
|
||||
} else {
|
||||
alert(resp.message)
|
||||
}
|
||||
}).error(err => {
|
||||
alert(err)
|
||||
})
|
||||
return false;
|
||||
})
|
||||
</script>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user