From f644580723f7a48bd0da6499109c67048aa8eb98 Mon Sep 17 00:00:00 2001
From: uh_wot <3631986-uh_wot@users.noreply.gitlab.com>
Date: Sun, 26 Apr 2020 17:34:33 +0200
Subject: [PATCH 1/2] fixed code indentation
---
public/css/modules/middle-section.css | 40 +++---
public/css/modules/progressbar.css | 192 ++++++++++++-------------
public/css/modules/track-preview.css | 16 +--
public/index.html | 34 ++---
public/js/modules/link-analyzer-tab.js | 40 +++---
public/js/modules/search.js | 10 +-
public/js/modules/tabs.js | 6 +-
public/js/modules/utils.js | 2 +-
8 files changed, 170 insertions(+), 170 deletions(-)
diff --git a/public/css/modules/middle-section.css b/public/css/modules/middle-section.css
index fca1dd1..aa1f3ed 100644
--- a/public/css/modules/middle-section.css
+++ b/public/css/modules/middle-section.css
@@ -50,32 +50,32 @@
/* The Modal (background) */
.smallmodal {
- display: none; /* Hidden by default */
- position: fixed; /* Stay in place */
- z-index: 1250; /* Sit on top */
- left: 0;
- top: 0;
- width: 100%; /* Full width */
- height: 100%; /* Full height */
- overflow: auto; /* Enable scroll if needed */
- background-color: rgb(0,0,0); /* Fallback color */
- background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
- animation-duration: 0.3s;
+ display: none; /* Hidden by default */
+ position: fixed; /* Stay in place */
+ z-index: 1250; /* Sit on top */
+ left: 0;
+ top: 0;
+ width: 100%; /* Full width */
+ height: 100%; /* Full height */
+ overflow: auto; /* Enable scroll if needed */
+ background-color: rgb(0,0,0); /* Fallback color */
+ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
+ animation-duration: 0.3s;
}
/* Modal Content */
.smallmodal-content {
- background-color: none;
- margin: auto;
- width: 30%;
- align-items: center;
- position: relative;
- top: 50%;
- transform: translateY(-50%);
+ background-color: none;
+ margin: auto;
+ width: 30%;
+ align-items: center;
+ position: relative;
+ top: 50%;
+ transform: translateY(-50%);
}
.smallmodal-content button{
- width: 100%;
- margin-bottom: 8px;
+ width: 100%;
+ margin-bottom: 8px;
}
@media only screen and (min-width: 601px) {
diff --git a/public/css/modules/progressbar.css b/public/css/modules/progressbar.css
index 75ee3aa..a9e1139 100644
--- a/public/css/modules/progressbar.css
+++ b/public/css/modules/progressbar.css
@@ -1,112 +1,112 @@
.progress {
- position: relative;
- height: 4px;
- display: block;
- width: 100%;
- background-color: var(--secondary-background);
- border-radius: 2px;
- margin: 0.5rem 0 1rem 0;
- overflow: hidden;
+ position: relative;
+ height: 4px;
+ display: block;
+ width: 100%;
+ background-color: var(--secondary-background);
+ border-radius: 2px;
+ margin: 0.5rem 0 1rem 0;
+ overflow: hidden;
}
.progress .determinate {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- background-color: var(--accent-color);
- -webkit-transition: width .3s linear;
- transition: width .3s linear;
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ background-color: var(--accent-color);
+ -webkit-transition: width .3s linear;
+ transition: width .3s linear;
}
.progress .indeterminate {
- background-color: var(--accent-color);
+ background-color: var(--accent-color);
}
.progress .indeterminate:before {
- content: '';
- position: absolute;
- background-color: inherit;
- top: 0;
- left: 0;
- bottom: 0;
- will-change: left, right;
- -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;
+ content: '';
+ position: absolute;
+ background-color: inherit;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ will-change: left, right;
+ -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;
}
.progress .indeterminate:after {
- content: '';
- position: absolute;
- background-color: inherit;
- top: 0;
- left: 0;
- bottom: 0;
- will-change: left, right;
- -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;
- -webkit-animation-delay: 1.15s;
- animation-delay: 1.15s;
+ content: '';
+ position: absolute;
+ background-color: inherit;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ will-change: left, right;
+ -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;
+ -webkit-animation-delay: 1.15s;
+ animation-delay: 1.15s;
}
@-webkit-keyframes indeterminate {
- 0% {
- left: -35%;
- right: 100%;
- }
- 60% {
- left: 100%;
- right: -90%;
- }
- 100% {
- left: 100%;
- right: -90%;
- }
+ 0% {
+ left: -35%;
+ right: 100%;
+ }
+ 60% {
+ left: 100%;
+ right: -90%;
+ }
+ 100% {
+ left: 100%;
+ right: -90%;
+ }
}
@keyframes indeterminate {
- 0% {
- left: -35%;
- right: 100%;
- }
- 60% {
- left: 100%;
- right: -90%;
- }
- 100% {
- left: 100%;
- right: -90%;
- }
+ 0% {
+ left: -35%;
+ right: 100%;
+ }
+ 60% {
+ left: 100%;
+ right: -90%;
+ }
+ 100% {
+ left: 100%;
+ right: -90%;
+ }
}
@-webkit-keyframes indeterminate-short {
- 0% {
- left: -200%;
- right: 100%;
- }
- 60% {
- left: 107%;
- right: -8%;
- }
- 100% {
- left: 107%;
- right: -8%;
- }
+ 0% {
+ left: -200%;
+ right: 100%;
+ }
+ 60% {
+ left: 107%;
+ right: -8%;
+ }
+ 100% {
+ left: 107%;
+ right: -8%;
+ }
}
@keyframes indeterminate-short {
- 0% {
- left: -200%;
- right: 100%;
- }
- 60% {
- left: 107%;
- right: -8%;
- }
- 100% {
- left: 107%;
- right: -8%;
- }
+ 0% {
+ left: -200%;
+ right: 100%;
+ }
+ 60% {
+ left: 107%;
+ right: -8%;
+ }
+ 100% {
+ left: 107%;
+ right: -8%;
+ }
}
.toast-icon{
@@ -116,26 +116,26 @@
.circle-loader {
display: inline-block;
- border: 2px solid var(--accent-color);
- border-radius: 50%;
- border-bottom: 2px solid var(--secondary-background);
- width: 16px;
- height: 16px;
- -webkit-animation: spin 1s linear infinite; /* Safari */
- animation: spin 1s linear infinite;
+ border: 2px solid var(--accent-color);
+ border-radius: 50%;
+ border-bottom: 2px solid var(--secondary-background);
+ width: 16px;
+ height: 16px;
+ -webkit-animation: spin 1s linear infinite; /* Safari */
+ animation: spin 1s linear infinite;
}
.toastify .circle-loader{
- border-bottom-color: var(--toast-secondary)
+ border-bottom-color: var(--toast-secondary)
}
/* Safari */
@-webkit-keyframes spin {
- 0% { -webkit-transform: rotate(0deg); }
- 100% { -webkit-transform: rotate(360deg); }
+ 0% { -webkit-transform: rotate(0deg); }
+ 100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(360deg); }
+ 0% { transform: rotate(0deg); }
+ 100% { transform: rotate(360deg); }
}
diff --git a/public/css/modules/track-preview.css b/public/css/modules/track-preview.css
index 31f7e0e..08f6a4f 100644
--- a/public/css/modules/track-preview.css
+++ b/public/css/modules/track-preview.css
@@ -1,22 +1,22 @@
.preview_controls {
opacity: 0;
- display: block;
- background: rgba(0, 0, 0, .5);
+ display: block;
+ background: rgba(0, 0, 0, .5);
width: 56px;
height: 56px;
text-align: center;
line-height: 56px;
- position: absolute;
+ position: absolute;
border-radius: 5px;
- top: 0;
- right: 0;
+ top: 0;
+ right: 0;
}
.preview_playlist_controls{
cursor:pointer;
}
a.single-cover {
- position: relative;
- display: inline-block;
- color: white;
+ position: relative;
+ display: inline-block;
+ color: white;
}
diff --git a/public/index.html b/public/index.html
index a700eb5..14ddc8b 100644
--- a/public/index.html
+++ b/public/index.html
@@ -257,24 +257,24 @@
Favorites
-
Link Analyzer
-
{{ title }}
+
Link Analyzer
+
{{ title }}
{{ subtitle }}
-
- ISRC | {{ data.isrc }} |
- UPC | {{ data.upc }} |
- Duration | {{ convertDuration(data.duration) }} |
- Disk Number | {{ data.disk_number }} |
- Track Number | {{ data.track_position }} |
- Release Date | {{ data.release_date }} |
- BPM | {{ data.bpm }} |
- Label | {{ data.label }} |
- Record Type | {{ data.record_type }} |
- Genres | {{ data.genres.data.map(x => x.name).join("; ") }} |
-
-
-
{{ country[0] }} - {{ country[1] }}
-
+
+ ISRC | {{ data.isrc }} |
+ UPC | {{ data.upc }} |
+ Duration | {{ convertDuration(data.duration) }} |
+ Disk Number | {{ data.disk_number }} |
+ Track Number | {{ data.track_position }} |
+ Release Date | {{ data.release_date }} |
+ BPM | {{ data.bpm }} |
+ Label | {{ data.label }} |
+ Record Type | {{ data.record_type }} |
+ Genres | {{ data.genres.data.map(x => x.name).join("; ") }} |
+
+
+
{{ country[0] }} - {{ country[1] }}
+
diff --git a/public/js/modules/link-analyzer-tab.js b/public/js/modules/link-analyzer-tab.js
index 2139d31..5e06c7b 100644
--- a/public/js/modules/link-analyzer-tab.js
+++ b/public/js/modules/link-analyzer-tab.js
@@ -7,50 +7,50 @@ const COUNTRIES = {"AF": "Afghanistan","AX": "\u00c5land Islands","AL": "Albania
const LinkAnalyzerTab = new Vue({
data() {
return {
- title: '',
+ title: '',
subtitle: '',
- image: '',
+ image: '',
data: {},
type: '',
link: '',
- countries: []
+ countries: []
}
},
methods: {
albumView,
- convertDuration: Utils.convertDuration,
+ convertDuration: Utils.convertDuration,
reset() {
this.title = 'Loading...'
this.subtitle = ''
- this.image = ''
+ this.image = ''
this.data = {}
this.type = ''
this.link = ''
- this.countries = []
+ this.countries = []
},
showTrack(data) {
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.image = data.album.cover_xl
+ this.subtitle = `by ${data.artist.name}\nin ${data.album.title}`
+ this.image = data.album.cover_xl
this.type = 'track'
this.link = data.link
- data.available_countries.forEach((cc)=>{
- let temp = []
- let chars = [...cc].map(c => c.charCodeAt() + 127397)
- temp.push(String.fromCodePoint(...chars))
- temp.push(COUNTRIES[cc])
- this.countries.push(temp)
- })
- this.data = data
+ data.available_countries.forEach((cc)=>{
+ let temp = []
+ let chars = [...cc].map(c => c.charCodeAt() + 127397)
+ temp.push(String.fromCodePoint(...chars))
+ temp.push(COUNTRIES[cc])
+ this.countries.push(temp)
+ })
+ this.data = data
},
showAlbum(data) {
- console.log(data)
+ console.log(data)
this.title = data.title
- this.subtitle = `by ${data.artist.name}\n${data.nb_tracks} tracks`
- this.image = data.cover_xl
+ this.subtitle = `by ${data.artist.name}\n${data.nb_tracks} tracks`
+ this.image = data.cover_xl
this.type = 'album'
this.link = data.link
- this.data = data
+ this.data = data
}
},
mounted() {
diff --git a/public/js/modules/search.js b/public/js/modules/search.js
index 3c37334..dccfe45 100644
--- a/public/js/modules/search.js
+++ b/public/js/modules/search.js
@@ -32,11 +32,11 @@ export default class Search {
if (e.ctrlKey) {
QualityModal.open(term)
} else {
- if (window.main_selected == 'analyzer_tab'){
- analyzeLink(term)
- }else{
- Downloads.sendAddToQueue(term)
- }
+ if (window.main_selected == 'analyzer_tab'){
+ analyzeLink(term)
+ }else{
+ Downloads.sendAddToQueue(term)
+ }
}
} else {
if (term != MainSearch.query || main_selected == 'search_tab') {
diff --git a/public/js/modules/tabs.js b/public/js/modules/tabs.js
index 39a3cdd..4f46796 100644
--- a/public/js/modules/tabs.js
+++ b/public/js/modules/tabs.js
@@ -36,9 +36,9 @@ export function playlistView(ev) {
}
export function analyzeLink(link) {
- console.log("Analyzing: "+link)
- LinkAnalyzerTab.reset()
- socket.emit('analyzeLink', link)
+ console.log("Analyzing: "+link)
+ LinkAnalyzerTab.reset()
+ socket.emit('analyzeLink', link)
}
export class Tabs {
diff --git a/public/js/modules/utils.js b/public/js/modules/utils.js
index c59c4ec..8c467c5 100644
--- a/public/js/modules/utils.js
+++ b/public/js/modules/utils.js
@@ -28,7 +28,7 @@ function convertDurationSeparated(duration) {
}
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
From 2138b746d8ebb22e72dd01d19e1fba0f198986f0 Mon Sep 17 00:00:00 2001
From: uh_wot <3631986-uh_wot@users.noreply.gitlab.com>
Date: Sun, 26 Apr 2020 17:38:02 +0200
Subject: [PATCH 2/2] fixed a little more code indentation
---
public/css/modules/progressbar.css | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/public/css/modules/progressbar.css b/public/css/modules/progressbar.css
index a9e1139..38740c2 100644
--- a/public/css/modules/progressbar.css
+++ b/public/css/modules/progressbar.css
@@ -3,10 +3,10 @@
height: 4px;
display: block;
width: 100%;
- background-color: var(--secondary-background);
- border-radius: 2px;
- margin: 0.5rem 0 1rem 0;
- overflow: hidden;
+ background-color: var(--secondary-background);
+ border-radius: 2px;
+ margin: 0.5rem 0 1rem 0;
+ overflow: hidden;
}
.progress .determinate {