|
|
|
|
@ -4,17 +4,27 @@
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
<main class="col-md-4 ms-sm-auto col-lg-10 px-md-4">
|
|
|
|
|
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
|
|
|
|
<div
|
|
|
|
|
class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
|
|
|
|
<h1 class="h2">Dashboard</h1>
|
|
|
|
|
<div class="btn-toolbar mb-2 mb-md-0">
|
|
|
|
|
{% if user.is_authenticated %}
|
|
|
|
|
<div class="btn-group me-2">
|
|
|
|
|
<button type="button" class="btn btn-sm btn-outline-secondary" data-bs-toggle="modal" data-bs-target="#importModal">Import</button>
|
|
|
|
|
<button type="button" class="btn btn-sm btn-outline-secondary" data-bs-toggle="modal" data-bs-target="#exportModal">Export</button>
|
|
|
|
|
{% if user.profile.lastfm_username %}
|
|
|
|
|
|
|
|
|
|
<form action="{% url 'scrobbles:lastfm-import' %}" method="get">
|
|
|
|
|
<button type="submit" class="btn btn-sm btn-outline-secondary">Last.fm Sync</button>
|
|
|
|
|
</form>
|
|
|
|
|
{% endif %}
|
|
|
|
|
<button type="button" class="btn btn-sm btn-outline-secondary" data-bs-toggle="modal"
|
|
|
|
|
data-bs-target="#importModal">Import</button>
|
|
|
|
|
<button type="button" class="btn btn-sm btn-outline-secondary" data-bs-toggle="modal"
|
|
|
|
|
data-bs-target="#exportModal">Export</button>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
<div class="dropdown">
|
|
|
|
|
<button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle" id="graphDateButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
|
<button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle" id="graphDateButton"
|
|
|
|
|
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
|
<span data-feather="calendar"></span>
|
|
|
|
|
This week
|
|
|
|
|
</button>
|
|
|
|
|
@ -32,27 +42,37 @@
|
|
|
|
|
|
|
|
|
|
{% if user.is_authenticated %}
|
|
|
|
|
<div class="row">
|
|
|
|
|
<p>Today <b>{{counts.today}}</b> | This Week <b>{{counts.week}}</b> | This Month <b>{{counts.month}}</b> | This Year <b>{{counts.year}}</b> | All Time <b>{{counts.alltime}}</b></p>
|
|
|
|
|
<p>Today <b>{{counts.today}}</b> | This Week <b>{{counts.week}}</b> | This Month <b>{{counts.month}}</b> |
|
|
|
|
|
This Year <b>{{counts.year}}</b> | All Time <b>{{counts.alltime}}</b></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md">
|
|
|
|
|
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#artists-week" type="button" role="tab" aria-controls="home" aria-selected="true">Weekly Artists</button>
|
|
|
|
|
<button class="nav-link active" id="home-tab" data-bs-toggle="tab"
|
|
|
|
|
data-bs-target="#artists-week" type="button" role="tab" aria-controls="home"
|
|
|
|
|
aria-selected="true">Weekly Artists</button>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<button class="nav-link" id="artist-month-tab" data-bs-toggle="tab" data-bs-target="#artists-month" type="button" role="tab" aria-controls="home" aria-selected="true">Monthly Artists</button>
|
|
|
|
|
<button class="nav-link" id="artist-month-tab" data-bs-toggle="tab"
|
|
|
|
|
data-bs-target="#artists-month" type="button" role="tab" aria-controls="home"
|
|
|
|
|
aria-selected="true">Monthly Artists</button>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#tracks-week" type="button" role="tab" aria-controls="profile" aria-selected="false">Weekly Tracks</button>
|
|
|
|
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#tracks-week"
|
|
|
|
|
type="button" role="tab" aria-controls="profile" aria-selected="false">Weekly
|
|
|
|
|
Tracks</button>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#tracks-month" type="button" role="tab" aria-controls="profile" aria-selected="false">Monthly Tracks</button>
|
|
|
|
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#tracks-month"
|
|
|
|
|
type="button" role="tab" aria-controls="profile" aria-selected="false">Monthly
|
|
|
|
|
Tracks</button>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<div class="tab-content" id="myTabContent">
|
|
|
|
|
<div class="tab-pane fade show active" id="artists-week" role="tabpanel" aria-labelledby="artists-week-tab">
|
|
|
|
|
<div class="tab-pane fade show active" id="artists-week" role="tabpanel"
|
|
|
|
|
aria-labelledby="artists-week-tab">
|
|
|
|
|
<h2>Top artists this week</h2>
|
|
|
|
|
<div class="table-responsive">
|
|
|
|
|
<table class="table table-striped table-sm">
|
|
|
|
|
@ -99,7 +119,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="tab-pane fade show" id="tracks-month" role="tabpanel" aria-labelledby="tracks-month-tab">
|
|
|
|
|
<div class="tab-pane fade show" id="tracks-month" role="tabpanel"
|
|
|
|
|
aria-labelledby="tracks-month-tab">
|
|
|
|
|
<h2>Top tracks this month</h2>
|
|
|
|
|
<div class="table-responsive">
|
|
|
|
|
<table class="table table-striped table-sm">
|
|
|
|
|
@ -123,7 +144,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="tab-pane fade show " id="artists-month" role="tabpanel" aria-labelledby="artists-month-tab">
|
|
|
|
|
<div class="tab-pane fade show " id="artists-month" role="tabpanel"
|
|
|
|
|
aria-labelledby="artists-month-tab">
|
|
|
|
|
<h2>Top artists this month</h2>
|
|
|
|
|
<div class="table-responsive">
|
|
|
|
|
<table class="table table-striped table-sm">
|
|
|
|
|
@ -150,21 +172,28 @@
|
|
|
|
|
<div class="col-md">
|
|
|
|
|
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#latest-listened" type="button" role="tab" aria-controls="home" aria-selected="true">Tracks</button>
|
|
|
|
|
<button class="nav-link active" id="home-tab" data-bs-toggle="tab"
|
|
|
|
|
data-bs-target="#latest-listened" type="button" role="tab" aria-controls="home"
|
|
|
|
|
aria-selected="true">Tracks</button>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#latest-watched" type="button" role="tab" aria-controls="profile" aria-selected="false">Videos</button>
|
|
|
|
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#latest-watched"
|
|
|
|
|
type="button" role="tab" aria-controls="profile" aria-selected="false">Videos</button>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#latest-podcasted" type="button" role="tab" aria-controls="profile" aria-selected="false">Podcasts</button>
|
|
|
|
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab"
|
|
|
|
|
data-bs-target="#latest-podcasted" type="button" role="tab" aria-controls="profile"
|
|
|
|
|
aria-selected="false">Podcasts</button>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#latest-sports" type="button" role="tab" aria-controls="profile" aria-selected="false">Sports</button>
|
|
|
|
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#latest-sports"
|
|
|
|
|
type="button" role="tab" aria-controls="profile" aria-selected="false">Sports</button>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<div class="tab-content" id="myTabContent2">
|
|
|
|
|
<div class="tab-pane fade show active" id="latest-listened" role="tabpanel" aria-labelledby="latest-listened-tab">
|
|
|
|
|
<div class="tab-pane fade show active" id="latest-listened" role="tabpanel"
|
|
|
|
|
aria-labelledby="latest-listened-tab">
|
|
|
|
|
<h2>Latest listened</h2>
|
|
|
|
|
<div class="table-responsive">
|
|
|
|
|
<table class="table table-striped table-sm">
|
|
|
|
|
@ -181,7 +210,8 @@
|
|
|
|
|
<tr>
|
|
|
|
|
<td>{{scrobble.timestamp|naturaltime}}</td>
|
|
|
|
|
{% if scrobble.track.album.cover_image %}
|
|
|
|
|
<td><img src="{{scrobble.track.album.cover_image.url}}" width=50 height=50 style="border:1px solid black;" /></td>
|
|
|
|
|
<td><img src="{{scrobble.track.album.cover_image.url}}" width=50 height=50
|
|
|
|
|
style="border:1px solid black;" /></td>
|
|
|
|
|
{% else %}
|
|
|
|
|
<td>{{scrobble.track.album.name}}</td>
|
|
|
|
|
{% endif %}
|
|
|
|
|
@ -194,7 +224,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="tab-pane fade show" id="latest-watched" role="tabpanel" aria-labelledby="latest-watched-tab">
|
|
|
|
|
<div class="tab-pane fade show" id="latest-watched" role="tabpanel"
|
|
|
|
|
aria-labelledby="latest-watched-tab">
|
|
|
|
|
<h2>Latest watched</h2>
|
|
|
|
|
<div class="table-responsive">
|
|
|
|
|
<table class="table table-striped table-sm">
|
|
|
|
|
@ -209,8 +240,11 @@
|
|
|
|
|
{% for scrobble in video_scrobble_list %}
|
|
|
|
|
<tr>
|
|
|
|
|
<td>{{scrobble.timestamp|naturaltime}}</td>
|
|
|
|
|
<td>{% if scrobble.video.tv_series %}S{{scrobble.video.season_number}}E{{scrobble.video.episode_number}} -{% endif %} {{scrobble.video.title}}</td>
|
|
|
|
|
<td>{% if scrobble.video.tv_series %}{{scrobble.video.tv_series}}{% endif %}</td>
|
|
|
|
|
<td>{% if scrobble.video.tv_series
|
|
|
|
|
%}S{{scrobble.video.season_number}}E{{scrobble.video.episode_number}} -{%
|
|
|
|
|
endif %} {{scrobble.video.title}}</td>
|
|
|
|
|
<td>{% if scrobble.video.tv_series %}{{scrobble.video.tv_series}}{% endif %}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
@ -218,7 +252,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="tab-pane fade show" id="latest-sports" role="tabpanel" aria-labelledby="latest-sports-tab">
|
|
|
|
|
<div class="tab-pane fade show" id="latest-sports" role="tabpanel"
|
|
|
|
|
aria-labelledby="latest-sports-tab">
|
|
|
|
|
<h2>Latest Sports</h2>
|
|
|
|
|
<div class="table-responsive">
|
|
|
|
|
<table class="table table-striped table-sm">
|
|
|
|
|
@ -242,7 +277,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="tab-pane fade show" id="latest-podcasted" role="tabpanel" aria-labelledby="latest-podcasted-tab">
|
|
|
|
|
<div class="tab-pane fade show" id="latest-podcasted" role="tabpanel"
|
|
|
|
|
aria-labelledby="latest-podcasted-tab">
|
|
|
|
|
<h2>Latest Podcasted</h2>
|
|
|
|
|
<div class="table-responsive">
|
|
|
|
|
<table class="table table-striped table-sm">
|
|
|
|
|
@ -272,7 +308,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
<div class="modal fade" id="importModal" tabindex="-1" role="dialog" aria-labelledby="importModalLabel" aria-hidden="true">
|
|
|
|
|
<div class="modal fade" id="importModal" tabindex="-1" role="dialog" aria-labelledby="importModalLabel"
|
|
|
|
|
aria-hidden="true">
|
|
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
@ -298,7 +335,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="modal fade" id="exportModal" tabindex="-1" role="dialog" aria-labelledby="exportModalLabel" aria-hidden="true">
|
|
|
|
|
<div class="modal fade" id="exportModal" tabindex="-1" role="dialog" aria-labelledby="exportModalLabel"
|
|
|
|
|
aria-hidden="true">
|
|
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
@ -326,7 +364,7 @@
|
|
|
|
|
|
|
|
|
|
{% block extra_js %}
|
|
|
|
|
<script>
|
|
|
|
|
$('#importModal').on('shown.bs.modal', function () { $('#importInput').trigger('focus') });
|
|
|
|
|
$('#exportModal').on('shown.bs.modal', function () { $('#exportInput').trigger('focus') });
|
|
|
|
|
$('#importModal').on('shown.bs.modal', function () { $('#importInput').trigger('focus') });
|
|
|
|
|
$('#exportModal').on('shown.bs.modal', function () { $('#exportInput').trigger('focus') });
|
|
|
|
|
</script>
|
|
|
|
|
{% endblock %}
|