fixed code indentation

This commit is contained in:
uh_wot 2020-04-26 17:34:33 +02:00
parent 22476f50b5
commit f644580723
8 changed files with 170 additions and 170 deletions

View File

@ -50,32 +50,32 @@
/* The Modal (background) */ /* The Modal (background) */
.smallmodal { .smallmodal {
display: none; /* Hidden by default */ display: none; /* Hidden by default */
position: fixed; /* Stay in place */ position: fixed; /* Stay in place */
z-index: 1250; /* Sit on top */ z-index: 1250; /* Sit on top */
left: 0; left: 0;
top: 0; top: 0;
width: 100%; /* Full width */ width: 100%; /* Full width */
height: 100%; /* Full height */ height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */ overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */ background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
animation-duration: 0.3s; animation-duration: 0.3s;
} }
/* Modal Content */ /* Modal Content */
.smallmodal-content { .smallmodal-content {
background-color: none; background-color: none;
margin: auto; margin: auto;
width: 30%; width: 30%;
align-items: center; align-items: center;
position: relative; position: relative;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
} }
.smallmodal-content button{ .smallmodal-content button{
width: 100%; width: 100%;
margin-bottom: 8px; margin-bottom: 8px;
} }
@media only screen and (min-width: 601px) { @media only screen and (min-width: 601px) {

View File

@ -1,112 +1,112 @@
.progress { .progress {
position: relative; position: relative;
height: 4px; height: 4px;
display: block; display: block;
width: 100%; width: 100%;
background-color: var(--secondary-background); background-color: var(--secondary-background);
border-radius: 2px; border-radius: 2px;
margin: 0.5rem 0 1rem 0; margin: 0.5rem 0 1rem 0;
overflow: hidden; overflow: hidden;
} }
.progress .determinate { .progress .determinate {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
background-color: var(--accent-color); background-color: var(--accent-color);
-webkit-transition: width .3s linear; -webkit-transition: width .3s linear;
transition: width .3s linear; transition: width .3s linear;
} }
.progress .indeterminate { .progress .indeterminate {
background-color: var(--accent-color); background-color: var(--accent-color);
} }
.progress .indeterminate:before { .progress .indeterminate:before {
content: ''; content: '';
position: absolute; position: absolute;
background-color: inherit; background-color: inherit;
top: 0; top: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
will-change: left, right; will-change: left, right;
-webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; -webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
} }
.progress .indeterminate:after { .progress .indeterminate:after {
content: ''; content: '';
position: absolute; position: absolute;
background-color: inherit; background-color: inherit;
top: 0; top: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
will-change: left, right; will-change: left, right;
-webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite; -webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite; animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
-webkit-animation-delay: 1.15s; -webkit-animation-delay: 1.15s;
animation-delay: 1.15s; animation-delay: 1.15s;
} }
@-webkit-keyframes indeterminate { @-webkit-keyframes indeterminate {
0% { 0% {
left: -35%; left: -35%;
right: 100%; right: 100%;
} }
60% { 60% {
left: 100%; left: 100%;
right: -90%; right: -90%;
} }
100% { 100% {
left: 100%; left: 100%;
right: -90%; right: -90%;
} }
} }
@keyframes indeterminate { @keyframes indeterminate {
0% { 0% {
left: -35%; left: -35%;
right: 100%; right: 100%;
} }
60% { 60% {
left: 100%; left: 100%;
right: -90%; right: -90%;
} }
100% { 100% {
left: 100%; left: 100%;
right: -90%; right: -90%;
} }
} }
@-webkit-keyframes indeterminate-short { @-webkit-keyframes indeterminate-short {
0% { 0% {
left: -200%; left: -200%;
right: 100%; right: 100%;
} }
60% { 60% {
left: 107%; left: 107%;
right: -8%; right: -8%;
} }
100% { 100% {
left: 107%; left: 107%;
right: -8%; right: -8%;
} }
} }
@keyframes indeterminate-short { @keyframes indeterminate-short {
0% { 0% {
left: -200%; left: -200%;
right: 100%; right: 100%;
} }
60% { 60% {
left: 107%; left: 107%;
right: -8%; right: -8%;
} }
100% { 100% {
left: 107%; left: 107%;
right: -8%; right: -8%;
} }
} }
.toast-icon{ .toast-icon{
@ -116,26 +116,26 @@
.circle-loader { .circle-loader {
display: inline-block; display: inline-block;
border: 2px solid var(--accent-color); border: 2px solid var(--accent-color);
border-radius: 50%; border-radius: 50%;
border-bottom: 2px solid var(--secondary-background); border-bottom: 2px solid var(--secondary-background);
width: 16px; width: 16px;
height: 16px; height: 16px;
-webkit-animation: spin 1s linear infinite; /* Safari */ -webkit-animation: spin 1s linear infinite; /* Safari */
animation: spin 1s linear infinite; animation: spin 1s linear infinite;
} }
.toastify .circle-loader{ .toastify .circle-loader{
border-bottom-color: var(--toast-secondary) border-bottom-color: var(--toast-secondary)
} }
/* Safari */ /* Safari */
@-webkit-keyframes spin { @-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); } 0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); } 100% { -webkit-transform: rotate(360deg); }
} }
@keyframes spin { @keyframes spin {
0% { transform: rotate(0deg); } 0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); } 100% { transform: rotate(360deg); }
} }

