added webui lastfm importing, account sessions, partial codebase cleanup

This commit is contained in:
2026-02-07 23:57:43 -08:00
parent b8150a2f34
commit eb06ddc35c
9 changed files with 623 additions and 316 deletions

View File

@@ -14,11 +14,16 @@
<label for="pass">Password:</label>
<input type="password" id="pass" name="pass"> <br> <br>
<input type="submit" value="Login">
{{if .ShowError}}
{{if eq .Error "1"}}
<div class="login-error">
Invalid credentials. Please try again.
</div>
{{end}}
{{if eq .Error "2"}}
<div class="login-error">
Unable to create session. Please try again.
</div>
{{end}}
</form>
</div>
</body>

View File

@@ -13,10 +13,15 @@
<h1>{{.Username}}</h1>
<h2>{{.Bio}}</h2>
</div>
<div class="user-stats-top">
<h3>{{.ScrobbleCount}} Listens</h3>
<h3>{{.ArtistCount}} Artists</h3>
<div class="profile-top-blank">
</div>
<div class="user-stats-top">
<h3>{{formatInt .ScrobbleCount}}</h3> <p>Listens<p>
<h3>{{formatInt .ArtistCount}}</h3> <p>Artists<p>
</div>
</div>
<div class="profile-actions">
<a href="/import" class="btn">Import Data</a>
</div>
<div class="history">
<h3>Listening History</h3>
@@ -38,8 +43,10 @@
</table>
</div>
<div class="page_buttons">
<a href="/profile/{{.Username}}?page={{Sub .Page 1}}">Prev Page</a>
<a href="/profile/{{.Username}}?page={{Add .Page 1}}">Next Page</a>
{{if gt .Page 1 }}
<a href="/profile/{{.Username}}?page={{sub .Page 1}}">Prev Page</a>
{{end}}
<a href="/profile/{{.Username}}?page={{add .Page 1}}">Next Page</a>
</div>
</body>
</html>