diff --git a/front/src/components/audio/album/Widget.vue b/front/src/components/audio/album/Widget.vue index ecc0a280e..609ef6ebc 100644 --- a/front/src/components/audio/album/Widget.vue +++ b/front/src/components/audio/album/Widget.vue @@ -2,10 +2,11 @@

+ {{ count }}

- - - + + +
@@ -33,6 +34,7 @@
+
No results matching your query.
@@ -43,7 +45,9 @@ import PlayButton from '@/components/audio/PlayButton' export default { props: { - filters: {type: Object, required: true} + filters: {type: Object, required: true}, + controls: {type: Boolean, default: true}, + showCount: {type: Boolean, default: false}, }, components: { PlayButton @@ -52,6 +56,7 @@ export default { return { albums: [], limit: 12, + count: 0, isLoading: false, errors: null, previousPage: null, @@ -76,6 +81,7 @@ export default { self.nextPage = response.data.next self.isLoading = false self.albums = response.data.results + self.count = response.data.count }, error => { self.isLoading = false self.errors = error.backendErrors diff --git a/front/src/components/audio/artist/Widget.vue b/front/src/components/audio/artist/Widget.vue index b78bcbf94..1b88feae7 100644 --- a/front/src/components/audio/artist/Widget.vue +++ b/front/src/components/audio/artist/Widget.vue @@ -142,8 +142,14 @@ export default { right: 0; bottom: 0; } + .ui.three.cards .card { - width: 25em; + width: 100%; +} +@include media(">tablet") { + .ui.three.cards .card { + width: 25em; + } } .with-overlay { background-size: cover !important; diff --git a/front/src/components/audio/track/Widget.vue b/front/src/components/audio/track/Widget.vue index b8ad3c639..ecb967ab8 100644 --- a/front/src/components/audio/track/Widget.vue +++ b/front/src/components/audio/track/Widget.vue @@ -2,12 +2,13 @@

+ {{ count }}

-
+
@@ -28,7 +29,9 @@
-
+ + +
@{{ object.user.username }}
@@ -50,19 +53,25 @@ import _ from '@/lodash' import axios from 'axios' import PlayButton from '@/components/audio/PlayButton' +import TagsList from "@/components/tags/List" export default { props: { filters: {type: Object, required: true}, - url: {type: String, required: true} + url: {type: String, required: true}, + isActivity: {type: Boolean, default: true}, + showCount: {type: Boolean, default: false}, + limit: {type: Number, default: 5}, + itemClasses: {type: String, default: ''}, }, components: { - PlayButton + PlayButton, + TagsList }, data () { return { objects: [], - limit: 5, + count: 0, isLoading: false, errors: null, previousPage: null, @@ -86,7 +95,15 @@ export default { self.previousPage = response.data.previous self.nextPage = response.data.next self.isLoading = false - self.objects = response.data.results + self.count = response.data.count + if (self.isActivity) { + // we have listening/favorites objects, not directly tracks + self.objects = response.data.results + } else { + self.objects = response.data.results.map((r) => { + return {track: r} + }) + } }, error => { self.isLoading = false self.errors = error.backendErrors @@ -129,4 +146,18 @@ export default { .ui.divided.items > .item:last-child { padding-bottom: 1em !important; } + +@include media(">tablet") { + .divided.items > .track-item.inline { + width: 25em; + float: left; + border-top: none; + &, + &:first-child { + margin-top: 0.5em !important; + margin-right: 0.5em !important; + padding: 1em 0 !important; + } + } +} diff --git a/front/src/components/library/TagDetail.vue b/front/src/components/library/TagDetail.vue new file mode 100644 index 000000000..86ad1562a --- /dev/null +++ b/front/src/components/library/TagDetail.vue @@ -0,0 +1,79 @@ + + + + + + diff --git a/front/src/router/index.js b/front/src/router/index.js index 630d4890a..1d4996746 100644 --- a/front/src/router/index.js +++ b/front/src/router/index.js @@ -473,6 +473,13 @@ export default new Router({ id: route.params.id, defaultEdit: route.query.mode === 'edit' }) }, + { + path: 'tags/:id', + name: 'library.tags.detail', + component: () => + import(/* webpackChunkName: "core" */ "@/components/library/TagDetail"), + props: true, + }, { path: 'artists/:id', component: () => diff --git a/front/src/style/_main.scss b/front/src/style/_main.scss index 90fdd8936..9a2fe1722 100644 --- a/front/src/style/_main.scss +++ b/front/src/style/_main.scss @@ -370,7 +370,7 @@ input + .help { .tag-list { - margin-top: 1em; + margin-top: 0.5em; } @import "./themes/_light.scss";