diff --git a/api/funkwhale_api/music/serializers.py b/api/funkwhale_api/music/serializers.py index 9a26361b3..756d18bfc 100644 --- a/api/funkwhale_api/music/serializers.py +++ b/api/funkwhale_api/music/serializers.py @@ -210,6 +210,7 @@ def serialize_album_track(track): class AlbumSerializer(OptionalDescriptionMixin, serializers.Serializer): + # XXX: remove in 1.0, it's expensive and can work with a filter/api call tracks = serializers.SerializerMethodField() artist = serializers.SerializerMethodField() cover = cover_field diff --git a/front/src/components/audio/AlbumEntries.vue b/front/src/components/audio/AlbumEntries.vue new file mode 100644 index 000000000..c9218b33a --- /dev/null +++ b/front/src/components/audio/AlbumEntries.vue @@ -0,0 +1,57 @@ + + + diff --git a/front/src/components/audio/ArtistLabel.vue b/front/src/components/audio/ArtistLabel.vue new file mode 100644 index 000000000..6f2b6e211 --- /dev/null +++ b/front/src/components/audio/ArtistLabel.vue @@ -0,0 +1,26 @@ + + + diff --git a/front/src/components/audio/ChannelEntries.vue b/front/src/components/audio/ChannelEntries.vue index 99ff45942..af3f27943 100644 --- a/front/src/components/audio/ChannelEntries.vue +++ b/front/src/components/audio/ChannelEntries.vue @@ -15,7 +15,7 @@ diff --git a/front/src/components/library/TrackDetail.vue b/front/src/components/library/TrackDetail.vue index d271ed88c..ffc4be818 100644 --- a/front/src/components/library/TrackDetail.vue +++ b/front/src/components/library/TrackDetail.vue @@ -16,7 +16,7 @@ Duration - + N/A @@ -60,7 +60,7 @@ + :can-update="false">

Release Details

@@ -154,7 +154,6 @@ - - - diff --git a/front/src/components/metadata/CardMixin.vue b/front/src/components/metadata/CardMixin.vue deleted file mode 100644 index a7cd476f6..000000000 --- a/front/src/components/metadata/CardMixin.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - diff --git a/front/src/components/metadata/ReleaseCard.vue b/front/src/components/metadata/ReleaseCard.vue deleted file mode 100644 index 08a0fe4a5..000000000 --- a/front/src/components/metadata/ReleaseCard.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - diff --git a/front/src/components/metadata/Search.vue b/front/src/components/metadata/Search.vue deleted file mode 100644 index f7feb511f..000000000 --- a/front/src/components/metadata/Search.vue +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - diff --git a/front/src/filters.js b/front/src/filters.js index b88df2f0e..030e50e83 100644 --- a/front/src/filters.js +++ b/front/src/filters.js @@ -1,5 +1,7 @@ import Vue from 'vue' +import time from '@/utils/time' + import moment from 'moment' export function truncate (str, max, ellipsis, middle) { @@ -89,6 +91,12 @@ export function padDuration (duration) { Vue.filter('padDuration', padDuration) +export function duration (seconds) { + return time.parse(seconds) +} + +Vue.filter('duration', duration) + export function momentFormat (date, format) { format = format || 'lll' return moment(date).format(format) diff --git a/front/src/style/_main.scss b/front/src/style/_main.scss index 3af8480d3..ce47d9736 100644 --- a/front/src/style/_main.scss +++ b/front/src/style/_main.scss @@ -420,6 +420,10 @@ input + .help { .ui.very.small.divider { margin: 0.25rem 0; } +.ui.horizontal.divider { + display: inline-block; + margin: 0 0.5em; +} .queue.segment.player-focused #queue-grid #player { @include media(" div { + display: flex; + align-items: center; + justify-content: space-between; + } + .content { + flex-grow: 1; + } +} +.ui.artist-label { + .icon { + width: 2em; + } + &.rounded { + border-radius: 5em; + padding: 0.2em 0.75em 0.2em 0.2em; + line-height: 2em; + img { + border-radius: 50%; + vertical-align: middle; + } + } +} +.album-entry, .channel-entry-card { + border-radius: 5px; + padding: 0.5em; + .meta { + text-align: right; + min-width: 7em; + } + > div { + padding: 0.25em; + &:not(:last-child) { + margin-right: 0.25em; + } + } + &.active { + background: rgba(155, 155, 155, 0.2); + } + &:hover { + background: rgba(155, 155, 155, 0.1); + } + .favorite-icon.tiny.button { + border: none !important; + padding: 0 !important; + margin: 0 0.5em; + } +} .channel-image { border: 1px solid rgba(0, 0, 0, 0.15); background-color: white; diff --git a/front/src/style/themes/_light.scss b/front/src/style/themes/_light.scss index 2ab581eb8..acfeee911 100644 --- a/front/src/style/themes/_light.scss +++ b/front/src/style/themes/_light.scss @@ -18,6 +18,9 @@ .discrete { color: rgba(0, 0, 0, 0.87); } + .really.discrete { + color: rgba(0, 0, 0, 0.57); + } .playlist.card { .attached.button { background-color: rgb(243, 244, 245); diff --git a/front/src/utils/time.js b/front/src/utils/time.js index ca3edbdea..6c5770c12 100644 --- a/front/src/utils/time.js +++ b/front/src/utils/time.js @@ -9,9 +9,16 @@ function pad (val) { export default { parse: function (sec) { let min = 0 + let hours = Math.floor(sec/3600) + if (hours >= 1) { + sec = sec % 3600 + } min = Math.floor(sec / 60) sec = sec - min * 60 - return pad(min) + ':' + pad(sec) + if (hours >= 1) { + return hours + ':' + pad(min) + ':' + pad(sec) + } + return min + ':' + pad(sec) }, durationFormatted (v) { let duration = parseInt(v) diff --git a/front/src/views/admin/library/UploadDetail.vue b/front/src/views/admin/library/UploadDetail.vue index 3cd32ed41..eaef1cc4a 100644 --- a/front/src/views/admin/library/UploadDetail.vue +++ b/front/src/views/admin/library/UploadDetail.vue @@ -240,7 +240,7 @@ N/A diff --git a/front/src/views/channels/DetailBase.vue b/front/src/views/channels/DetailBase.vue index 2445f1091..de07b4e22 100644 --- a/front/src/views/channels/DetailBase.vue +++ b/front/src/views/channels/DetailBase.vue @@ -206,7 +206,8 @@ Overview - Episodes + Episodes + Tracks @@ -313,6 +314,9 @@ export default { isOwner () { return this.$store.state.auth.authenticated && this.object.attributed_to.full_username === this.$store.state.auth.fullUsername }, + isPodcast () { + return this.object.artist.content_category === 'podcast' + }, labels () { return { title: this.$pgettext('*/*/*', 'Channel') diff --git a/front/src/views/channels/DetailOverview.vue b/front/src/views/channels/DetailOverview.vue index 8a739028a..7d1212753 100644 --- a/front/src/views/channels/DetailOverview.vue +++ b/front/src/views/channels/DetailOverview.vue @@ -51,13 +51,16 @@

- Latest episodes + Latest episodes + Latest tracks

- +

- Series + + Series + Albums