From e51d8de3371bfcfa5801130422e0b02f0e460fe2 Mon Sep 17 00:00:00 2001 From: Phan An Date: Fri, 6 May 2022 10:44:10 +0200 Subject: [PATCH] feat: split and rename Apple Music button component --- .../assets/js/components/album/AlbumInfo.vue | 14 +++--- .../components/album/AlbumTrackListItem.vue | 41 ++++------------ .../js/components/artist/ArtistInfo.vue | 14 +++--- .../layout/main-wrapper/ExtraPanel.vue | 13 ++--- .../js/components/ui/AppleMusicButton.vue | 48 +++++++++++++++++++ .../js/composables/useThirdPartyServices.ts | 4 +- resources/assets/js/stores/commonStore.ts | 12 ++--- 7 files changed, 83 insertions(+), 63 deletions(-) create mode 100644 resources/assets/js/components/ui/AppleMusicButton.vue diff --git a/resources/assets/js/components/album/AlbumInfo.vue b/resources/assets/js/components/album/AlbumInfo.vue index 1d8b64dd..4ff0a56f 100644 --- a/resources/assets/js/components/album/AlbumInfo.vue +++ b/resources/assets/js/components/album/AlbumInfo.vue @@ -3,24 +3,24 @@

{{ album.name }}

- + @@ -35,9 +35,9 @@ import { computed, defineAsyncComponent, ref, toRefs, watch } from 'vue' const TrackList = defineAsyncComponent(() => import('./AlbumTrackList.vue')) const AlbumThumbnail = defineAsyncComponent(() => import('@/components/ui/AlbumArtistThumbnail.vue')) -type DisplayMode = 'sidebar' | 'full' +type DisplayMode = 'aside' | 'full' -const props = withDefaults(defineProps<{ album: Album, mode?: DisplayMode }>(), { mode: 'sidebar' }) +const props = withDefaults(defineProps<{ album: Album, mode?: DisplayMode }>(), { mode: 'aside' }) const { album, mode } = toRefs(props) const showingFullWiki = ref(false) diff --git a/resources/assets/js/components/album/AlbumTrackListItem.vue b/resources/assets/js/components/album/AlbumTrackListItem.vue index d441e539..29e4a838 100644 --- a/resources/assets/js/components/album/AlbumTrackListItem.vue +++ b/resources/assets/js/components/album/AlbumTrackListItem.vue @@ -1,29 +1,23 @@ + + diff --git a/resources/assets/js/composables/useThirdPartyServices.ts b/resources/assets/js/composables/useThirdPartyServices.ts index 0e6e00c1..7ef47754 100644 --- a/resources/assets/js/composables/useThirdPartyServices.ts +++ b/resources/assets/js/composables/useThirdPartyServices.ts @@ -4,11 +4,11 @@ import { commonStore } from '@/stores' export const useThirdPartyServices = () => { const useLastfm = toRef(commonStore.state, 'useLastfm') const useYouTube = toRef(commonStore.state, 'useYouTube') - const useiTunes = toRef(commonStore.state, 'useiTunes') + const useAppleMusic = toRef(commonStore.state, 'useiTunes') return { useLastfm, useYouTube, - useiTunes + useAppleMusic } } diff --git a/resources/assets/js/stores/commonStore.ts b/resources/assets/js/stores/commonStore.ts index f2a6245b..f798c0ae 100644 --- a/resources/assets/js/stores/commonStore.ts +++ b/resources/assets/js/stores/commonStore.ts @@ -3,16 +3,16 @@ import { reactive } from 'vue' import { httpService } from '@/services' import { - userStore, - preferenceStore, - artistStore, albumStore, - songStore, + artistStore, playlistStore, - recentlyPlayedStore, + preferenceStore, queueStore, + recentlyPlayedStore, settingStore, - themeStore + songStore, + themeStore, + userStore } from '.' interface CommonStoreState {