Merge branch 'main' into enhancement/lastfm

This commit is contained in:
Core 2022-06-26 15:00:19 +01:00
commit 7874340caa
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
17 changed files with 190 additions and 98 deletions

1
.gitignore vendored
View file

@ -328,3 +328,4 @@ savedconfig/cider-config.json
savedconfig/config.json savedconfig/config.json
savedconfig/session.json savedconfig/session.json
savedconfig/window-state.json savedconfig/window-state.json
src/main/base/sample.json

View file

@ -386,5 +386,13 @@
"term.track": { "term.track": {
"one": "Titel", "one": "Titel",
"other": "Titel" "other": "Titel"
} },
"settings.option.visual.customAccentColor": "Benutzerdefinierte Akzentfarbe",
"settings.option.visual.accentColor": "Akzentfarbe",
"settings.option.visual.purplePodcastPlaybackBar": "Lila Wiedergabeleiste für Podcasts",
"settings.option.visual.windowColor": "Fenstertönung Farbe",
"action.cut": "Ausschneiden",
"action.paste": "Einfügen",
"action.selectAll": "Alles auswählen",
"action.delete": "Löschen"
} }

View file

@ -22,7 +22,6 @@
"term.logout": "Wogout", "term.logout": "Wogout",
"term.login": "Wog In", "term.login": "Wog In",
"term.quickNav": "Quick Nyav", "term.quickNav": "Quick Nyav",
"term.cast": "Cast",
"term.about": "About", "term.about": "About",
"term.privateSession": "Pwivate Session", "term.privateSession": "Pwivate Session",
"term.disablePrivateSession": "Disabwe Pwivate Session", "term.disablePrivateSession": "Disabwe Pwivate Session",
@ -42,6 +41,7 @@
"term.artists": "Awtists", "term.artists": "Awtists",
"term.podcasts": "Podcasts", "term.podcasts": "Podcasts",
"term.playlists": "Pwaywists", "term.playlists": "Pwaywists",
"term.charts": "Chawts",
"term.playlist": "Pwaywist", "term.playlist": "Pwaywist",
"term.newPlaylist": "Nyew Pwaywist", "term.newPlaylist": "Nyew Pwaywist",
"term.newPlaylistFolder": "Nyew Pwaywist Fowdew", "term.newPlaylistFolder": "Nyew Pwaywist Fowdew",
@ -51,6 +51,7 @@
"term.navigateBack": "Nyavigate back", "term.navigateBack": "Nyavigate back",
"term.navigateForward": "Nyavigate fowwawd", "term.navigateForward": "Nyavigate fowwawd",
"term.play": "Pway", "term.play": "Pway",
"term.playpause": "Pway/Pause",
"term.pause": "Pause", "term.pause": "Pause",
"term.stop": "Stop", "term.stop": "Stop",
"term.previous": "Pwevious", "term.previous": "Pwevious",
@ -153,6 +154,7 @@
}, },
"term.videos": "Videos", "term.videos": "Videos",
"term.menu": "Menyu", "term.menu": "Menyu",
"term.themeManaged": "Manyaged by a theme",
"term.check": "Check", "term.check": "Check",
"term.aboutArtist": "About {{artistName}}", "term.aboutArtist": "About {{artistName}}",
"term.topResult": "Top Wesuwt", "term.topResult": "Top Wesuwt",
@ -192,6 +194,16 @@
"term.confirmLogout": "Awe you suwe you want to wogout?", "term.confirmLogout": "Awe you suwe you want to wogout?",
"term.creditDesignedBy": "Designyed by ${authorUsername}", "term.creditDesignedBy": "Designyed by ${authorUsername}",
"term.discNumber": "Disc ${discNumber}", "term.discNumber": "Disc ${discNumber}",
"term.reload": "Wewoad Cidew ?",
"term.toggleprivate": "Toggwe Pwivate Session",
"term.webremote": "Web Wemote",
"term.cast": "Cast",
"term.cast2": "Cast to Devices",
"term.quit": "Quit",
"term.zoomin": "Zoom In",
"term.zoomout": "Zoom Out",
"term.zoomreset": "Weset Zoom",
"term.fullscreen": "Fuwwscween",
"home.title": "Home", "home.title": "Home",
"home.recentlyPlayed": "Wecentwy Pwayed", "home.recentlyPlayed": "Wecentwy Pwayed",
"home.recentlyAdded": "Wecentwy Added", "home.recentlyAdded": "Wecentwy Added",
@ -264,11 +276,7 @@
"action.export": "Expowt", "action.export": "Expowt",
"action.showAlbum": "Show Compwete Awbum", "action.showAlbum": "Show Compwete Awbum",
"action.tray.minimize": "Minyimize to Tway", "action.tray.minimize": "Minyimize to Tway",
"action.tray.quit": "Quit",
"action.tray.show": "Show Cidew", "action.tray.show": "Show Cidew",
"action.tray.playpause": "Pway/Pause",
"action.tray.next": "Nyext",
"action.tray.previous": "Pwevious",
"action.tray.listento": "Wisten To:", "action.tray.listento": "Wisten To:",
"action.update": "Update", "action.update": "Update",
"action.install": "Instaww", "action.install": "Instaww",
@ -288,45 +296,26 @@
"action.createNew": "Cweate Nyew...", "action.createNew": "Cweate Nyew...",
"action.openArtworkInBrowser": "Open awtwowk in bwowsew", "action.openArtworkInBrowser": "Open awtwowk in bwowsew",
"action.scrollToTop": "Scwoww to top", "action.scrollToTop": "Scwoww to top",
"menubar.options.about": "About", "menubar.options.view": "View",
"menubar.options.settings": "Settings",
"menubar.options.quit": "Quit Cidew",
"menubar.options.view": "View ",
"menubar.options.reload": "Wewoad", "menubar.options.reload": "Wewoad",
"menubar.options.forcereload": "Fowce Wewoad", "menubar.options.forcereload": "Fowce Wewoad",
"menubar.options.toggledevtools": "Toggwe Devewopew Toows", "menubar.options.toggledevtools": "Toggwe Devewopew Toows",
"menubar.options.window": "Window", "menubar.options.window": "Window",
"menubar.options.minimize": "Minyimize", "menubar.options.minimize": "Minyimize",
"menubar.options.toggleprivate": "Toggwe Pwivate Session",
"menubar.options.webremote": "Web Wemote",
"menubar.options.audio": "Audio Settings",
"menubar.options.plugins": "Pwu-gins Menyu", "menubar.options.plugins": "Pwu-gins Menyu",
"menubar.options.controls": "Contwows", "menubar.options.controls": "Contwows",
"menubar.options.next": "Nyext",
"menubar.options.playpause": "Pway/Pause",
"menubar.options.previous": "Pwevious",
"menubar.options.volumeup": "Vowume Up", "menubar.options.volumeup": "Vowume Up",
"menubar.options.volumedown": "Vowume Down", "menubar.options.volumedown": "Vowume Down",
"menubar.options.browse": "Bwowse",
"menubar.options.artists": "Awtists",
"menubar.options.search": "Seawch",
"menubar.options.albums": "Awbums",
"menubar.options.cast": "Cast To Devices",
"menubar.options.account": "Account", "menubar.options.account": "Account",
"menubar.options.accountsettings": "Account Settings",
"menubar.options.signout": "Sign Out", "menubar.options.signout": "Sign Out",
"menubar.options.support": "Suppowt", "menubar.options.support": "Suppowt",
"menubar.options.discord": "Discowd",
"menubar.options.github": "GitHub Wiki",
"menubar.options.report": "Wepowt a...", "menubar.options.report": "Wepowt a...",
"menubar.options.bug": "Bug", "menubar.options.bug": "Bug",
"menubar.options.feature": "Featuwe Wequest", "menubar.options.feature": "Featuwe Wequest",
"menubar.options.trans": "Twanswation Wepowt/Wequest", "menubar.options.trans": "Twanswation Wepowt/Wequest",
"menubar.options.license": "View Wicense", "menubar.options.license": "View Wicense",
"menubar.options.conf": "Open Configuwation Fiwe in Editow", "menubar.options.conf": "Open Configuwation Fiwe in Editow",
"menubar.options.listennow": "Wisten Nyow", "menubar.options.zoom": "Zoom",
"menubar.options.recentlyAdded": "Wecentwy Added",
"menubar.options.songs": "Songs",
"settings.header.general": "Genyewaw", "settings.header.general": "Genyewaw",
"settings.header.general.description": "Adjust the genyewaw settings fow Cidew.", "settings.header.general.description": "Adjust the genyewaw settings fow Cidew.",
"settings.option.general.language": "Wanguage", "settings.option.general.language": "Wanguage",
@ -346,11 +335,15 @@
"settings.option.general.customizeSidebar": "Customize Sidebaw Items", "settings.option.general.customizeSidebar": "Customize Sidebaw Items",
"settings.option.general.customizeSidebar.customize": "Customize", "settings.option.general.customizeSidebar.customize": "Customize",
"settings.option.general.keybindings": "Keybindings", "settings.option.general.keybindings": "Keybindings",
"settings.option.general.keybindings.library": "Wibwawy",
"settings.option.general.keybindings.session": "Session",
"settings.option.general.keybindings.control": "Contwows",
"settings.option.general.keybindings.interface": "Intewface",
"settings.option.general.keybindings.advanced": "Advanced",
"settings.option.general.keybindings.pressCombination": "Pwess a combinyation of two keys to update keybind.", "settings.option.general.keybindings.pressCombination": "Pwess a combinyation of two keys to update keybind.",
"settings.option.general.keybindings.pressEscape": "Pwess Escape key to go back.", "settings.option.general.keybindings.pressEscape": "Pwess Escape key to go back.",
"settings.notyf.general.keybindings.update.success": "Keybind updated successfuwwy", "settings.notyf.general.keybindings.update.success": "Keybind updated successfuwwy",
"settings.prompt.general.keybindings.update.success": "Keybind updated successfuwwy. Pwess OK to wewaunch Cidew", "settings.prompt.general.keybindings.update.success": "Keybind updated successfuwwy. Pwess OK to wewaunch Cidew",
"settings.option.general.keybindings.open": "Open",
"settings.option.general.themeUpdateNotification": "Automaticawwy check fow theme updates", "settings.option.general.themeUpdateNotification": "Automaticawwy check fow theme updates",
"settings.option.general.showLovedTracksInline": "Show wuvd twacks inwinye", "settings.option.general.showLovedTracksInline": "Show wuvd twacks inwinye",
"settings.description.search": "Seawch", "settings.description.search": "Seawch",

