{{ define "user" }}
stats
artists: {{ .ArtistCount }}
albums: {{ .AlbumCount }}
tracks: {{ .TrackCount }}
last.fm
{{ if .User.IsAdmin }}

you can get an api key here

update api key
{{ end }} {{ if .CurrentLastFMAPIKey }} current status {{ if .User.LastFMSession }} linked | unlink
{{ else }} unlinked {{ $cbPath := path "/admin/link_lastfm_do" }} {{ $cbURL := printf "%s%s" .RequestRoot $cbPath }} link
{{ end }} {{ else if not .User.IsAdmin }} api key not set. please ask your admin to set it {{ end }}
{{ if .User.IsAdmin }} {{/* admin panel to manage all users */}}
users
{{ range $user := .AllUsers }} {{ $user.Name }} {{ $user.CreatedAt.Format "jan 02, 2006" }} | change password | delete
{{ end }} create new
{{ else }} {{/* user panel to manage themselves */}}
your account
change password
{{ end }}
recent folders
{{ if eq (len .RecentFolders) 0 }} no folders yet {{ end }} {{ range $folder := .RecentFolders }} {{ end }}
{{ $folder.RightPath }} {{ $folder.ModifiedAt | humanDate }}
{{- if not .IsScanning -}} start scan {{- if not .LastScanTime.IsZero -}}
scanned {{ .LastScanTime | humanDate }} {{ end }} {{ end }}
playlists
{{ if eq (len .Playlists) 0 }} no playlists yet {{ end }} {{ range $playlist := .Playlists }} {{ end }}
{{ $playlist.Name }} ({{ $playlist.TrackCount }} tracks) {{ $playlist.CreatedAt | humanDate }}
{{ end }}