mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-23 05:08:13 -05:00
50 lines
2.3 KiB
HTML
Vendored
50 lines
2.3 KiB
HTML
Vendored
{{define "common/menu"}}
|
|
<div class="ui large top fixed menu nb-menu">
|
|
<div class="ui container">
|
|
<div class="item">
|
|
<img src="/static/logo.png">
|
|
</div>
|
|
{{if .IsAdminPage}}
|
|
<a class="item{{if eq .MatchedPath " /server"}} active{{end}}" href="/server">Agent</a>
|
|
<a class="item{{if eq .MatchedPath " /monitor"}} active{{end}}" href="/monitor">Service</a>
|
|
<a class="item{{if eq .MatchedPath " /cron"}} active{{end}}" href="/cron">Cron</a>
|
|
<a class="item{{if eq .MatchedPath " /notification"}} active{{end}}" href="/notification">报警</a>
|
|
{{else}}
|
|
<a class="item{{if eq .MatchedPath " /"}} active{{end}}" href="/">首页</a>
|
|
<a class="item{{if eq .MatchedPath " /service"}} active{{end}}" href="/service">服务状态</a>
|
|
{{end}}
|
|
<div class="right menu">
|
|
<div class="item">
|
|
{{if .Admin}}
|
|
<div class="ui simple dropdown">
|
|
<div class="text">
|
|
<img class="ui avatar image" src="{{.Admin.AvatarURL}}"> {{.Admin.Name}}
|
|
</div>
|
|
<i class="dropdown icon"></i>
|
|
<div class="menu">
|
|
{{if .IsAdminPage}}
|
|
<a class="item" href="/setting">
|
|
<i class="settings icon"></i>系统设置
|
|
</a>
|
|
<a class="item" href="/">
|
|
<i class="chart area icon"></i>返回前台
|
|
</a>
|
|
{{else}}
|
|
<a class="item" href="/server">
|
|
<i class="terminal icon"></i>管理后台
|
|
</a>
|
|
{{end}}
|
|
<button class="item" onclick="showConfirm('确认注销?','注销后您必须重新登录才能使用',logout,{{.Admin.ID}})">
|
|
<i class="logout icon"></i>注销登录
|
|
</button>
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<a href="/login" class="ui large teal button">登录</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "component/confirm" .}}
|
|
{{end}} |