Update to use listType setting for user playlist display type

This commit is contained in:
Jason Henriquez 2024-04-12 16:56:42 -05:00
parent db4b49f3a6
commit 1b65a7c298
5 changed files with 35 additions and 50 deletions

View File

@ -115,9 +115,6 @@ export default defineComponent({
listType: function () {
return this.$store.getters.getListType
},
userPlaylistListType: function () {
return this.$store.getters.getUserPlaylistListType
},
thumbnailPreference: function () {
return this.blurThumbnails ? 'blur' : this.$store.getters.getThumbnailPreference
},
@ -256,7 +253,6 @@ export default defineComponent({
'updateLandingPage',
'updateRegion',
'updateListType',
'updateUserPlaylistListType',
'updateThumbnailPreference',
'updateForceLocalBackendForLegacy',
'updateCurrentLocale',

View File

@ -56,13 +56,6 @@
:select-values="viewTypeValues"
@change="updateListType"
/>
<ft-select
:placeholder="$t('Settings.General Settings.User Playlist View Type')"
:value="userPlaylistListType"
:select-names="viewTypeNames"
:select-values="viewTypeValues"
@change="updateUserPlaylistListType"
/>
<ft-select
:placeholder="$t('Settings.General Settings.Thumbnail Preference.Thumbnail Preference')"
:value="thumbnailPreference"

View File

@ -231,7 +231,6 @@ const state = {
showDistractionFreeTitles: false,
landingPage: 'subscriptions',
listType: 'grid',
userPlaylistListType: 'grid',
maxVideoPlaybackRate: 3,
onlyShowLatestFromChannel: false,
playNextVideo: false,

View File

@ -84,11 +84,8 @@ export default defineComponent({
playlistId: function() {
return this.$route.params.id
},
userPlaylistListType: function () {
return this.$store.getters.getUserPlaylistListType
},
listType: function () {
return this.isUserPlaylistRequested ? this.userPlaylistListType : 'list'
return this.isUserPlaylistRequested ? this.$store.getters.getListType : 'list'
},
userPlaylistsReady: function () {
return this.$store.getters.getPlaylistsReady

View File

@ -10,38 +10,38 @@
<div class="playlistInfoContainer">
<playlist-info
v-if="!isLoading"
:id="playlistId"
:first-video-id="firstVideoId"
:first-video-playlist-item-id="firstVideoPlaylistItemId"
:playlist-thumbnail="playlistThumbnail"
:title="playlistTitle"
:channel-name="channelName"
:channel-thumbnail="channelThumbnail"
:channel-id="channelId"
:last-updated="lastUpdated"
:description="playlistDescription"
:video-count="videoCount"
:videos="playlistItems"
:view-count="viewCount"
:info-source="infoSource"
:theme="listType === 'list' ? 'base' : 'top-bar'"
:more-video-data-available="moreVideoDataAvailable"
:search-video-mode-allowed="searchVideoModeAllowed"
:search-video-mode-enabled="playlistInVideoSearchMode"
:search-query-text="searchQueryTextRequested"
class="playlistInfo"
:class="{
promptOpen,
}"
@enter-edit-mode="playlistInEditMode = true"
@exit-edit-mode="playlistInEditMode = false"
@search-video-mode-on="playlistInVideoSearchMode = true"
@search-video-mode-off="playlistInVideoSearchMode = false"
@search-video-query-change="(v) => videoSearchQuery = v"
@prompt-open="promptOpen = true"
@prompt-close="promptOpen = false"
/>
v-if="!isLoading"
:id="playlistId"
:first-video-id="firstVideoId"
:first-video-playlist-item-id="firstVideoPlaylistItemId"
:playlist-thumbnail="playlistThumbnail"
:title="playlistTitle"
:channel-name="channelName"
:channel-thumbnail="channelThumbnail"
:channel-id="channelId"
:last-updated="lastUpdated"
:description="playlistDescription"
:video-count="videoCount"
:videos="playlistItems"
:view-count="viewCount"
:info-source="infoSource"
:theme="listType === 'list' ? 'base' : 'top-bar'"
:more-video-data-available="moreVideoDataAvailable"
:search-video-mode-allowed="searchVideoModeAllowed"
:search-video-mode-enabled="playlistInVideoSearchMode"
:search-query-text="searchQueryTextRequested"
class="playlistInfo"
:class="{
promptOpen,
}"
@enter-edit-mode="playlistInEditMode = true"
@exit-edit-mode="playlistInEditMode = false"
@search-video-mode-on="playlistInVideoSearchMode = true"
@search-video-mode-off="playlistInVideoSearchMode = false"
@search-video-query-change="(v) => videoSearchQuery = v"
@prompt-open="promptOpen = true"
@prompt-close="promptOpen = false"
/>
</div>
<ft-card
@ -55,9 +55,9 @@
v-if="visiblePlaylistItems.length > 0"
>
<ft-element-list
v-if="userPlaylistListType === 'grid'"
v-if="listType === 'grid'"
:data="visiblePlaylistItems"
:display="userPlaylistListType"
display="grid"
:show-video-with-last-viewed-playlist="true"
:use-channels-hidden-preference="false"
:hide-forbidden-titles="false"