2019-12-08 03:59:58 -05:00
|
|
|
{{define "common/menu"}}
|
|
|
|
<div class="ui large top fixed menu nb-menu">
|
|
|
|
<div class="ui container">
|
2022-04-29 12:48:39 -04:00
|
|
|
<a class="item" href="/">
|
2021-08-04 01:35:41 -04:00
|
|
|
<img src="/static/logo.svg?v20210804">
|
2022-04-29 12:48:39 -04:00
|
|
|
</a>
|
2021-01-15 22:42:12 -05:00
|
|
|
{{if .IsAdminPage}}
|
2022-04-28 11:35:11 -04:00
|
|
|
<a class='item{{if eq .MatchedPath "/server"}} active{{end}}' href="/server"><i class="server icon"></i>{{tr "Server"}}</a>
|
2022-04-28 12:13:32 -04:00
|
|
|
<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>
|
2021-03-02 10:08:40 -05:00
|
|
|
<a class='item{{if eq .MatchedPath "/setting"}} active{{end}}' href="/setting">
|
2022-04-28 12:13:32 -04:00
|
|
|
<i class="settings icon"></i>{{tr "Settings"}}
|
2021-02-25 07:00:16 -05:00
|
|
|
</a>
|
2021-01-15 22:42:12 -05:00
|
|
|
{{else}}
|
2022-04-28 12:13:32 -04:00
|
|
|
<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>
|
2019-12-08 10:18:29 -05:00
|
|
|
{{end}}
|
2019-12-08 03:59:58 -05:00
|
|
|
<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">
|
2021-01-15 22:42:12 -05:00
|
|
|
{{if .IsAdminPage}}
|
|
|
|
<a class="item" href="/">
|
2022-04-28 22:52:26 -04:00
|
|
|
<i class="chart area icon"></i>{{tr "BackToHomepage"}}
|
2021-01-15 22:42:12 -05:00
|
|
|
</a>
|
|
|
|
{{else}}
|
|
|
|
<a class="item" href="/server">
|
2022-04-28 12:13:32 -04:00
|
|
|
<i class="terminal icon"></i>{{tr "AdminPanel"}}
|
2021-01-15 22:42:12 -05:00
|
|
|
</a>
|
|
|
|
{{end}}
|
2022-04-28 23:45:41 -04:00
|
|
|
<button class="item" onclick="showConfirm('{{tr "ConfirmLogout"}}','{{tr "AfterLoggingOutYouHaveToLoginAgain"}}',logout,{{.Admin.ID}})">
|
2022-04-28 12:13:32 -04:00
|
|
|
<i class="logout icon"></i>{{tr "Logout"}}
|
2019-12-08 03:59:58 -05:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
2022-04-28 12:13:32 -04:00
|
|
|
<a href="/login" class="ui large positive nezha-primary-btn button"><i class="sign-in icon"></i>{{tr "Login"}}</a>
|
2019-12-08 03:59:58 -05:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{template "component/confirm" .}}
|
|
|
|
{{end}}
|