add marquee back
This commit is contained in:
parent
4c829e2d19
commit
87302331b7
3 changed files with 22 additions and 21 deletions
|
@ -3401,6 +3401,7 @@ const app = new Vue({
|
|||
let element = document.querySelector(selector);
|
||||
var overflowX = element.offsetWidth < element.scrollWidth,
|
||||
overflowY = element.offsetHeight < element.scrollHeight;
|
||||
element.setAttribute('data-value', '\xa0\xa0\xa0\xa0' + element.textContent);
|
||||
|
||||
return (overflowX || overflowY); } catch (e) { return false}
|
||||
},
|
||||
|
@ -3409,16 +3410,6 @@ const app = new Vue({
|
|||
this.webremoteurl = await ipcRenderer.invoke('showQR','')
|
||||
//this.modals.qrcode = true;
|
||||
|
||||
},
|
||||
checkMarquee() {
|
||||
if(isElementOverflowing('#app-main > div.app-chrome > div.app-chrome--center > div > div > div.playback-info > div.song-artist') == true) {
|
||||
document.getElementsByClassName('song-artist')[0].classList.add('marquee');
|
||||
document.getElementsByClassName('song-artist')[1].classList.add('marquee-after');
|
||||
}
|
||||
if(isElementOverflowing('#app-main > div.app-chrome > div.app-chrome--center > div > div > div.playback-info > div.song-name') == true) {
|
||||
document.getElementsByClassName('song-name')[0].classList.add('marquee');
|
||||
document.getElementsByClassName('song-name')[1].classList.add('marquee-after');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1111,6 +1111,9 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
|||
&.song-name{
|
||||
overflow: unset ;
|
||||
}
|
||||
&::after{
|
||||
content: attr(data-value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1166,11 +1169,11 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
|||
|
||||
@keyframes marquee {
|
||||
from {
|
||||
transform: translateX(100%);
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(-100%);
|
||||
transform: translateX(-140%);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1249,13 +1252,12 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
|||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
.app-chrome .app-chrome-item > .app-playback-controls .song-artist-album {
|
||||
.app-chrome .app-chrome-item > .app-playback-controls > div >.song-artist-album {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
/*height: 1.2em;
|
||||
line-height: 1.2em;*/
|
||||
|
||||
z-index: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
@ -1263,11 +1265,18 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
|||
max-width: 340px;
|
||||
overflow: hidden;
|
||||
|
||||
.song-artist-album-content{
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
width:100%;
|
||||
|
||||
.song-artist-normal {
|
||||
height: inherit;
|
||||
&.song-artist-normal {
|
||||
height: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&.song-artist-marquee {
|
||||
> marquee {
|
||||
margin-bottom: -3px;
|
||||
|
|
|
@ -86,17 +86,17 @@
|
|||
<mediaitem-artwork :url="currentArtUrl"></mediaitem-artwork>
|
||||
</div>
|
||||
<div class="playback-info">
|
||||
<!-- :class="[isElementOverflowing('#app-main > div.app-chrome > div.app-chrome--center > div > div > div.playback-info > div.song-name') ? 'marquee' : '']" -->
|
||||
<div class="song-name" style="-webkit-box-orient: horizontal;"
|
||||
|
||||
:class="[isElementOverflowing('#app-main > div.app-chrome > div.app-chrome--center > div > div > div.playback-info > div.song-name') ? 'marquee' : '']"
|
||||
:style="[mk.nowPlayingItem['attributes']['contentRating'] == 'explicit' ? {'margin-left' : '23px'} : {'margin-left' : '0px'} ]">
|
||||
{{ mk.nowPlayingItem["attributes"]["name"] }}
|
||||
<div class="explicit-icon"
|
||||
v-if="mk.nowPlayingItem['attributes']['contentRating'] == 'explicit'"
|
||||
style="display: inline-block"></div>
|
||||
</div>
|
||||
<!-- :class="[isElementOverflowing('#app-main > div.app-chrome > div.app-chrome--center > div > div > div.playback-info > div.song-artist') ? 'marquee' : '']" -->
|
||||
<div class="song-artist-album"
|
||||
<div class="song-artist-album">
|
||||
<div class="song-artist-album-content"
|
||||
:class="[isElementOverflowing('#app-main > .app-chrome .app-chrome-item > .app-playback-controls > div >.song-artist-album > .song-artist-album-content') ? 'marquee' : '']"
|
||||
style="display: inline-block; -webkit-box-orient: horizontal; white-space: nowrap;">
|
||||
<div class="item-navigate song-artist" style="display: inline-block"
|
||||
@click="getNowPlayingItemDetailed(`artist`)">
|
||||
|
@ -110,6 +110,7 @@
|
|||
(mk.nowPlayingItem["attributes"]["albumName"]) : "" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="song-progress">
|
||||
<div class="song-duration"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue