nezha/resource/template/common/menu.html
Kris 0e9dfc0c7e modified: resource/l10n/zh-CN.toml
modified:   resource/template/common/menu.html
	modified:   resource/template/component/confirm.html
	modified:   resource/template/component/cron.html
	modified:   resource/template/component/monitor.html
	modified:   resource/template/component/notification.html
	modified:   resource/template/component/rule.html
	modified:   resource/template/component/server.html
	modified:   resource/template/dashboard/cron.html
	modified:   resource/template/dashboard/error.html
	modified:   resource/template/dashboard/login.html
	modified:   resource/template/dashboard/monitor.html
	modified:   resource/template/dashboard/notification.html
	modified:   resource/template/dashboard/server.html
	modified:   resource/template/dashboard/setting.html
	modified:   resource/template/dashboard/terminal.html
2022-04-29 04:52:26 +02:00

50 lines
2.6 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.svg?v20210804">
</div>
{{if .IsAdminPage}}
<a class='item{{if eq .MatchedPath "/server"}} active{{end}}' href="/server"><i class="server icon"></i>{{tr "Server"}}</a>
<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 "/setting"}} active{{end}}' href="/setting">
<i class="settings icon"></i>{{tr "Settings"}}
</a>
{{else}}
<a class='item{{if eq .MatchedPath "/"}} active{{end}}' href="/"><i class="home icon"></i>{{tr "Home"}}</a>
<a class='item{{if eq .MatchedPath "/service"}} active{{end}}' href="/service"><i class="rss icon"></i>{{tr "Services"}}</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="/">
<i class="chart area icon"></i>{{tr "BackToHomepage"}}
</a>
{{else}}
<a class="item" href="/server">
<i class="terminal icon"></i>{{tr "AdminPanel"}}
</a>
{{end}}
<button class="item" onclick="showConfirm('{{tr "ConfirmLogout"}}','{{}tr "AfterLoggingOutYouHaveToLoginAgain"}',logout,{{.Admin.ID}})">
<i class="logout icon"></i>{{tr "Logout"}}
</button>
</div>
</div>
{{else}}
<a href="/login" class="ui large positive nezha-primary-btn button"><i class="sign-in icon"></i>{{tr "Login"}}</a>
{{end}}
</div>
</div>
</div>
</div>
{{template "component/confirm" .}}
{{end}}