Commit 614085f5 authored by SpinShare's avatar SpinShare

added 2.0.0 adjustments, fixed download issues

parent 5ae0bc17
...@@ -5244,7 +5244,8 @@ ...@@ -5244,7 +5244,8 @@
"eventemitter3": { "eventemitter3": {
"version": "4.0.4", "version": "4.0.4",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz",
"integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==",
"dev": true
}, },
"events": { "events": {
"version": "3.1.0", "version": "3.1.0",
...@@ -5706,6 +5707,7 @@ ...@@ -5706,6 +5707,7 @@
"version": "1.11.0", "version": "1.11.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz",
"integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==", "integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==",
"dev": true,
"requires": { "requires": {
"debug": "^3.0.0" "debug": "^3.0.0"
}, },
...@@ -5714,6 +5716,7 @@ ...@@ -5714,6 +5716,7 @@
"version": "3.2.6", "version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"dev": true,
"requires": { "requires": {
"ms": "^2.1.1" "ms": "^2.1.1"
} }
...@@ -6972,6 +6975,7 @@ ...@@ -6972,6 +6975,7 @@
"version": "1.18.1", "version": "1.18.1",
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
"dev": true,
"requires": { "requires": {
"eventemitter3": "^4.0.0", "eventemitter3": "^4.0.0",
"follow-redirects": "^1.0.0", "follow-redirects": "^1.0.0",
...@@ -7017,7 +7021,6 @@ ...@@ -7017,7 +7021,6 @@
"version": "0.4.24", "version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dev": true,
"requires": { "requires": {
"safer-buffer": ">= 2.1.2 < 3" "safer-buffer": ">= 2.1.2 < 3"
} }
...@@ -8520,6 +8523,26 @@ ...@@ -8520,6 +8523,26 @@
"resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz",
"integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=" "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M="
}, },
"needle": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/needle/-/needle-2.5.0.tgz",
"integrity": "sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA==",
"requires": {
"debug": "^3.2.6",
"iconv-lite": "^0.4.4",
"sax": "^1.2.4"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
}
}
},
"negotiator": { "negotiator": {
"version": "0.6.2", "version": "0.6.2",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
...@@ -10606,7 +10629,8 @@ ...@@ -10606,7 +10629,8 @@
"requires-port": { "requires-port": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
"dev": true
}, },
"resolve": { "resolve": {
"version": "1.16.0", "version": "1.16.0",
...@@ -10756,8 +10780,7 @@ ...@@ -10756,8 +10780,7 @@
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
"dev": true
}, },
"sanitize-filename": { "sanitize-filename": {
"version": "1.6.3", "version": "1.6.3",
...@@ -10771,8 +10794,7 @@ ...@@ -10771,8 +10794,7 @@
"sax": { "sax": {
"version": "1.2.4", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
"dev": true
}, },
"schema-utils": { "schema-utils": {
"version": "2.6.5", "version": "2.6.5",
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
"glob": "^7.1.6", "glob": "^7.1.6",
"moment": "^2.26.0", "moment": "^2.26.0",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"needle": "^2.5.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"uniqid": "^5.2.0", "uniqid": "^5.2.0",
"vue": "^2.6.11", "vue": "^2.6.11",
......
...@@ -271,6 +271,39 @@ ...@@ -271,6 +271,39 @@
} }
} }
} }
input[type='range'] {
overflow: hidden;
width: 100%;
outline: none;
-webkit-appearance: none;
background-color: #ddd;
}
input[type='range']::-webkit-slider-runnable-track {
height: 10px;
-webkit-appearance: none;
color: #13bba4;
margin-top: -1px;
}
input[type='range']::-webkit-slider-thumb {
width: 10px;
-webkit-appearance: none;
height: 10px;
cursor: ew-resize;
background: #000;
box-shadow: -800px 0 0 800px rgb(226, 44, 120);
}
/** FF*/
input[type="range"]::-moz-range-progress {
background-color: rgb(226, 44, 120);
}
input[type="range"]::-moz-range-track {
background-color: #ddd;
}
/* IE*/
input[type="range"]::-ms-fill-lower {
background-color: rgb(226, 44, 120);
}
.fade-enter-active, .fade-leave-active { .fade-enter-active, .fade-leave-active {
transition: opacity .2s; transition: opacity .2s;
} }
......
...@@ -2,7 +2,7 @@ const { app, protocol, BrowserWindow, ipcMain, dialog } = require('electron'); ...@@ -2,7 +2,7 @@ const { app, protocol, BrowserWindow, ipcMain, dialog } = require('electron');
const { createProtocol } = require('vue-cli-plugin-electron-builder/lib'); const { createProtocol } = require('vue-cli-plugin-electron-builder/lib');
const isDevelopment = process.env.NODE_ENV !== 'production'; const isDevelopment = process.env.NODE_ENV !== 'production';
const fs = require('fs'); const fs = require('fs');
const http = require('http'); const https = require('https');
const path = require('path'); const path = require('path');
const uniqid = require('uniqid'); const uniqid = require('uniqid');
...@@ -160,7 +160,7 @@ ipcMain.on("getDeeplink", (event) => { ...@@ -160,7 +160,7 @@ ipcMain.on("getDeeplink", (event) => {
function download(url, fileName, cb) { function download(url, fileName, cb) {
let dest = path.join(app.getPath('temp'), fileName + ".zip"); let dest = path.join(app.getPath('temp'), fileName + ".zip");
let file = fs.createWriteStream(dest); let file = fs.createWriteStream(dest);
let request = http.get(url, function(response) { let request = https.get(url, function(response) {
response.pipe(file); response.pipe(file);
file.on('finish', function() { file.on('finish', function() {
file.close(cb(null, dest)); // async call of the callback file.close(cb(null, dest)); // async call of the callback
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
left: 0px; left: 0px;
bottom: 0px; bottom: 0px;
right: 0px; right: 0px;
background: linear-gradient(135deg, #fd2f85, #7a34ec); background: rgb(226, 44, 120);
opacity: 0; opacity: 0;
z-index: 0; z-index: 0;
} }
......
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
}, },
methods: { methods: {
showContextMenu: function(e) { showContextMenu: function(e) {
e.preventDefault(); if(e != undefined) {
e.preventDefault();
}
this.$root.$emit('showContextMenu', { this.$root.$emit('showContextMenu', {
x: e.pageX, x: e.pageX,
...@@ -62,14 +64,18 @@ ...@@ -62,14 +64,18 @@
]}); ]});
}, },
shortDownload: function(e) { shortDownload: function(e) {
e.preventDefault(); if(e != undefined) {
e.preventDefault();
}
if(e.which == 2) { if(e.which == 2) {
this.download(e); this.download(e);
} }
}, },
download: function(e) { download: function(e) {
e.preventDefault(); if(e != undefined) {
e.preventDefault();
}
this.$root.$emit('download', {id: this.$props.id, cover: this.$props.cover, title: this.$props.title, artist: this.$props.artist, downloadPath: this.$props.zip}); this.$root.$emit('download', {id: this.$props.id, cover: this.$props.cover, title: this.$props.title, artist: this.$props.artist, downloadPath: this.$props.zip});
} }
......
<template> <template>
<section :class="!apiFinished ? 'section-song-detail-loading' : 'section-song-detail'"> <section :class="!apiFinished ? 'section-song-detail-loading' : 'section-song-detail'">
<div class="song-detail-background" v-if="apiFinished" :style="'background-image: url(' + cover + '), url(' + require('@/assets/img/defaultAlbumArt.jpg') + ');'">
<div class="song-detail-background-cover"></div>
</div>
<div class="song-detail" v-if="apiFinished"> <div class="song-detail" v-if="apiFinished">
<div class="song-meta"> <div class="song-meta">
<div class="cover" :style="'background-image: url(' + cover + '), url(' + require('@/assets/img/defaultAlbumArt.jpg') + ');'"></div> <div class="cover" :style="'background-image: url(' + cover + '), url(' + require('@/assets/img/defaultAlbumArt.jpg') + ');'"></div>
...@@ -222,12 +225,32 @@ ...@@ -222,12 +225,32 @@
grid-template-columns: 500px 1fr; grid-template-columns: 500px 1fr;
grid-gap: 25px; grid-gap: 25px;
padding: 50px; padding: 50px;
& .song-detail-background {
background-position: center;
background-size: cover;
position: absolute;
top: 0px;
left: 60px;
right: 0px;
height: 300px;
z-index: -1;
& .song-detail-background-cover {
position: absolute;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
background: linear-gradient(180deg, rgba(33,38,41,0.7) 0%, rgba(33,38,41,1) 100%);
}
}
& .song-detail { & .song-detail {
& .song-meta { & .song-meta {
display: grid; display: grid;
grid-template-columns: auto 1fr; grid-template-columns: auto 1fr;
background: rgba(255,255,255,0.1); background: #383C3F;
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
...@@ -267,14 +290,15 @@ ...@@ -267,14 +290,15 @@
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
background: #fff;
& .action, & .action-player { & .action, & .action-player {
background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1)); background: linear-gradient(135deg, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
width: 25%; width: 25%;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #fff; color: #222;
text-decoration: none; text-decoration: none;
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
cursor: pointer; cursor: pointer;
...@@ -366,33 +390,37 @@ ...@@ -366,33 +390,37 @@
} }
} }
& .song-description { & .song-description {
background: rgba(255,255,255,0.1); background: #383C3F;
border-radius: 4px; border-radius: 4px;
margin-top: 25px; margin-top: 25px;
display: grid; display: grid;
grid-gap: 0px; grid-gap: 20px;
padding: 20px;
& .text { & .text {
line-height: 1.5em; line-height: 1.5em;
padding: 20px;
opacity: 0.7; opacity: 0.7;
} }
& .tags { & .tags {
padding: 20px; display: flex;
flex-wrap: wrap;
& .tag { & .tag {
display: block;
margin-right: 10px; margin-right: 10px;
background: #fff; margin-bottom: 10px;
color: #000; color: #fff;
border-radius: 50px; background: rgba(255,255,255,0.2);
padding: 7px 14px; padding: 4px 8px;
border-radius: 4px;
font-size: 12px; font-size: 12px;
text-decoration: none; text-decoration: none;
transition: 0.2s ease-in-out opacity; transition: 0.2s ease-in-out all;
&:hover { &:hover {
cursor: pointer; cursor: pointer;
opacity: 0.6; color: #222;
background: #fff;
} }
} }
} }
...@@ -410,27 +438,26 @@ ...@@ -410,27 +438,26 @@
padding: 15px 40px; padding: 15px 40px;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
opacity: 0.4; background: #1C2022;
background: rgba(0,0,0,0.4); color: rgba(255,255,255,0.4);
transition: 0.2s ease-in-out all; transition: 0.2s ease-in-out all;
color: #fff;
text-decoration: none; text-decoration: none;
&:not(.active):hover { &:not(.active):hover {
cursor: pointer; cursor: pointer;
opacity: 0.75; background: #272c2e;
} color: rgba(255,255,255,0.75);
&.active {
} }
&.router-link-exact-active { &.router-link-exact-active {
opacity: 1; opacity: 1;
background: rgba(255,255,255,0.1); color: rgba(255,255,255,1);
background: #383C3F;
} }
} }
} }
& .tab { & .tab {
background: rgba(255,255,255,0.1); background: #383C3F;
border-radius: 4px; border-radius: 4px;
border-top-left-radius: 0px; border-top-left-radius: 0px;
padding: 20px; padding: 20px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment