Merge branch 'main' into enhancement/lastfm

This commit is contained in:
Core 2022-06-28 11:37:05 +01:00
commit 2c9bf5eb7e
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
22 changed files with 3066 additions and 1057 deletions

View file

@ -2432,10 +2432,9 @@ fieldset:disabled .btn {
.nav-pills .nav-link {
background-color: transparent;
border: 0;
border-radius: 50px;
border-radius: 6px;
color: #eee;
-webkit-user-drag: none;
// transition: transform .35s var(--appleEase), background-color .35s var(--appleEase);
font-weight: 500;
margin: 0px 4px;
&:hover {
@ -2447,7 +2446,7 @@ fieldset:disabled .btn {
.nav-pills .show > .nav-link {
color: #fff;
background-color: var(--selected);
outline:2px solid var(--keyColor);
// outline:2px solid var(--keyColor);
}
.nav-fill > .nav-link,

View file

@ -2168,107 +2168,116 @@ input[type=checkbox][switch]:checked:active::before {
}
// fancy pills
.nav-pills {
position: relative;
.nav-link {
transition: transform .3s var(--appleEase);
.fancy-pills {
.nav-pills {
position: relative;
&:after {
--dist: 1px;
content: "";
position: absolute;
top: var(--dist);
bottom: var(--dist);
left: var(--dist);
right: var(--dist);
// width : 100%;
// height : 100%;
.nav-link {
transition: transform .3s var(--appleEase);
position: relative;
background-color: transparent;
border: 0;
border-radius: 50px;
z-index: -1;
opacity: 0;
transition: background-color .5s var(--appleEase), opacity 0.25s var(--appleEase), border-radius .32s var(--appleEase);
}
&:hover {
outline: none;
transform: scale(1.1);
// background: #eee;
background: transparent;
color: #333;
&:after {
opacity: 1;
background-color: #eee;
transition: background-color .25s var(--appleEase),
border-radius .25s var(--appleEase),
color .0s var(--appleEase),
opacity 0.0s var(--appleEase);
}
}
&.active {
outline: none;
transform: scale(1.1);
// background: #eee;
background: transparent;
color: #333;
font-weight: 600;
&:after {
opacity: 1;
background-color: #eee;
}
}
}
&:hover {
.nav-link.active {
outline: none;
transform: scale(1.0);
background: transparent;
color: #eee;
transform: scale(1.0);
-webkit-user-drag: none;
font-weight: 500;
margin: 0px 4px;
&:after {
background: rgb(200 200 200 / 15%);
opacity: 1;
transition: color 0s;
// border-radius: 5px;
--dist: 4px;
--dist: 1px;
content: "";
position: absolute;
top: var(--dist);
bottom: var(--dist);
left: var(--dist);
right: var(--dist);
// width : 100%;
// height : 100%;
background-color: transparent;
border-radius: 50px;
z-index: -1;
opacity: 0;
transition: background-color .5s var(--appleEase), opacity 0.25s var(--appleEase), border-radius .32s var(--appleEase);
}
&:hover {
outline: none;
transform: scale(1.1);
z-index: 1;
// background: #eee;
background: transparent;
color: #333;
&:after {
background: #eee;
border-radius: inherit;
--dist: 1px;
opacity: 1;
background-color: #eee;
transition: background-color .25s var(--appleEase),
border-radius .25s var(--appleEase),
color .0s var(--appleEase),
opacity 0.0s var(--appleEase);
}
}
&.active {
outline: none;
transform: scale(1.1);
// background: #eee;
background: transparent;
color: #333;
font-weight: 600;
&:after {
opacity: 1;
background-color: #eee;
}
}
}
&:hover {
.nav-link.active {
outline: none;
transform: scale(1.0);
background: transparent;
color: #eee;
transform: scale(1.0);
&:after {
background: rgb(200 200 200 / 15%);
opacity: 1;
transition: color 0s;
// border-radius: 5px;
--dist: 4px;
}
&:hover {
transform: scale(1.1);
z-index: 1;
color: #333;
&:after {
background: #eee;
border-radius: inherit;
--dist: 1px;
}
}
}
}
}
&:after {
content: '';
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: rgb(200 200 200 / 10%);
border-radius: 50px;
z-index: 0;
pointer-events: none;
&:after {
content: '';
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: rgb(200 200 200 / 10%);
border-radius: 50px;
z-index: 0;
pointer-events: none;
}
}
}

View file

@ -6,6 +6,7 @@ body[platform="darwin"] {
&.notransparency::before {
display: none;
}
#app {
&.simplebg {
background: transparent;
@ -33,6 +34,16 @@ body[platform="darwin"] {
background-color: var(--macOSChromeColor);
}
}
// &::after {
// position: fixed;
// top:0;left:0;right:0;bottom:0;
// box-shadow: inset 0px 0px .5px 1px rgb(200 200 200 / 40%);
// border-radius: 10px;
// content: " ";
// z-index: 999999;
// pointer-events: none;
// }
}
#app-main {
@ -43,7 +54,12 @@ body[platform="darwin"] {
}
#app-content {
background-color: var(--baseColor);
background-color: #1e1e1e6b;
}
}
#apple-music-video-player-controls #player-exit {
margin-top: 18px;
left: 70px;
}
}

File diff suppressed because it is too large Load diff

View file

@ -168,6 +168,7 @@ const app = new Vue({
location: "",
info: {}
},
windowState: "normal",
desiredPageTransition: "wpfade_transform",
hideUserInfo: ipcRenderer.sendSync("is-dev") || false,
artworkReady: false,
@ -217,6 +218,7 @@ const app = new Vue({
castMenu: false,
moreInfo: false,
airplayPW: false,
settings: false
},
socialBadges: {
badgeMap: {},
@ -853,6 +855,10 @@ const app = new Vue({
this.library.localsongs = data;
})
ipcRenderer.on('window-state-changed', (event, data) => {
this.chrome.windowState = data
})
ipcRenderer.on('SoundCheckTag', (event, tag) => {
// let replaygain = self.parseSCTagToRG(tag)
try {
@ -926,10 +932,10 @@ const app = new Vue({
app.mk.nowPlayingItem.attributes.name = e.title
app.mk.nowPlayingItem.attributes.artistName = e.performer
app.mk.nowPlayingItem.attributes.albumName = e.album
if(e.links[1]) {
if (e.links[1]) {
app.currentArtUrl = e.links[1].url
app.currentArtUrlRaw = e.links[1].url
}else{
} else {
app.currentArtUrl = e.links[0].url
app.currentArtUrlRaw = e.links[0].url
}
@ -942,7 +948,7 @@ const app = new Vue({
self.$refs.queue.updateQueue();
}
this.currentSongInfo = a
if (this.currentSongInfo === null || this.currentSongInfo === undefined) {return;} // EVIL EMPTY OBJECTS BE GONE
if (this.currentSongInfo === null || this.currentSongInfo === undefined) { return; } // EVIL EMPTY OBJECTS BE GONE
console.debug("songinfo: " + JSON.stringify(a))
if (app.cfg.advanced.AudioContext) {
@ -957,7 +963,7 @@ const app = new Vue({
} catch (e) {
localStorage.setItem("playingBitrate", "256")
}
if (!app.cfg.audio.normalization) {CiderAudio.hierarchical_loading();}
if (!app.cfg.audio.normalization) { CiderAudio.hierarchical_loading(); }
}
@ -974,16 +980,16 @@ const app = new Vue({
previewURL = response.data.data[0].attributes.previews[0].url
if (previewURL)
console.debug("[Cider][MaikiwiSoundCheck] previewURL response.data.data[0].attributes.previews[0].url: " + previewURL)
ipcRenderer.send('getPreviewURL', previewURL)
ipcRenderer.send('getPreviewURL', previewURL)
})
} else {
if (previewURL)
console.debug("[Cider][MaikiwiSoundCheck] previewURL in app.mk.nowPlayingItem.previewURL: " + previewURL)
ipcRenderer.send('getPreviewURL', previewURL)
ipcRenderer.send('getPreviewURL', previewURL)
}
} catch (e) {
if (e instanceof TypeError === false) {console.debug("[Cider][MaikiwiSoundCheck] normalizer function err: " + e)}
if (e instanceof TypeError === false) { console.debug("[Cider][MaikiwiSoundCheck] normalizer function err: " + e) }
}
}
@ -1298,7 +1304,7 @@ const app = new Vue({
results.forEach(result => {
try {
if (result.relationships?.catalog?.data[0]?.attributes?.inFavorites) {
if(!favs.includes(result.relationships?.catalog?.data[0].id)) {
if (!favs.includes(result.relationships?.catalog?.data[0].id)) {
favs.push(result.relationships?.catalog?.data[0].id)
}
}
@ -1311,8 +1317,8 @@ const app = new Vue({
return favs
},
async setArtistFavorite(id, val = true) {
if(val) {
if(!app.cfg.home.followedArtists.includes(id)) {
if (val) {
if (!app.cfg.home.followedArtists.includes(id)) {
app.cfg.home.followedArtists.push(id)
}
await app.mk.api.v3.music(`/v1/me/favorites`, {
@ -1325,8 +1331,8 @@ const app = new Vue({
method: "POST"
}
})
}else{
if(app.cfg.home.followedArtists.includes(id)) {
} else {
if (app.cfg.home.followedArtists.includes(id)) {
app.cfg.home.followedArtists.splice(app.cfg.home.followedArtists.indexOf(id), 1)
}
await app.mk.api.v3.music(`/v1/me/favorites`, {
@ -1458,7 +1464,7 @@ const app = new Vue({
},
{
name: app.getLz("action.refresh"),
action: ()=>{
action: () => {
this.refreshPlaylists()
}
}
@ -2016,8 +2022,8 @@ const app = new Vue({
async getNowPlayingItemDetailed(target) {
let nowPlayingItem = JSON.parse(JSON.stringify(this.mk.nowPlayingItem))
if(nowPlayingItem.type === "radioStation" && app.mk.nowPlayingItem.id !== -1) {
nowPlayingItem.playParams = {kind: "songs"}
if (nowPlayingItem.type === "radioStation" && app.mk.nowPlayingItem.id !== -1) {
nowPlayingItem.playParams = { kind: "songs" }
nowPlayingItem.attributes.playParams.catalogId = app.mk.nowPlayingItem.id
nowPlayingItem.attributes.playParams.id = app.mk.nowPlayingItem.id
nowPlayingItem.id = app.mk.nowPlayingItem.id
@ -4329,7 +4335,7 @@ const app = new Vue({
"name": app.getLz('settings.option.audio.audioLab'),
"hidden": true,
"action": function () {
app.appRoute('audiolabs')
app.openSettingsPage('audiolabs')
}
},
]
@ -4355,7 +4361,7 @@ const app = new Vue({
try {
// if its a radio station, then change the attributes to match a song
const nowPlayingItem = JSON.parse(JSON.stringify(this.mk.nowPlayingItem))
if(nowPlayingItem.type == "radioStation" && app.mk.nowPlayingItem.id != -1) {
if (nowPlayingItem.type == "radioStation" && app.mk.nowPlayingItem.id != -1) {
nowPlayingItem.type = "song"
nowPlayingItem.attributes.playParams.catalogId = app.mk.nowPlayingItem.id
nowPlayingItem.attributes.playParams.id = app.mk.nowPlayingItem.id
@ -4388,6 +4394,32 @@ const app = new Vue({
}
},
openSettingsPage(page) {
switch (page) {
case "general":
this.$store.state.pageState.settings.currentTabIndex = 0
break;
case "audio":
this.$store.state.pageState.settings.currentTabIndex = 1
break;
case "audiolabs":
this.$store.state.pageState.settings.currentTabIndex = 2
break;
case "visual":
this.$store.state.pageState.settings.currentTabIndex = 3
break;
case "lyrics":
this.$store.state.pageState.settings.currentTabIndex = 4
break;
case "connectivity":
this.$store.state.pageState.settings.currentTabIndex = 5
break;
case "advanced":
this.$store.state.pageState.settings.currentTabIndex = 6
break;
}
app.modals.settings = true
},
fullscreen(flag) {
this.fullscreenState = flag;
if (flag) {
@ -4615,7 +4647,7 @@ const app = new Vue({
label: app.getLz('dialog.ok'),
},
cancel: {
label: app.getLz('dialog.cancel'),
label: app.getLz('dialog.cancel'),
},
},
callback: function (result) {

View file

@ -12,6 +12,10 @@ const store = new Vuex.Store({
nextUrl: null,
items: [],
size: "normal"
},
settings: {
currentTabIndex: 0,
fullscreen: false
}
},
artwork: {

View file

@ -15,6 +15,7 @@
:root {
--appleEase: cubic-bezier(0.42, 0, 0.58, 1);
--borderColor: rgb(200 200 200 / 16%);
--mediaItemShadow: inset 0px 0px 0px 1px rgb(200 200 200 / 16%);
--mediaItemShadow-Shadow: 0 8px 40px rgb(0 0 0 / 0.55);
--mediaItemShadow-ShadowSubtle: 0 4px 14px rgb(0 0 0 / 10%);
@ -50,6 +51,7 @@
--textColor: #eee;
--replayGradient: linear-gradient(45deg, hsl(248deg 58% 29%), hsl(13deg 41% 42%));
--glassFilter: blur(16px) saturate(180%);
--glassFilterHeavy: blur(64px) saturate(280%);
--sidebarWidth: 260px;
}
@ -3247,7 +3249,10 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
z-index: 100001;
float: left;
width: 100%;
margin: 10px;
margin-left: 10px;
margin-right: 10px;
margin-top: 10px;
margin-bottom: 10px;
cursor: pointer;
}

View file

@ -105,7 +105,7 @@
$root.getLz("term.about")
}}</span>
</button>
<button class="usermenu-item" @click="appRoute('settings')">
<button class="usermenu-item" @click="modals.settings = true">
<span class="usermenu-item-icon">
<%- include("../svg/settings.svg") %>
</span>

View file

@ -31,6 +31,9 @@
<transition name="modal">
<plugin-menu v-if="modals.pluginMenu"></plugin-menu>
</transition>
<transition name="modal">
<settings-window v-if="modals.settings"></settings-window>
</transition>
<transition name="modal">
<eq-view v-if="modals.equalizer"></eq-view>
</transition>

View file

@ -1,10 +1,10 @@
<script type="text/x-template" id="audio-controls">
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.resetState()"
@contextmenu.self="app.resetState()">
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.modals.audioControls = false"
@contextmenu.self="app.modals.audioControls = false">
<div class="modal-window">
<div class="modal-header">
<div class="modal-title">{{app.getLz('term.audioControls')}}</div>
<button class="close-btn" @click="app.resetState()" :aria-label="app.getLz('action.close')"></button>
<button class="close-btn" @click="app.modals.audioControls = false" :aria-label="app.getLz('action.close')"></button>
</div>
<div class="modal-content">
<div class="md-option-line">

View file

@ -1,10 +1,10 @@
<script type="text/x-template" id="audio-playbackrate">
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.resetState()"
@contextmenu.self="app.resetState()">
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.modals.audioPlaybackRate = false"
@contextmenu.self="app.modals.audioPlaybackRate = false">
<div class="modal-window">
<div class="modal-header">
<div class="modal-title">{{app.getLz('settings.option.audio.changePlaybackRate')}}</div>
<button class="close-btn" @click="app.resetState()" :aria-label="app.getLz('action.close')"></button>
<button class="close-btn" @click="app.modals.audioPlaybackRate = false" :aria-label="app.getLz('action.close')"></button>
</div>
<div class="modal-content">
<div class="md-option-line">

View file

@ -1,10 +1,10 @@
<script type="text/x-template" id="audio-settings">
<template>
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.resetState()" @contextmenu.self="app.resetState()">
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.modals.audioSettings = false" @contextmenu.self="app.modals.audioSettings = false">
<div class="modal-window">
<div class="modal-header">
<div class="modal-title">{{app.getLz('term.audioSettings')}}</div>
<button class="close-btn" @click="app.resetState()" :aria-label="app.getLz('action.close')"></button>
<button class="close-btn" @click="app.modals.audioSettings = false" :aria-label="app.getLz('action.close')"></button>
</div>
<div class="modal-content">
<button class="playlist-item"
@ -23,7 +23,7 @@
<div class="name">{{app.getLz('settings.option.audio.changePlaybackRate')}}</div>
</button>
<button class="playlist-item"
@click="$root.appRoute('audiolabs')" style="width:100%;">
@click="$root.openSettingsPage('audiolabs')" style="width:100%;">
<div class="icon"><%- include("../svg/speaker.svg") %></div>
<div class="name">{{app.getLz('settings.option.audio.audioLab')}}</div>
</button>

View file

@ -291,7 +291,7 @@
})
},
close() {
app.resetState()
app.modals.equalizer = false
},
changeVibrantBass() {
if (app.cfg.audio.equalizer.vibrantBass !== '0') {

View file

@ -67,7 +67,7 @@
</template>
</div>
</div>
<div class="heart-icon" v-if="!(app.mk.isPlaying && (((app.mk.nowPlayingItem._songId ?? (app.mk.nowPlayingItem.songId ?? app.mk.nowPlayingItem.id )) == itemId) || (app.mk.nowPlayingItem.id == item.id)))">
<div class="heart-icon">
<!-- <div class="heart-unfilled" v-if="isLoved == false" :style="{'--url': 'url(./assets/feather/heart.svg)'}" /> -->
<div class="heart-filled" v-if="isLoved == true" :style="{'--url': 'url(./assets/feather/heart-fill.svg)'}" />
</div>

File diff suppressed because it is too large Load diff

View file

@ -71,7 +71,9 @@
<div id="LOADER">
<%- include("../assets/cider-round.svg") %>
</div>
<div id="app" :class="getAppClasses()" :style="getAppStyle()" :library-visible="(chrome.sidebarCollapsed ? 0 : 1)" :window-style="cfg.visual.directives.windowLayout">
<div id="app" :class="getAppClasses()"
:window-state="chrome.windowState"
:style="getAppStyle()" :library-visible="(chrome.sidebarCollapsed ? 0 : 1)" :window-style="cfg.visual.directives.windowLayout">
<transition name="fsModeSwitch">
<div id="app-main" v-show="appMode == 'player'">
<%- include('app/chrome-top'); %>

View file

@ -1,5 +1,5 @@
<script type="text/x-template" id="audiolabs-page">
<div class="content-inner audiolabs-page ">
<div class="audiolabs-page">
<div class="md-option-container">
<div class="settings-option-body">
<div class="md-option-line">
@ -120,7 +120,7 @@
</select>
</div>
</div>
<div style="opacity: 0.5; pointer-events: none">
<div style="opacity: 0.5; pointer-events: none" v-if="false">
<div class="md-option-header">
<span>{{$root.getLz('settings.header.unfinished')}}</span>
</div>

View file

@ -178,7 +178,7 @@
</div>
</div>
<div class="playlist-body scrollbody">
<b-tabs pills class="track-pills pilldim" align="center" content-class="mt-3" :nav-wrapper-class="navClass(data)">
<b-tabs pills class="track-pills pilldim fancy-pills" align="center" content-class="mt-3" :nav-wrapper-class="navClass(data)">
<b-tab :title="$root.getLz('term.tracks')">
<div @wheel="minClass(true)" @scroll="minClass(true)">
<div class="">