diff --git a/web-src/src/components/HeadingHero.vue b/web-src/src/components/HeadingHero.vue
new file mode 100644
index 00000000..654ed56a
--- /dev/null
+++ b/web-src/src/components/HeadingHero.vue
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/web-src/src/pages/PageAlbum.vue b/web-src/src/pages/PageAlbum.vue
index 0393c75e..01061784 100644
--- a/web-src/src/pages/PageAlbum.vue
+++ b/web-src/src/pages/PageAlbum.vue
@@ -1,25 +1,10 @@
-
-
-
-
-
-
-
-
+
+
-
+
import ContentWithHero from '@/templates/ContentWithHero.vue'
-import ControlButton from '@/components/ControlButton.vue'
import ControlImage from '@/components/ControlImage.vue'
import { GroupedList } from '@/lib/GroupedList'
+import HeadingHero from '@/components/HeadingHero.vue'
import ListTracks from '@/components/ListTracks.vue'
import ModalDialogAlbum from '@/components/ModalDialogAlbum.vue'
import webapi from '@/webapi'
@@ -56,7 +41,6 @@ const dataObject = {
webapi.library_album_tracks(to.params.id)
])
},
-
set(vm, response) {
vm.album = response[0].data
vm.tracks = new GroupedList(response[1].data, {
@@ -73,8 +57,8 @@ export default {
name: 'PageAlbum',
components: {
ContentWithHero,
- ControlButton,
ControlImage,
+ HeadingHero,
ListTracks,
ModalDialogAlbum
},
@@ -90,6 +74,20 @@ export default {
tracks: new GroupedList()
}
},
+ computed: {
+ heading() {
+ return {
+ count: this.$t('count.tracks', { count: this.album.track_count }),
+ handler: this.openArtist,
+ subtitle: this.album.artist,
+ title: this.album.name,
+ actions: [
+ { handler: this.play, icon: 'shuffle', key: 'actions.shuffle' },
+ { handler: this.openDetails, icon: 'dots-horizontal' }
+ ]
+ }
+ }
+ },
methods: {
openArtist() {
this.showDetailsModal = false
diff --git a/web-src/src/pages/PageAlbumSpotify.vue b/web-src/src/pages/PageAlbumSpotify.vue
index 73b268a2..87e5aa91 100644
--- a/web-src/src/pages/PageAlbumSpotify.vue
+++ b/web-src/src/pages/PageAlbumSpotify.vue
@@ -1,25 +1,10 @@
-
-
-
-
-
-
-
-
+
+
-
+
import ContentWithHero from '@/templates/ContentWithHero.vue'
-import ControlButton from '@/components/ControlButton.vue'
import ControlImage from '@/components/ControlImage.vue'
+import HeadingHero from '@/components/HeadingHero.vue'
import ListTracksSpotify from '@/components/ListTracksSpotify.vue'
import ModalDialogAlbumSpotify from '@/components/ModalDialogAlbumSpotify.vue'
import SpotifyWebApi from 'spotify-web-api-js'
@@ -67,8 +52,8 @@ export default {
name: 'PageAlbumSpotify',
components: {
ContentWithHero,
- ControlButton,
ControlImage,
+ HeadingHero,
ListTracksSpotify,
ModalDialogAlbumSpotify
},
@@ -87,6 +72,18 @@ export default {
}
},
computed: {
+ heading() {
+ return {
+ count: this.$t('count.tracks', { count: this.album.tracks.total }),
+ handler: this.openArtist,
+ subtitle: this.album.artists[0].name,
+ title: this.album.name,
+ actions: [
+ { handler: this.play, icon: 'shuffle', key: 'actions.shuffle' },
+ { handler: this.openDetails, icon: 'dots-horizontal' }
+ ]
+ }
+ },
tracks() {
const { album } = this
if (album.tracks.total) {
diff --git a/web-src/src/pages/PageAudiobooksAlbum.vue b/web-src/src/pages/PageAudiobooksAlbum.vue
index 18039244..19b38fcc 100644
--- a/web-src/src/pages/PageAudiobooksAlbum.vue
+++ b/web-src/src/pages/PageAudiobooksAlbum.vue
@@ -1,29 +1,10 @@
-
-
-
-
-
-
-
-
+
+
-
+
import ContentWithHero from '@/templates/ContentWithHero.vue'
-import ControlButton from '@/components/ControlButton.vue'
import ControlImage from '@/components/ControlImage.vue'
import { GroupedList } from '@/lib/GroupedList'
+import HeadingHero from '@/components/HeadingHero.vue'
import ListTracks from '@/components/ListTracks.vue'
import ModalDialogAlbum from '@/components/ModalDialogAlbum.vue'
import webapi from '@/webapi'
@@ -71,8 +52,8 @@ export default {
name: 'PageAudiobooksAlbum',
components: {
ContentWithHero,
- ControlButton,
ControlImage,
+ HeadingHero,
ListTracks,
ModalDialogAlbum
},
@@ -88,6 +69,20 @@ export default {
tracks: new GroupedList()
}
},
+ computed: {
+ heading() {
+ return {
+ count: this.$t('count.tracks', { count: this.album.track_count }),
+ handler: this.openArtist,
+ subtitle: this.album.artist,
+ title: this.album.name,
+ actions: [
+ { handler: this.play, icon: 'play', key: 'actions.play' },
+ { handler: this.openDetails, icon: 'dots-horizontal' }
+ ]
+ }
+ }
+ },
methods: {
openArtist() {
this.showDetailsModal = false
diff --git a/web-src/src/pages/PagePodcast.vue b/web-src/src/pages/PagePodcast.vue
index 3131772b..5457e388 100644
--- a/web-src/src/pages/PagePodcast.vue
+++ b/web-src/src/pages/PagePodcast.vue
@@ -1,25 +1,10 @@
-
-
-
-
-
-
-
-
-
-
+
+
-
+
import ContentWithHero from '@/templates/ContentWithHero.vue'
-import ControlButton from '@/components/ControlButton.vue'
import ControlImage from '@/components/ControlImage.vue'
import { GroupedList } from '@/lib/GroupedList'
+import HeadingHero from '@/components/HeadingHero.vue'
import ListTracks from '@/components/ListTracks.vue'
import ModalDialog from '@/components/ModalDialog.vue'
import ModalDialogAlbum from '@/components/ModalDialogAlbum.vue'
@@ -92,8 +77,8 @@ export default {
name: 'PagePodcast',
components: {
ContentWithHero,
- ControlButton,
ControlImage,
+ HeadingHero,
ListTracks,
ModalDialog,
ModalDialogAlbum
@@ -126,6 +111,17 @@ export default {
key: this.$t('page.podcast.remove')
}
]
+ },
+ heading() {
+ return {
+ count: this.$t('count.tracks', { count: this.album.track_count }),
+ subtitle: '',
+ title: this.album.name,
+ actions: [
+ { handler: this.play, icon: 'play', key: 'actions.play' },
+ { handler: this.openDetails, icon: 'dots-horizontal' }
+ ]
+ }
}
},
methods: {
diff --git a/web-src/src/templates/ContentWithHero.vue b/web-src/src/templates/ContentWithHero.vue
index c6893180..fc3df543 100644
--- a/web-src/src/templates/ContentWithHero.vue
+++ b/web-src/src/templates/ContentWithHero.vue
@@ -5,10 +5,10 @@