View File

@ -1,22 +1,22 @@
.preview_controls { .preview_controls {
opacity: 0; opacity: 0;
display: block; display: block;
background: rgba(0, 0, 0, .5); background: rgba(0, 0, 0, .5);
width: 56px; width: 56px;
height: 56px; height: 56px;
text-align: center; text-align: center;
line-height: 56px; line-height: 56px;
position: absolute; position: absolute;
border-radius: 5px; border-radius: 5px;
top: 0; top: 0;
right: 0; right: 0;
} }
.preview_playlist_controls{ .preview_playlist_controls{
cursor:pointer; cursor:pointer;
} }
a.single-cover { a.single-cover {
position: relative; position: relative;
display: inline-block; display: inline-block;
color: white; color: white;
} }

View File

@ -257,24 +257,24 @@ <h1>Favorites</h1>
</div> </div>
<div id="analyzer_tab" class="main_tabcontent"> <div id="analyzer_tab" class="main_tabcontent">
<h1>Link Analyzer</h1> <h1>Link Analyzer</h1>
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
<h2>{{ subtitle }}</h2> <h2>{{ subtitle }}</h2>
<table> <table>
<tr v-if="data.isrc"><td>ISRC</td><td>{{ data.isrc }}</td></tr> <tr v-if="data.isrc"><td>ISRC</td><td>{{ data.isrc }}</td></tr>
<tr v-if="data.upc"><td>UPC</td><td>{{ data.upc }}</td></tr> <tr v-if="data.upc"><td>UPC</td><td>{{ data.upc }}</td></tr>
<tr v-if="data.duration"><td>Duration</td><td>{{ convertDuration(data.duration) }}</td></tr> <tr v-if="data.duration"><td>Duration</td><td>{{ convertDuration(data.duration) }}</td></tr>
<tr v-if="data.disk_number"><td>Disk Number</td><td>{{ data.disk_number }}</td></tr> <tr v-if="data.disk_number"><td>Disk Number</td><td>{{ data.disk_number }}</td></tr>
<tr v-if="data.track_position"><td>Track Number</td><td>{{ data.track_position }}</td></tr> <tr v-if="data.track_position"><td>Track Number</td><td>{{ data.track_position }}</td></tr>
<tr v-if="data.release_date"><td>Release Date</td><td>{{ data.release_date }}</td></tr> <tr v-if="data.release_date"><td>Release Date</td><td>{{ data.release_date }}</td></tr>
<tr v-if="data.bpm"><td>BPM</td><td>{{ data.bpm }}</td></tr> <tr v-if="data.bpm"><td>BPM</td><td>{{ data.bpm }}</td></tr>
<tr v-if="data.label"><td>Label</td><td>{{ data.label }}</td></tr> <tr v-if="data.label"><td>Label</td><td>{{ data.label }}</td></tr>
<tr v-if="data.record_type"><td>Record Type</td><td>{{ data.record_type }}</td></tr> <tr v-if="data.record_type"><td>Record Type</td><td>{{ data.record_type }}</td></tr>
<tr v-if="data.genres && data.genres.data.length"><td>Genres</td><td>{{ data.genres.data.map(x => x.name).join("; ") }}</td></tr> <tr v-if="data.genres && data.genres.data.length"><td>Genres</td><td>{{ data.genres.data.map(x => x.name).join("; ") }}</td></tr>
</table> </table>
<div v-if="countries.length"> <div v-if="countries.length">
<p v-for="country in countries">{{ country[0] }} - {{ country[1] }}</p> <p v-for="country in countries">{{ country[0] }} - {{ country[1] }}</p>
</div> </div>
</div> </div>
<div id="settings_tab" class="main_tabcontent fixed_footer"> <div id="settings_tab" class="main_tabcontent fixed_footer">

