support proxy prefix
This commit is contained in:
@@ -24,17 +24,19 @@
|
||||
<div class="text-right">
|
||||
{{ if .User.IsAdmin }}
|
||||
<p class="light">you can get an api key <a href="https://www.last.fm/api/account/create" target="_blank">here</a></p>
|
||||
<a href="/admin/update_lastfm_api_key">update api key</a><br/>
|
||||
<a href="{{ path "/admin/update_lastfm_api_key" }}">update api key</a><br/>
|
||||
{{ end }}
|
||||
{{ if .CurrentLastFMAPIKey }}
|
||||
<span class="light">current status</span>
|
||||
{{ if .User.LastFMSession }}
|
||||
linked
|
||||
<span class="light">|</span>
|
||||
<a href="/admin/unlink_lastfm_do">unlink</a><br/>
|
||||
<a href="{{ path "/admin/unlink_lastfm_do" }}">unlink</a><br/>
|
||||
{{ else }}
|
||||
<span class="angry">unlinked</span>
|
||||
<a href="https://www.last.fm/api/auth/?api_key={{ .CurrentLastFMAPIKey }}&cb={{ .RequestRoot }}/admin/link_lastfm_do">link</a><br/>
|
||||
{{ $cbPath := path "/admin/link_lastfm_do" }}
|
||||
{{ $cbURL := printf "%s%s" .RequestRoot $cbPath }}
|
||||
<a href="https://www.last.fm/api/auth/?api_key={{ .CurrentLastFMAPIKey }}&cb={{ $cbURL }}">link</a><br/>
|
||||
{{ end }}
|
||||
{{ else if not .User.IsAdmin }}
|
||||
<span class="light">api key not set. please ask your admin to set it</span>
|
||||
@@ -52,11 +54,11 @@
|
||||
<i>{{ $user.Name }}</i>
|
||||
<span class="light no-small">{{ $user.CreatedAt.Format "jan 02, 2006" }}</span>
|
||||
<span class="light">|</span>
|
||||
<a href="/admin/change_password?user={{ $user.Name }}">change password</a>
|
||||
<a href="{{ printf "/admin/change_password?user=%s" $user.Name | path }}">change password</a>
|
||||
<span class="light">|</span>
|
||||
<a href="/admin/delete_user?user={{ $user.Name }}">delete</a><br/>
|
||||
<a href="{{ printf "/admin/delete_user?user=%s" $user.Name | path }}">delete</a><br/>
|
||||
{{ end }}
|
||||
<a href="/admin/create_user" class="button">create new</a>
|
||||
<a href="{{ path "/admin/create_user" }}" class="button">create new</a>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{/* user panel to manage themselves */}}
|
||||
@@ -64,7 +66,7 @@
|
||||
<i class="mdi mdi-account"></i> your account
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<a href="/admin/change_own_password" class="button">change password</a>
|
||||
<a href="{{ path "/admin/change_own_password" }}" class="button">change password</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -85,7 +87,7 @@
|
||||
{{ end }}
|
||||
</table>
|
||||
{{- if not .IsScanning -}}
|
||||
<a href="/admin/start_scan_do">start scan</a>
|
||||
<a href="{{ path "/admin/start_scan_do" }}">start scan</a>
|
||||
{{- if not .LastScanTime.IsZero -}}
|
||||
<br>
|
||||
<span class="light" title="{{ .LastScanTime }}">scanned {{ .LastScanTime | humanDate }}</span>
|
||||
@@ -113,7 +115,7 @@
|
||||
<form
|
||||
id="playlist-upload-form"
|
||||
enctype="multipart/form-data"
|
||||
action="/admin/upload_playlist_do"
|
||||
action="{{ path "/admin/upload_playlist_do" }}"
|
||||
method="post"
|
||||
>
|
||||
<label for="playlist-upload-input">
|
||||
|
||||
Reference in New Issue
Block a user