Skip to content

Commit 2356190

Browse files
committed
feat(tpl): add login link
1 parent 0b3da29 commit 2356190

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/tpl/defaultTheme/frontend/index.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ html.dragging::before {
162162
display: none;
163163
}
164164

165+
.login {
166+
position: absolute;
167+
z-index: 1;
168+
right: 0;
169+
padding: 0.5em 1em;
170+
}
171+
165172
.tab {
166173
display: flex;
167174
white-space: nowrap;

src/tpl/defaultTheme/frontend/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
<li><a href="{{.Path}}{{$contextQueryString}}">{{fmtFilename .Name}}</a></li>
2121
{{end}}
2222
</ol>
23-
23+
{{if .LoginAvail}}
24+
<a class="login" href="{{if ne .Status 401}}{{.RootRelPath}}?auth={{.Path}}{{$contextQueryString}}{{end}}">{{.Trans.LoginLabel}}</a>
25+
{{end}}
2426
{{if .CanUpload}}
2527
<div class="upload-status">
2628
<span class="label info">

0 commit comments

Comments
 (0)