View File

@ -7,50 +7,50 @@ const COUNTRIES = {"AF": "Afghanistan","AX": "\u00c5land Islands","AL": "Albania
const LinkAnalyzerTab = new Vue({ const LinkAnalyzerTab = new Vue({
data() { data() {
return { return {
title: '', title: '',
subtitle: '', subtitle: '',
image: '', image: '',
data: {}, data: {},
type: '', type: '',
link: '', link: '',
countries: [] countries: []
} }
}, },
methods: { methods: {
albumView, albumView,
convertDuration: Utils.convertDuration, convertDuration: Utils.convertDuration,
reset() { reset() {
this.title = 'Loading...' this.title = 'Loading...'
this.subtitle = '' this.subtitle = ''
this.image = '' this.image = ''
this.data = {} this.data = {}
this.type = '' this.type = ''
this.link = '' this.link = ''
this.countries = [] this.countries = []
}, },
showTrack(data) { showTrack(data) {
this.title = data.title + (data.title_version && data.title.indexOf(data.title_version) == -1 ? ' '+data.title_version : '') this.title = data.title + (data.title_version && data.title.indexOf(data.title_version) == -1 ? ' '+data.title_version : '')
this.subtitle = `by ${data.artist.name}\nin ${data.album.title}` this.subtitle = `by ${data.artist.name}\nin ${data.album.title}`
this.image = data.album.cover_xl this.image = data.album.cover_xl
this.type = 'track' this.type = 'track'
this.link = data.link this.link = data.link
data.available_countries.forEach((cc)=>{ data.available_countries.forEach((cc)=>{
let temp = [] let temp = []
let chars = [...cc].map(c => c.charCodeAt() + 127397) let chars = [...cc].map(c => c.charCodeAt() + 127397)
temp.push(String.fromCodePoint(...chars)) temp.push(String.fromCodePoint(...chars))
temp.push(COUNTRIES[cc]) temp.push(COUNTRIES[cc])
this.countries.push(temp) this.countries.push(temp)
}) })
this.data = data this.data = data
}, },
showAlbum(data) { showAlbum(data) {
console.log(data) console.log(data)
this.title = data.title this.title = data.title
this.subtitle = `by ${data.artist.name}\n${data.nb_tracks} tracks` this.subtitle = `by ${data.artist.name}\n${data.nb_tracks} tracks`
this.image = data.cover_xl this.image = data.cover_xl
this.type = 'album' this.type = 'album'
this.link = data.link this.link = data.link
this.data = data this.data = data
} }
}, },
mounted() { mounted() {

View File

@ -32,11 +32,11 @@ export default class Search {
if (e.ctrlKey) { if (e.ctrlKey) {
QualityModal.open(term) QualityModal.open(term)
} else { } else {
if (window.main_selected == 'analyzer_tab'){ if (window.main_selected == 'analyzer_tab'){
analyzeLink(term) analyzeLink(term)
}else{ }else{
Downloads.sendAddToQueue(term) Downloads.sendAddToQueue(term)
} }
} }
} else { } else {
if (term != MainSearch.query || main_selected == 'search_tab') { if (term != MainSearch.query || main_selected == 'search_tab') {

View File

@ -36,9 +36,9 @@ export function playlistView(ev) {
} }
export function analyzeLink(link) { export function analyzeLink(link) {
console.log("Analyzing: "+link) console.log("Analyzing: "+link)
LinkAnalyzerTab.reset() LinkAnalyzerTab.reset()
socket.emit('analyzeLink', link) socket.emit('analyzeLink', link)
} }
export class Tabs { export class Tabs {

View File

@ -28,7 +28,7 @@ function convertDurationSeparated(duration) {
} }
function numberWithDots(x) { function numberWithDots(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.') return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.')
} }
// On scroll event, returns currentTarget = null // On scroll event, returns currentTarget = null