mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-05 21:20:06 +00:00
add: API Token相关的前端页面
This commit is contained in:
1
resource/template/common/menu.html
vendored
1
resource/template/common/menu.html
vendored
@@ -9,6 +9,7 @@
|
||||
<a class='item{{if eq .MatchedPath "/monitor"}} active{{end}}' href="/monitor"><i class="rss icon"></i>{{tr "Services"}}</a>
|
||||
<a class='item{{if eq .MatchedPath "/cron"}} active{{end}}' href="/cron"><i class="clock icon"></i>{{tr "Task"}}</a>
|
||||
<a class='item{{if eq .MatchedPath "/notification"}} active{{end}}' href="/notification"><i class="bell icon"></i>{{tr "Notification"}}</a>
|
||||
<a class='item{{if eq .MatchedPath "/api"}} active{{end}}' href="/api"><i class="key icon"></i>API</a>
|
||||
<a class='item{{if eq .MatchedPath "/setting"}} active{{end}}' href="/setting">
|
||||
<i class="settings icon"></i>{{tr "Settings"}}
|
||||
</a>
|
||||
|
||||
19
resource/template/component/api.html
vendored
Normal file
19
resource/template/component/api.html
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{{define "component/api"}}
|
||||
<div class="ui tiny api modal transition hidden">
|
||||
<div class="header">{{tr "IssueNewApiToken"}}</div>
|
||||
<div class="content">
|
||||
<form id="apiForm" class="ui form">
|
||||
<input type="hidden" name="id">
|
||||
<div class="field">
|
||||
<label>{{tr "Note"}}</label>
|
||||
<textarea name="Note"></textarea>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class=" actions">
|
||||
<div class="ui negative button">{{tr "Cancel"}}</div>
|
||||
<button class="ui positive nezha-primary-btn right labeled icon button">{{tr "Confirm"}}<i class="checkmark icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
41
resource/template/dashboard/api.html
Normal file
41
resource/template/dashboard/api.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{{define "dashboard/api"}}
|
||||
{{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 nezha-primary-btn icon button" onclick="issueNewApiToken()"><i class="add icon"></i>
|
||||
{{tr "IssueNewApiToken"}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<table class="ui very basic table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{tr "Token"}}</th>
|
||||
<th>{{tr "Note"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range $token := .Tokens}}
|
||||
<tr>
|
||||
<td>{{$token.Token}}</td>
|
||||
<td>{{$token.Note}}</td>
|
||||
<td>
|
||||
<div class="ui mini icon buttons">
|
||||
<button class="ui button"
|
||||
onclick="showConfirm('{{tr "DeleteToken"}}','{{tr "ConfirmToDeleteThisToken"}}',deleteRequest,'/api/token/'+{{$token.Token}})">
|
||||
<i class="trash alternate outline icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{template "component/api"}}
|
||||
{{template "common/footer" .}}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user