View file

@ -169,14 +169,14 @@ export class Store {
"dBSPL": false, "dBSPL": false,
"dBSPLcalibration": 90, "dBSPLcalibration": 90,
"maikiwiAudio": { "maikiwiAudio": {
"ciderPPE": false, "ciderPPE": true,
"ciderPPE_value": "MAIKIWI", "ciderPPE_value": "MAIKIWI",
"atmosphereRealizer1": false, "atmosphereRealizer1": false,
"atmosphereRealizer1_value": "NATURAL_STANDARD", "atmosphereRealizer1_value": "NATURAL_STANDARD",
"atmosphereRealizer2": false, "atmosphereRealizer2": false,
"atmosphereRealizer2_value": "NATURAL_STANDARD", "atmosphereRealizer2_value": "NATURAL_STANDARD",
"spatial": false, "spatial": false,
"spatialProfile": "71_420maikiwi", "spatialProfile": "BPLK",
"vibrantBass": { // Hard coded into the app. Don't include any of this config into exporting presets in store.ts "vibrantBass": { // Hard coded into the app. Don't include any of this config into exporting presets in store.ts
'frequencies': [17.182, 42.169, 53.763, 112.69, 119.65, 264.59, 336.57, 400.65, 505.48, 612.7, 838.7, 1155.3, 1175.6, 3406.8, 5158.6, 5968.1, 6999.9, 7468.6, 8862.9, 9666, 10109], 'frequencies': [17.182, 42.169, 53.763, 112.69, 119.65, 264.59, 336.57, 400.65, 505.48, 612.7, 838.7, 1155.3, 1175.6, 3406.8, 5158.6, 5968.1, 6999.9, 7468.6, 8862.9, 9666, 10109],
'Q': [2.5, 0.388, 5, 5, 2.5, 7.071, 14.14, 10, 7.071, 14.14, 8.409, 0.372, 7.071, 10, 16.82, 7.071, 28.28, 20, 8.409, 40, 40], 'Q': [2.5, 0.388, 5, 5, 2.5, 7.071, 14.14, 10, 7.071, 14.14, 8.409, 0.372, 7.071, 10, 16.82, 7.071, 28.28, 20, 8.409, 40, 40],

View file

@ -658,6 +658,29 @@
width : 100%; width : 100%;
height : 100%; height : 100%;
.playlist-hero {
width : 100%;
transform : translateX(+25%);
position : absolute;
z-index : -1;
top : 0;
left : 0;
right : 0;
bottom : 0;
.mediaitem-artwork {
-webkit-mask-image: -webkit-radial-gradient(center, circle cover, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 75%);
border-radius : 0px;
}
.hero-tint {
position: absolute;
top : 0;
opacity: 0.6;
width: 100%;
height: 100%;
}
}
>.row { >.row {
width: calc(100% - 32px); width: calc(100% - 32px);
} }
@ -677,6 +700,10 @@
flex-shrink : unset; flex-shrink : unset;
} }
.search-input::placeholder {
color: var(--heroplaceholdercolor)
}
.nameEdit { .nameEdit {
font-weight: 700; font-weight: 700;
font-size : 1.6rem; font-size : 1.6rem;

View file

@ -24,7 +24,7 @@ const Events = {
// CTRL + R // CTRL + R
if (event.keyCode === 82 && event.ctrlKey) { if (event.keyCode === 82 && event.ctrlKey) {
event.preventDefault() event.preventDefault()
bootbox.confirm(app.getLz('term.reload'), (res)=>{ app.confirm(app.getLz('term.reload'), (res)=>{
if (res) { if (res) {
window.location.reload() window.location.reload()
} }

View file

@ -1177,7 +1177,7 @@ const app = new Vue({
} }
}, },
unauthorize() { unauthorize() {
bootbox.confirm(app.getLz('term.confirmLogout'), function (result) { this.confirm(app.getLz('term.confirmLogout'), function (result) {
if (result) { if (result) {
app.mk.unauthorize() app.mk.unauthorize()
document.location.reload() document.location.reload()
@ -1558,22 +1558,24 @@ const app = new Vue({
}, },
deletePlaylist(id) { deletePlaylist(id) {
let self = this let self = this
if (confirm(app.getLz('term.deletePlaylist'))) { this.confirm(app.getLz('term.deletePlaylist'), (ok) => {
app.mk.api.v3.music(`/v1/me/library/playlists/${id}`, {}, { if (ok) {
fetchOptions: { app.mk.api.v3.music(`/v1/me/library/playlists/${id}`, {}, {
method: "DELETE" fetchOptions: {
} method: "DELETE"
}).then(res => { }
// remove this playlist from playlists.listing if it exists }).then(res => {
let found = self.playlists.listing.find(item => item.id == id) // remove this playlist from playlists.listing if it exists
if (found) { let found = self.playlists.listing.find(item => item.id == id)
self.playlists.listing.splice(self.playlists.listing.indexOf(found), 1) if (found) {
} self.playlists.listing.splice(self.playlists.listing.indexOf(found), 1)
setTimeout(() => { }
app.refreshPlaylists(false, false); setTimeout(() => {
}, 8000); app.refreshPlaylists(false, false);
}) }, 8000);
} })
}
});
}, },
/** /**
* @param {string} url, href for the initial request * @param {string} url, href for the initial request
@ -4597,6 +4599,29 @@ const app = new Vue({
app.mk._services.mediaItemPlayback._currentPlayer._playAssetURL(src, false) app.mk._services.mediaItemPlayback._currentPlayer._playAssetURL(src, false)
} }
} }
},
confirm(message, callback) {
bootbox.confirm(this.getBootboxParams(null, message, callback));
},
prompt(title, callback) {
bootbox.prompt(this.getBootboxParams(title, null, callback));
},
getBootboxParams(title, message, callback) {
return {
title: title,
message: message,
buttons: {
confirm: {
label: app.getLz('dialog.ok'),
},
cancel: {
label: app.getLz('dialog.cancel'),
},
},
callback: function (result) {
if (callback) callback(result);
},
}
} }
} }
}) })

View file

@ -2073,7 +2073,7 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
align-items: center; align-items: center;
.fs-row { .fs-row {
flex-grow: 1; flex-grow: 0.5;
} }
.playback-button--small.active { .playback-button--small.active {

View file

@ -280,7 +280,7 @@
}, },
deletePreset() { deletePreset() {
let presets = this.$root.cfg.audio.equalizer.presets let presets = this.$root.cfg.audio.equalizer.presets
bootbox.confirm(app.getLz('term.deletepreset.warn'), (result) => { app.confirm(app.getLz('term.deletepreset.warn'), (result) => {
if (result) { if (result) {
this.changePreset("default") this.changePreset("default")
// find the preset by id (preset) and remove it // find the preset by id (preset) and remove it
@ -351,7 +351,7 @@
}, },
addPreset() { addPreset() {
let self = this let self = this
bootbox.prompt(app.getLz('term.newpreset.name'), (res) => { app.prompt(app.getLz('term.newpreset.name'), (res) => {
if (res) { if (res) {
let eqSettings = Clone(app.cfg.audio.equalizer) let eqSettings = Clone(app.cfg.audio.equalizer)
let newPreset = new self.eqPreset() let newPreset = new self.eqPreset()
@ -386,7 +386,7 @@
}, },
importPreset() { importPreset() {
let self = this let self = this
bootbox.prompt("Enter preset share code", (res) => { app.prompt("Enter preset share code", (res) => {
if (res) { if (res) {
let preset = JSON.parse(atob(res)) let preset = JSON.parse(atob(res))
if (preset.frequencies && preset.gain && preset.Q && preset.mix && preset.vibrantBass) { if (preset.frequencies && preset.gain && preset.Q && preset.mix && preset.vibrantBass) {

View file

@ -542,14 +542,14 @@
let followAction = "follow" let followAction = "follow"
let followActions = { let followActions = {
follow: { follow: {
icon: "./assets/feather/plus-circle.svg", icon: "./assets/star.svg",
name: app.getLz('action.favorite'), name: app.getLz('action.favorite'),
action: () => { action: () => {
self.$root.setArtistFavorite(this.item.id, true) self.$root.setArtistFavorite(this.item.id, true)
} }
}, },
unfollow: { unfollow: {
icon: "./assets/feather/x-circle.svg", icon: "./assets/star.svg",
name: app.getLz('action.removeFavorite'), name: app.getLz('action.removeFavorite'),
action: () => { action: () => {
self.$root.setArtistFavorite(this.item.id, false) self.$root.setArtistFavorite(this.item.id, false)

View file

@ -25,7 +25,8 @@
</div> </div>
<div class="col flex-center artist-title" <div class="col flex-center artist-title"
:class="{'artist-animation-on': (data.attributes.editorialVideo && (data.attributes.editorialVideo.motionArtistWide16x9 || data.attributes.editorialVideo.motionArtistFullscreen16x9)) || hasHero() }" :class="{'artist-animation-on': (data.attributes.editorialVideo && (data.attributes.editorialVideo.motionArtistWide16x9 || data.attributes.editorialVideo.motionArtistFullscreen16x9)) || hasHero() }"
> :style="{ 'color': '#' +hasHeroObject()?.textColor1 ?? ''}"
>
<button class="artist-play" @click="app.mk.setStationQueue({artist:'a-'+data.id}).then(()=>{ <button class="artist-play" @click="app.mk.setStationQueue({artist:'a-'+data.id}).then(()=>{
app.mk.play() app.mk.play()
})" :aria-label="app.getLz('term.play')"><%- include("../svg/play.svg") %></button> })" :aria-label="app.getLz('term.play')"><%- include("../svg/play.svg") %></button>
@ -178,11 +179,21 @@
return this.data.attributes?.editorialArtwork?.centeredFullscreenBackground.url return this.data.attributes?.editorialArtwork?.centeredFullscreenBackground.url
} else if(this.data.attributes?.editorialArtwork?.bannerUber) { } else if(this.data.attributes?.editorialArtwork?.bannerUber) {
return this.data.attributes?.editorialArtwork?.bannerUber.url return this.data.attributes?.editorialArtwork?.bannerUber.url
}else if(this.data.attributes?.editorialArtwork?.subscriptionHero){ } else if(this.data.attributes?.editorialArtwork?.subscriptionHero){
return this.data.attributes?.editorialArtwork?.subscriptionHero.url return this.data.attributes?.editorialArtwork?.subscriptionHero.url
} }
return false; return false;
}, },
hasHeroObject() {
if(this.data.attributes?.editorialArtwork?.centeredFullscreenBackground){
return this.data.attributes?.editorialArtwork?.centeredFullscreenBackground
} else if(this.data.attributes?.editorialArtwork?.bannerUber) {
return this.data.attributes?.editorialArtwork?.bannerUber
} else if(this.data.attributes?.editorialArtwork?.subscriptionHero){
return this.data.attributes?.editorialArtwork?.subscriptionHero
}
return [];
},
isHeaderVisible(visible) { isHeaderVisible(visible) {
this.headerVisible = visible this.headerVisible = visible
}, },

View file

@ -8,9 +8,13 @@
</div> </div>
</template> </template>
<template v-if="app.playlists.loadingState == 1"> <template v-if="app.playlists.loadingState == 1">
<div class="playlist-display" <div class="playlist-display" :style="{ 'background-color': '#' +hasHeroObject()?.bgColor ?? '' }"
@mouseover.self="minClass(false)"> @mouseover.self="minClass(false)">
<div class="playlistInfo"> <div class="playlistInfo">
<div class="playlist-hero" v-if="hasHero()">
<mediaitem-artwork shadow="none" :url="hasHero()" size="2160" />
<div class="hero-tint" :style="{'background-color': '#' + hasHeroObject()?.bgColor ?? ''}"></div>
</div>
<div class="row"> <div class="row">
<div class="col-auto flex-center" @mouseover="minClass(false)"> <div class="col-auto flex-center" @mouseover="minClass(false)">
<div class="mediaContainer"> <div class="mediaContainer">
@ -26,7 +30,7 @@
<div class="col playlist-info"> <div class="col playlist-info">
<template v-if="!editorialNotesExpanded"> <template v-if="!editorialNotesExpanded">
<div> <div>
<div class="playlist-name" @mouseover="minClass(false)" @click="editPlaylistName()" v-show="!nameEditing"> <div class="playlist-name" @mouseover="minClass(false)" @click="editPlaylistName()" v-show="!nameEditing" :style="{ 'color': '#' +hasHeroObject()?.textColor1 ?? '', 'filter' : 'drop-shadow(1px 3px 8px #' + hasHeroObject()?.textColor4 ?? '' +')' }">
{{data.attributes ? (data.attributes.name ?? {{data.attributes ? (data.attributes.name ??
(data.attributes.title ?? '') ?? '') : ''}} (data.attributes.title ?? '') ?? '') : ''}}
</div> </div>
@ -38,24 +42,26 @@
@change="editPlaylist" @change="editPlaylist"
@keydown.enter="editPlaylist"/> @keydown.enter="editPlaylist"/>
</div> </div>
<div class="playlist-time genre" style="margin: 0px;">{{getAlbumGenre()}}</div> <div class="playlist-time genre" style="margin: 0px;" :style="{ 'color': '#' + hasHeroObject()?.textColor2 ?? '' }">{{getAlbumGenre()}}</div>
<div class="playlist-artist item-navigate" <div class="playlist-artist item-navigate"
v-if="getArtistName(data) != '' && !useArtistChip" v-if="getArtistName(data) != '' && !useArtistChip"
@click="data.attributes && data.attributes.artistName ? app.searchAndNavigate(data,'artist') : ''"> @click="data.attributes && data.attributes.artistName ? app.searchAndNavigate(data,'artist') : ''">
{{getArtistName(data)}} {{getArtistName(data)}}
</div> </div>
<template v-if="useArtistChip"> <template v-if="useArtistChip">
<artist-chip v-for="artist in data.relationships.artists?.data" <artist-chip v-for="artist in data.relationships.artists?.data" :style="{ 'color': '#' +hasHeroObject()?.textColor3 ?? '' }"
:item="artist"></artist-chip> :item="artist"></artist-chip>
</template> </template>
<div class="playlist-desc" <div class="playlist-desc"
:style="{ 'color': '#' +hasHeroObject()?.textColor3 ?? '' }"
v-if="(data.attributes.description && (data.attributes.description.standard || data.attributes.description.short)) || (data.attributes.editorialNotes && (data.attributes.editorialNotes.standard || data.attributes.editorialNotes.short))"> v-if="(data.attributes.description && (data.attributes.description.standard || data.attributes.description.short)) || (data.attributes.editorialNotes && (data.attributes.editorialNotes.standard || data.attributes.editorialNotes.short))">
<div v-if="(data.attributes.description?.short ?? data.attributes.editorialNotes?.short) != null" <div v-if="(data.attributes.description?.short ?? data.attributes.editorialNotes?.short) != null"
class="content" class="content"
v-html="data.attributes.description?.short ?? data.attributes.editorialNotes?.short" v-html="data.attributes.description?.short ?? data.attributes.editorialNotes?.short"
@click="openInfoModal()"></div> @click="openInfoModal()"></div>
<div v-else-if="((data.attributes.description?.standard ?? data.attributes.editorialNotes?.standard) != null) && (descriptionEditing == false)" <div v-else-if="((data.attributes.description?.standard ?? data.attributes.editorialNotes?.standard) != null) && (descriptionEditing == false)"
@mouseover="minClass(false)" @click="editPlaylistDescription()">{{data.attributes.description?.standard ?? data.attributes.editorialNotes?.standard}}</div> @mouseover="minClass(false)" @click="editPlaylistDescription()" v-html="(data.attributes.description?.standard ?? (data.attributes.editorialNotes?.standard ?? '')).substring(0, 255) +'...'"
@click="if((data.attributes.description?.standard ?? (data.attributes.editorialNotes?.standard ?? '')).length > 255) {openInfoModal()}"></div>
<div v-else-if="((data.attributes.description?.standard ?? data.attributes.editorialNotes?.standard) != null) && (descriptionEditing)" <div v-else-if="((data.attributes.description?.standard ?? data.attributes.editorialNotes?.standard) != null) && (descriptionEditing)"
@mouseover="minClass(false)"><input type="text" @mouseover="minClass(false)"><input type="text"
spellcheck="false" spellcheck="false"
@ -81,11 +87,11 @@
</div> </div>
</template> </template>
<div class="playlist-controls" v-observe-visibility="{callback: isHeaderVisible}" style="z-index: 20;"> <div class="playlist-controls" v-observe-visibility="{callback: isHeaderVisible}" style="z-index: 20;">
<button class="md-btn md-btn-primary md-btn-icon" style="min-width: 100px;" <button class="md-btn md-btn-primary md-btn-icon" style="min-width: 100px;" :style="{'background': '#' +hasHeroObject()?.textColor4 ?? '','border-top': '#' +hasHeroObject()?.textColor3 ?? '','border': '#' +hasHeroObject()?.textColor2 ?? ''}"
@click="app.mk.shuffleMode = 0; play()"><img class="md-ico-play"> @click="app.mk.shuffleMode = 0; play()"><img class="md-ico-play">
{{app.getLz('term.play')}} {{app.getLz('term.play')}}
</button> </button>
<button class="md-btn md-btn-primary md-btn-icon" style="min-width: 100px;" <button class="md-btn md-btn-primary md-btn-icon" style="min-width: 100px;" :style="{'background': '#' +hasHeroObject()?.textColor4 ?? '','border-top': '#' +hasHeroObject()?.textColor3 ?? '','border': '#' +hasHeroObject()?.textColor2 ?? ''}"
@click="app.mk.shuffleMode = 1;play()"><img class="md-ico-shuffle"> @click="app.mk.shuffleMode = 1;play()"><img class="md-ico-shuffle">
{{app.getLz('term.shuffle')}} {{app.getLz('term.shuffle')}}
</button> </button>
@ -109,6 +115,7 @@
spellcheck="false" spellcheck="false"
:placeholder="$root.getLz('term.search') + '...'" :placeholder="$root.getLz('term.search') + '...'"
@input="search()" @input="search()"
:style="{ '--heroplaceholdercolor': '#' +hasHeroObject()?.textColor4 ?? ''}"
v-model="searchQuery" v-model="searchQuery"
class="search-input"> class="search-input">
</div> </div>
@ -120,7 +127,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="artworkContainer" v-if="data.attributes.artwork != null"> <div class="artworkContainer" v-if="data.attributes.artwork != null && !hasHero()">
<artwork-material :url="data.attributes.artwork.url" size="500" images="1"></artwork-material> <artwork-material :url="data.attributes.artwork.url" size="500" images="1"></artwork-material>
</div> </div>
<button class="md-btn md-btn-small editTracksBtn" v-if="(data.attributes.canEdit && data.type == 'library-playlists')" @click="editing = !editing"> <button class="md-btn md-btn-small editTracksBtn" v-if="(data.attributes.canEdit && data.type == 'library-playlists')" @click="editing = !editing">
@ -364,6 +371,26 @@
isHeaderVisible(visible) { isHeaderVisible(visible) {
this.headerVisible = visible this.headerVisible = visible
}, },
hasHero() {
if(this.data.attributes?.editorialArtwork?.bannerUber){
return this.data.attributes?.editorialArtwork?.bannerUber.url
} else if(this.data.attributes?.editorialArtwork?.subscriptionHero) {
return this.data.attributes?.editorialArtwork?.subscriptionHero.url
} else if(this.data.attributes?.editorialArtwork?.storeFlowcase){
return this.data.attributes?.editorialArtwork?.storeFlowcase.url
}
return false;
},
hasHeroObject() {
if(this.data.attributes?.editorialArtwork?.bannerUber){
return this.data.attributes?.editorialArtwork?.bannerUber
} else if(this.data.attributes?.editorialArtwork?.subscriptionHero) {
return this.data.attributes?.editorialArtwork?.subscriptionHero
} else if(this.data.attributes?.editorialArtwork?.storeFlowcase){
return this.data.attributes?.editorialArtwork?.storeFlowcase
}
return [];
},
getBadges() { getBadges() {
return return
if (this.badgesRequested) { if (this.badgesRequested) {

View file

@ -244,7 +244,7 @@
name: app.getLz("settings.option.visual.theme.uninstall"), name: app.getLz("settings.option.visual.theme.uninstall"),
disabled: true, disabled: true,
action: () => { action: () => {
bootbox.confirm(app.stringTemplateParser(app.getLz("settings.prompt.visual.theme.uninstallTheme"), { app.confirm(app.stringTemplateParser(app.getLz("settings.prompt.visual.theme.uninstallTheme"), {
theme: theme.name ?? theme.file theme: theme.name ?? theme.file
}), (res) => { }), (res) => {
if (res) { if (res) {
@ -317,7 +317,7 @@
let msg = app.stringTemplateParser(app.getLz('settings.option.visual.theme.github.install.confirm'), { let msg = app.stringTemplateParser(app.getLz('settings.option.visual.theme.github.install.confirm'), {
repo: repo.full_name repo: repo.full_name
}); });
bootbox.confirm(msg, (res) => { app.confirm(msg, (res) => {
if (res) { if (res) {
ipcRenderer.once("theme-installed", (event, arg) => { ipcRenderer.once("theme-installed", (event, arg) => {
if (arg.success) { if (arg.success) {
@ -334,7 +334,7 @@
}, },
installThemeURL() { installThemeURL() {
let self = this let self = this
bootbox.prompt(app.getLz('settings.prompt.visual.theme.github.URL'), (result) => { app.prompt(app.getLz('settings.prompt.visual.theme.github.URL'), (result) => {
if (result) { if (result) {
ipcRenderer.once("theme-installed", (event, arg) => { ipcRenderer.once("theme-installed", (event, arg) => {
if (arg.success) { if (arg.success) {

View file

@ -265,7 +265,7 @@
document.body.removeChild(blur); document.body.removeChild(blur);
clearTimeout(keyBindTimeout); clearTimeout(keyBindTimeout);
notyf.success(app.getLz('settings.notyf.general.keybindings.update.success')); notyf.success(app.getLz('settings.notyf.general.keybindings.update.success'));
bootbox.confirm(app.getLz("settings.prompt.general.keybindings.update.success"), (ok) => { app.confirm(app.getLz("settings.prompt.general.keybindings.update.success"), (ok) => {
if (ok) ipcRenderer.invoke("relaunchApp") if (ok) ipcRenderer.invoke("relaunchApp")
}) })
} else { } else {
@ -296,7 +296,7 @@
app.cfg.general.keybindings.zoomrst = [app.platform == "darwin" ? "Command" : "Control", "num0"]; app.cfg.general.keybindings.zoomrst = [app.platform == "darwin" ? "Command" : "Control", "num0"];
app.cfg.general.keybindings.openDeveloperTools = [app.platform == "darwin" ? "Command" : "Control", app.platform == "darwin" ? "Option" : "Shift", "I"]; app.cfg.general.keybindings.openDeveloperTools = [app.platform == "darwin" ? "Command" : "Control", app.platform == "darwin" ? "Option" : "Shift", "I"];
notyf.success(app.getLz('settings.notyf.general.keybindings.update.success')); notyf.success(app.getLz('settings.notyf.general.keybindings.update.success'));
bootbox.confirm(app.getLz("settings.prompt.general.keybindings.update.success"), (ok) => { app.confirm(app.getLz("settings.prompt.general.keybindings.update.success"), (ok) => {
if (ok) ipcRenderer.invoke("relaunchApp") if (ok) ipcRenderer.invoke("relaunchApp")
}) })
}, },

View file

@ -125,13 +125,13 @@
let msg = app.stringTemplateParser(app.getLz('settings.option.visual.plugin.github.install.confirm'), { let msg = app.stringTemplateParser(app.getLz('settings.option.visual.plugin.github.install.confirm'), {
repo: repo.full_name repo: repo.full_name
}); });
bootbox.confirm(msg, (res) => { app.confirm(msg, (res) => {
if (res) { if (res) {
ipcRenderer.once("plugin-installed", (event, arg) => { ipcRenderer.once("plugin-installed", (event, arg) => {
if (arg.success) { if (arg.success) {
self.themes = [] self.themes = []
notyf.success(app.getLz('settings.notyf.visual.plugin.install.success')); notyf.success(app.getLz('settings.notyf.visual.plugin.install.success'));
bootbox.confirm(app.getLz("settings.prompt.visual.plugin.github.success"), (ok)=>{ app.confirm(app.getLz("settings.prompt.visual.plugin.github.success"), (ok)=>{
if (ok) { if (ok) {
ipcRenderer.invoke("relaunchApp") ipcRenderer.invoke("relaunchApp")
} else { } else {
@ -148,12 +148,12 @@
}, },
installThemeURL() { installThemeURL() {
let self = this let self = this
bootbox.prompt(app.getLz('settings.prompt.visual.plugin.github.URL'), (result) => { app.prompt(app.getLz('settings.prompt.visual.plugin.github.URL'), (result) => {
if (result) { if (result) {
ipcRenderer.once("plugin-installed", (event, arg) => { ipcRenderer.once("plugin-installed", (event, arg) => {
if (arg.success) { if (arg.success) {
self.themes = ipcRenderer.sendSync("get-themes") self.themes = ipcRenderer.sendSync("get-themes")
bootbox.confirm(app.getLz("settings.prompt.visual.plugin.github.success"), (ok)=>{ app.confirm(app.getLz("settings.prompt.visual.plugin.github.success"), (ok)=>{
if (ok) { if (ok) {
ipcRenderer.invoke("relaunchApp") ipcRenderer.invoke("relaunchApp")
} else { } else {

View file

@ -1390,7 +1390,7 @@
} }
}, },
reinstallWidevineCDM() { reinstallWidevineCDM() {
bootbox.confirm(app.getLz("settings.option.experimental.reinstallwidevine.confirm"), (ok) => { app.confirm(app.getLz("settings.option.experimental.reinstallwidevine.confirm"), (ok) => {
if (ok) { if (ok) {
ipcRenderer.invoke("reinstall-widevine-cdm"); ipcRenderer.invoke("reinstall-widevine-cdm");
} }
@ -1433,7 +1433,7 @@
toggleAudioContext: function () { toggleAudioContext: function () {
if (app.cfg.advanced.AudioContext === true) { if (app.cfg.advanced.AudioContext === true) {
if (navigator.hardwareConcurrency < 6) { if (navigator.hardwareConcurrency < 6) {
bootbox.confirm(app.getLz("settings.warn.audio.enableAdvancedFunctionality.lowcores"), function (result) { app.confirm(app.getLz("settings.warn.audio.enableAdvancedFunctionality.lowcores"), function (result) {
if (result) { if (result) {
CiderAudio.init(); CiderAudio.init();
if (app.cfg.audio.normalization === true) { if (app.cfg.audio.normalization === true) {
@ -1480,7 +1480,7 @@
}, },
promptForRelaunch() { promptForRelaunch() {
bootbox.confirm(app.getLz('action.relaunch.confirm'), function (result) { app.confirm(app.getLz('action.relaunch.confirm'), function (result) {
if (result) { if (result) {
ipcRenderer.send('relaunchApp', ''); ipcRenderer.send('relaunchApp', '');
} }

View file

@ -146,7 +146,7 @@
let msg = app.stringTemplateParser(app.getLz('settings.option.visual.theme.github.install.confirm'), { let msg = app.stringTemplateParser(app.getLz('settings.option.visual.theme.github.install.confirm'), {
repo: repo.full_name repo: repo.full_name
}); });
bootbox.confirm(msg, (res) => { app.confirm(msg, (res) => {
if (res) { if (res) {
ipcRenderer.once("theme-installed", (event, arg) => { ipcRenderer.once("theme-installed", (event, arg) => {
if (arg.success) { if (arg.success) {
@ -163,7 +163,7 @@
}, },
installThemeURL() { installThemeURL() {
let self = this let self = this
bootbox.prompt(app.getLz('settings.prompt.visual.theme.github.URL'), (result) => { app.prompt(app.getLz('settings.prompt.visual.theme.github.URL'), (result) => {
if (result) { if (result) {
ipcRenderer.once("theme-installed", (event, arg) => { ipcRenderer.once("theme-installed", (event, arg) => {
if (arg.success) { if (arg.success) {