mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
3f114dda91
33 changed files with 637 additions and 50 deletions
|
|
@ -57,6 +57,7 @@
|
||||||
"register-service-worker": "^1.7.1",
|
"register-service-worker": "^1.7.1",
|
||||||
"svg-sprite-loader": "^5.0.0",
|
"svg-sprite-loader": "^5.0.0",
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
|
"vscode-codicons": "^0.0.14",
|
||||||
"vue": "^2.6.11",
|
"vue": "^2.6.11",
|
||||||
"vue-analytics": "^5.22.1",
|
"vue-analytics": "^5.22.1",
|
||||||
"vue-electron": "^1.0.6",
|
"vue-electron": "^1.0.6",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="referrer" content="no-referrer" />
|
<meta name="referrer" content="no-referrer" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
23
src/App.vue
23
src/App.vue
|
|
@ -91,6 +91,15 @@ export default {
|
||||||
--color-navbar-bg: rgba(255, 255, 255, 0.86);
|
--color-navbar-bg: rgba(255, 255, 255, 0.86);
|
||||||
--color-primary-bg-for-transparent: rgba(189, 207, 255, 0.28);
|
--color-primary-bg-for-transparent: rgba(189, 207, 255, 0.28);
|
||||||
--color-secondary-bg-for-transparent: rgba(209, 209, 214, 0.28);
|
--color-secondary-bg-for-transparent: rgba(209, 209, 214, 0.28);
|
||||||
|
|
||||||
|
--main-content-padding-x: 10vw;
|
||||||
|
--main-content-padding: 0 var(--main-content-padding-x);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1336px) {
|
||||||
|
:root {
|
||||||
|
--main-content-padding-x: 5vw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="dark"] {
|
[data-theme="dark"] {
|
||||||
|
|
@ -117,26 +126,18 @@ input {
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
background-color: var(--color-body-bg);
|
background-color: var(--color-body-bg);
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
overflow-y: overlay;
|
overflow-y: overlay;
|
||||||
min-width: 768px;
|
min-width: 340px;
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
|
max-width: 100vw;
|
||||||
margin-top: 84px;
|
margin-top: 84px;
|
||||||
margin-bottom: 96px;
|
margin-bottom: 96px;
|
||||||
padding: {
|
|
||||||
right: 10vw;
|
|
||||||
left: 10vw;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1336px) {
|
|
||||||
main {
|
|
||||||
padding: 0 5vw;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
select,
|
select,
|
||||||
|
|
|
||||||
1
src/assets/icons/arrow-down.svg
Normal file
1
src/assets/icons/arrow-down.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 32 32" height="32px" id="Layer_1" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M14.77,23.795L5.185,14.21c-0.879-0.879-0.879-2.317,0-3.195l0.8-0.801c0.877-0.878,2.316-0.878,3.194,0 l7.315,7.315l7.316-7.315c0.878-0.878,2.317-0.878,3.194,0l0.8,0.801c0.879,0.878,0.879,2.316,0,3.195l-9.587,9.585 c-0.471,0.472-1.104,0.682-1.723,0.647C15.875,24.477,15.243,24.267,14.77,23.795z" fill="#515151"/></svg>
|
||||||
|
After Width: | Height: | Size: 661 B |
1
src/assets/icons/arrow-up.svg
Normal file
1
src/assets/icons/arrow-up.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 32 32" height="32px" id="Layer_1" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M18.221,7.206l9.585,9.585c0.879,0.879,0.879,2.317,0,3.195l-0.8,0.801c-0.877,0.878-2.316,0.878-3.194,0 l-7.315-7.315l-7.315,7.315c-0.878,0.878-2.317,0.878-3.194,0l-0.8-0.801c-0.879-0.878-0.879-2.316,0-3.195l9.587-9.585 c0.471-0.472,1.103-0.682,1.723-0.647C17.115,6.524,17.748,6.734,18.221,7.206z" fill="#515151"/></svg>
|
||||||
|
After Width: | Height: | Size: 663 B |
1
src/assets/icons/plus.svg
Normal file
1
src/assets/icons/plus.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M417.4,224H288V94.6c0-16.9-14.3-30.6-32-30.6c-17.7,0-32,13.7-32,30.6V224H94.6C77.7,224,64,238.3,64,256 c0,17.7,13.7,32,30.6,32H224v129.4c0,16.9,14.3,30.6,32,30.6c17.7,0,32-13.7,32-30.6V288h129.4c16.9,0,30.6-14.3,30.6-32 C448,238.3,434.3,224,417.4,224z"/></svg>
|
||||||
|
After Width: | Height: | Size: 618 B |
|
|
@ -88,15 +88,20 @@ class Background {
|
||||||
createWindow() {
|
createWindow() {
|
||||||
console.log("creating app window");
|
console.log("creating app window");
|
||||||
|
|
||||||
|
// Only for Windows, a special title bar for it
|
||||||
|
const withoutFrame = process.platform == "win32";
|
||||||
|
|
||||||
this.window = new BrowserWindow({
|
this.window = new BrowserWindow({
|
||||||
width: this.store.get("window.width") | 1440,
|
width: this.store.get("window.width") | 1440,
|
||||||
height: this.store.get("window.height") | 840,
|
height: this.store.get("window.height") | 840,
|
||||||
minWidth: 1080,
|
minWidth: 360,
|
||||||
minHeight: 720,
|
minHeight: 240,
|
||||||
titleBarStyle: "hiddenInset",
|
titleBarStyle: "hiddenInset",
|
||||||
|
frame: !withoutFrame,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
webSecurity: false,
|
webSecurity: false,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
|
enableRemoteModule: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="cover-row" :style="rowStyles">
|
<div
|
||||||
|
class="cover-row"
|
||||||
|
:style="rowStyles"
|
||||||
|
:class="{ 'without-padding': withoutPadding }"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="item"
|
class="item"
|
||||||
v-for="item in items"
|
v-for="item in items"
|
||||||
|
|
@ -50,6 +54,7 @@ export default {
|
||||||
showPlayCount: { type: Boolean, default: false },
|
showPlayCount: { type: Boolean, default: false },
|
||||||
columnNumber: { type: Number, default: 5 },
|
columnNumber: { type: Number, default: 5 },
|
||||||
gap: { type: String, default: "44px 24px" },
|
gap: { type: String, default: "44px 24px" },
|
||||||
|
withoutPadding: { type: Boolean, default: false },
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
rowStyles() {
|
rowStyles() {
|
||||||
|
|
@ -114,6 +119,13 @@ export default {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.cover-row {
|
.cover-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
|
max-width: calc(100vw - var(--main-content-padding-x));
|
||||||
|
overflow-x: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover-row.without-padding {
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
|
|
@ -143,6 +155,18 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
.item {
|
||||||
|
width: 256px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.item {
|
||||||
|
width: 192px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.item.artist {
|
.item.artist {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="mv-row">
|
<div class="mv-row" :class="{ 'without-padding': withoutPadding }">
|
||||||
<div class="mv" v-for="mv in mvs" :key="getID(mv)">
|
<div class="mv" v-for="mv in mvs" :key="getID(mv)">
|
||||||
<div
|
<div
|
||||||
class="cover"
|
class="cover"
|
||||||
|
|
@ -35,6 +35,7 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "artist",
|
default: "artist",
|
||||||
},
|
},
|
||||||
|
withoutPadding: { type: Boolean, default: false },
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -83,9 +84,39 @@ export default {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.mv-row {
|
.mv-row {
|
||||||
|
--col-num: 5;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(5, 1fr);
|
grid-template-columns: repeat(var(--col-num), 1fr);
|
||||||
gap: 36px 24px;
|
gap: 36px 24px;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mv-row.without-padding {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.mv-row {
|
||||||
|
--col-num: 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
.mv-row {
|
||||||
|
--col-num: 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 700px) {
|
||||||
|
.mv-row {
|
||||||
|
--col-num: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 550px) {
|
||||||
|
.mv-row {
|
||||||
|
--col-num: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mv {
|
.mv {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<nav>
|
<nav :class="{ 'search-box-open': isSearchBoxOpen }">
|
||||||
|
<div class="win32-titlebar">
|
||||||
|
<div class="title">YesPlayMusic</div>
|
||||||
|
<div class="controls">
|
||||||
|
<div
|
||||||
|
class="button minimize codicon codicon-chrome-minimize"
|
||||||
|
@click="windowMinimize"
|
||||||
|
></div>
|
||||||
|
<div
|
||||||
|
class="button max-restore codicon"
|
||||||
|
@click="windowMaxRestore"
|
||||||
|
:class="{
|
||||||
|
'codicon-chrome-restore': windowIsMaximized,
|
||||||
|
'codicon-chrome-maximize': !windowIsMaximized,
|
||||||
|
}"
|
||||||
|
></div>
|
||||||
|
<div
|
||||||
|
class="button close codicon codicon-chrome-close"
|
||||||
|
@click="windowClose"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="navigation-buttons">
|
<div class="navigation-buttons">
|
||||||
<button-icon @click.native="go('back')"
|
<button-icon @click.native="go('back')"
|
||||||
><svg-icon icon-class="arrow-left"
|
><svg-icon icon-class="arrow-left"
|
||||||
|
|
@ -30,6 +51,9 @@
|
||||||
v-if="settings.showGithubIcon !== false"
|
v-if="settings.showGithubIcon !== false"
|
||||||
><svg-icon icon-class="github" class="github"
|
><svg-icon icon-class="github" class="github"
|
||||||
/></a>
|
/></a>
|
||||||
|
<button-icon @click.native="toggleSearchBox()" class="search-button">
|
||||||
|
<svg-icon icon-class="search" />
|
||||||
|
</button-icon>
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
<div class="container" :class="{ active: inputFocus }">
|
<div class="container" :class="{ active: inputFocus }">
|
||||||
<svg-icon icon-class="search" />
|
<svg-icon icon-class="search" />
|
||||||
|
|
@ -52,6 +76,15 @@
|
||||||
<script>
|
<script>
|
||||||
import ButtonIcon from "@/components/ButtonIcon.vue";
|
import ButtonIcon from "@/components/ButtonIcon.vue";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
|
const platformIsWin32 = window.require
|
||||||
|
? window.require("os").platform() == "win32"
|
||||||
|
? true
|
||||||
|
: false
|
||||||
|
: false;
|
||||||
|
|
||||||
|
const win = platformIsWin32
|
||||||
|
? window.require("electron").remote.getCurrentWindow()
|
||||||
|
: null;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Navbar",
|
name: "Navbar",
|
||||||
|
|
@ -63,6 +96,8 @@ export default {
|
||||||
inputFocus: false,
|
inputFocus: false,
|
||||||
langs: ["zh-CN", "en"],
|
langs: ["zh-CN", "en"],
|
||||||
keywords: "",
|
keywords: "",
|
||||||
|
isSearchBoxOpen: false,
|
||||||
|
windowIsMaximized: win ? win.isMaximized() : true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -86,6 +121,24 @@ export default {
|
||||||
params: { keywords: this.keywords },
|
params: { keywords: this.keywords },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
toggleSearchBox() {
|
||||||
|
this.isSearchBoxOpen = !this.isSearchBoxOpen;
|
||||||
|
},
|
||||||
|
windowMinimize() {
|
||||||
|
win.minimize();
|
||||||
|
},
|
||||||
|
windowMaxRestore() {
|
||||||
|
if (win.isMaximized()) {
|
||||||
|
win.restore();
|
||||||
|
this.windowIsMaximized = false;
|
||||||
|
} else {
|
||||||
|
win.maximize();
|
||||||
|
this.windowIsMaximized = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
windowClose() {
|
||||||
|
win.close();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -105,6 +158,9 @@ nav {
|
||||||
left: 10vw;
|
left: 10vw;
|
||||||
}
|
}
|
||||||
backdrop-filter: saturate(180%) blur(20px);
|
backdrop-filter: saturate(180%) blur(20px);
|
||||||
|
border-bottom: 1px solid transparent;
|
||||||
|
transition-property: padding-bottom, border-bottom;
|
||||||
|
transition-duration: 0.4s;
|
||||||
|
|
||||||
background-color: var(--color-navbar-bg);
|
background-color: var(--color-navbar-bg);
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
|
@ -123,6 +179,70 @@ nav {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.win32-titlebar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-electron-platform-win32="yes"] {
|
||||||
|
nav {
|
||||||
|
padding-top: 20px;
|
||||||
|
-webkit-app-region: no-drag;
|
||||||
|
}
|
||||||
|
.win32-titlebar {
|
||||||
|
color: var(--color-text);
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
-webkit-app-region: drag;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
--hover: #e6e6e6;
|
||||||
|
--active: #cccccc;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei",
|
||||||
|
sans-serif;
|
||||||
|
}
|
||||||
|
.controls {
|
||||||
|
height: 32px;
|
||||||
|
margin-left: auto;
|
||||||
|
justify-content: flex-end;
|
||||||
|
display: flex;
|
||||||
|
.button {
|
||||||
|
height: 100%;
|
||||||
|
width: 46px;
|
||||||
|
font-size: 16px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-app-region: no-drag;
|
||||||
|
&:hover {
|
||||||
|
background: var(--hover);
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
background: var(--active);
|
||||||
|
}
|
||||||
|
&.close {
|
||||||
|
&:hover {
|
||||||
|
background: rgba(232, 17, 35, 0.9);
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
background: #f1707a;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&[data-theme="dark"] .win32-titlebar {
|
||||||
|
--hover: #191919;
|
||||||
|
--active: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.navigation-buttons {
|
.navigation-buttons {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -248,5 +368,75 @@ nav {
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
-webkit-app-region: no-drag;
|
-webkit-app-region: no-drag;
|
||||||
}
|
}
|
||||||
|
@media (max-width: 400px) {
|
||||||
|
.github {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.search-button {
|
||||||
|
display: none;
|
||||||
|
-webkit-app-region: no-drag;
|
||||||
|
}
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.search-button {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.right-part {
|
||||||
|
flex: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
.navigation-links > a {
|
||||||
|
margin: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 700px) {
|
||||||
|
.navigation-buttons {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
nav.search-box-open {
|
||||||
|
padding-bottom: 36px;
|
||||||
|
border-bottom-color: var(--color-secondary-bg-for-transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box {
|
||||||
|
display: block;
|
||||||
|
position: fixed;
|
||||||
|
top: 56px;
|
||||||
|
left: 16px;
|
||||||
|
right: 16px;
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
opacity: 0;
|
||||||
|
height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
transition-property: height, opacity;
|
||||||
|
transition-duration: 0.4s;
|
||||||
|
.input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-electron-platform-win32="yes"] {
|
||||||
|
.search-box {
|
||||||
|
// Add more 20px to top for title bar
|
||||||
|
top: calc(56px + 20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.search-box-open .container {
|
||||||
|
opacity: 1;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,10 @@
|
||||||
<div class="middle-control-buttons">
|
<div class="middle-control-buttons">
|
||||||
<div class="blank"></div>
|
<div class="blank"></div>
|
||||||
<div class="container" @click.stop>
|
<div class="container" @click.stop>
|
||||||
<button-icon @click.native="previous" :title="$t('player.previous')"
|
<button-icon
|
||||||
|
@click.native="previous"
|
||||||
|
:title="$t('player.previous')"
|
||||||
|
class="auto-hide"
|
||||||
><svg-icon icon-class="previous"
|
><svg-icon icon-class="previous"
|
||||||
/></button-icon>
|
/></button-icon>
|
||||||
<button-icon
|
<button-icon
|
||||||
|
|
@ -78,7 +81,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="blank"></div>
|
<div class="blank"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-control-buttons">
|
<div class="right-control-buttons auto-hide">
|
||||||
<div class="blank"></div>
|
<div class="blank"></div>
|
||||||
<div class="container" @click.stop>
|
<div class="container" @click.stop>
|
||||||
<button-icon
|
<button-icon
|
||||||
|
|
@ -343,6 +346,18 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 700px) {
|
||||||
|
.controls {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.playing {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.playing .container {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.playing .container {
|
.playing .container {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -448,6 +463,20 @@ export default {
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 700px) {
|
||||||
|
.controls {
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
.middle-control-buttons {
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
.auto-hide,
|
||||||
|
.blank {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// .lyrics-button {
|
// .lyrics-button {
|
||||||
// position: fixed;
|
// position: fixed;
|
||||||
// right: 18px;
|
// right: 18px;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="track-list">
|
<div class="track-list" :class="{ 'without-padding': withoutPadding }">
|
||||||
<ContextMenu ref="menu">
|
<ContextMenu ref="menu">
|
||||||
<div class="item-info">
|
<div class="item-info">
|
||||||
<img :src="rightClickedTrack.al.picUrl | resizeImage(224)" />
|
<img :src="rightClickedTrack.al.picUrl | resizeImage(224)" />
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
>
|
>
|
||||||
<div class="item" @click="addTrackToPlaylist">添加到歌单</div>
|
<div class="item" @click="addTrackToPlaylist">添加到歌单</div>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
<div :style="listStyles">
|
<div :style="listStyles" class="track-list-inner-container">
|
||||||
<TrackListItem
|
<TrackListItem
|
||||||
v-for="(track, index) in tracks"
|
v-for="(track, index) in tracks"
|
||||||
:track="track"
|
:track="track"
|
||||||
|
|
@ -78,10 +78,6 @@ export default {
|
||||||
return []; // 'removeTrackFromPlaylist'
|
return []; // 'removeTrackFromPlaylist'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
columnNumber: {
|
|
||||||
type: Number,
|
|
||||||
default: 4,
|
|
||||||
},
|
|
||||||
highlightPlayingTrack: {
|
highlightPlayingTrack: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
|
|
@ -90,6 +86,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "id",
|
default: "id",
|
||||||
},
|
},
|
||||||
|
withoutPadding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -107,7 +107,6 @@ export default {
|
||||||
this.listStyles = {
|
this.listStyles = {
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gap: "4px",
|
gap: "4px",
|
||||||
gridTemplateColumns: `repeat(${this.columnNumber}, 1fr)`,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -240,4 +239,36 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped>
|
||||||
|
.track-list {
|
||||||
|
--col-num: 4;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
|
|
||||||
|
.track-list-inner-container {
|
||||||
|
grid-template-columns: repeat(var(--col-num), 1fr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.track-list.without-padding {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
.track-list {
|
||||||
|
--col-num: 3;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 700px) {
|
||||||
|
.track-list {
|
||||||
|
--col-num: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 550px) {
|
||||||
|
.track-list {
|
||||||
|
--col-num: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,7 @@ button {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
transition: all 0.3s;
|
||||||
|
|
||||||
.no {
|
.no {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -293,6 +294,11 @@ button {
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.album {
|
||||||
|
flex: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
.time {
|
.time {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
|
|
@ -307,7 +313,6 @@ button {
|
||||||
}
|
}
|
||||||
|
|
||||||
.track.focus {
|
.track.focus {
|
||||||
transition: all 0.3s;
|
|
||||||
background: var(--color-secondary-bg);
|
background: var(--color-secondary-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -354,6 +359,12 @@ button {
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.actions {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.track.playing {
|
.track.playing {
|
||||||
background: var(--color-primary-bg);
|
background: var(--color-primary-bg);
|
||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
|
|
|
||||||
|
|
@ -61,4 +61,12 @@ export function initIpcMain(win, store) {
|
||||||
ipcMain.on("settings", (event, options) => {
|
ipcMain.on("settings", (event, options) => {
|
||||||
store.set("settings", options);
|
store.set("settings", options);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ipcMain.on("max-restore", () => {
|
||||||
|
if (win.isMaximized()) {
|
||||||
|
win.restore();
|
||||||
|
} else {
|
||||||
|
win.maximize();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@ export function ipcRenderer(vueInstance) {
|
||||||
const self = vueInstance;
|
const self = vueInstance;
|
||||||
// 添加专有的类名
|
// 添加专有的类名
|
||||||
document.body.setAttribute("data-electron", "yes");
|
document.body.setAttribute("data-electron", "yes");
|
||||||
|
document.body.setAttribute(
|
||||||
|
"data-electron-platform-win32",
|
||||||
|
window.require("os").platform() == "win32" ? "yes" : "no"
|
||||||
|
);
|
||||||
// ipc message channel
|
// ipc message channel
|
||||||
const electron = window.require("electron");
|
const electron = window.require("electron");
|
||||||
const ipcRenderer = electron.ipcRenderer;
|
const ipcRenderer = electron.ipcRenderer;
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ export function createTray(win) {
|
||||||
app.exit();
|
app.exit();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
tray.popUpContextMenu(contextMenu);
|
tray.popUpContextMenu(contextMenu);
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ import * as Sentry from "@sentry/browser";
|
||||||
import { Vue as VueIntegration } from "@sentry/integrations";
|
import { Vue as VueIntegration } from "@sentry/integrations";
|
||||||
import { Integrations } from "@sentry/tracing";
|
import { Integrations } from "@sentry/tracing";
|
||||||
|
|
||||||
|
// import icons for win32 title bar
|
||||||
|
// icons by https://github.com/microsoft/vscode-codicons
|
||||||
|
import "vscode-codicons/dist/codicon.css";
|
||||||
|
|
||||||
Vue.use(VueAnalytics, {
|
Vue.use(VueAnalytics, {
|
||||||
id: "UA-180189423-1",
|
id: "UA-180189423-1",
|
||||||
router,
|
router,
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,32 @@
|
||||||
export const byAppleMusic = [
|
export const byAppleMusic = [
|
||||||
{
|
{
|
||||||
coverImgUrl:
|
coverImgUrl:
|
||||||
"http://p2.music.126.net/GvYQoflE99eoeGi9jG4Bsw==/109951165375336156.jpg",
|
"https://p2.music.126.net/GvYQoflE99eoeGi9jG4Bsw==/109951165375336156.jpg",
|
||||||
name: "Happy Hits",
|
name: "Happy Hits",
|
||||||
id: 5278068783,
|
id: 5278068783,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
coverImgUrl:
|
coverImgUrl:
|
||||||
"http://p2.music.126.net/5CJeYN35LnzRDsv5Lcs0-Q==/109951165374966765.jpg",
|
"https://p2.music.126.net/5CJeYN35LnzRDsv5Lcs0-Q==/109951165374966765.jpg",
|
||||||
name: "\u4e2d\u563b\u5408\u74a7",
|
name: "\u4e2d\u563b\u5408\u74a7",
|
||||||
id: 5277771961,
|
id: 5277771961,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
coverImgUrl:
|
coverImgUrl:
|
||||||
"http://p1.music.126.net/cPaBXr1wZSg86ddl47AK7Q==/109951165375130918.jpg",
|
"https://p1.music.126.net/cPaBXr1wZSg86ddl47AK7Q==/109951165375130918.jpg",
|
||||||
name: "Heartbreak Pop",
|
name: "Heartbreak Pop",
|
||||||
id: 5277965913,
|
id: 5277965913,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
coverImgUrl:
|
coverImgUrl:
|
||||||
"http://p2.music.126.net/FDtX55P2NjccDna-LBj9PA==/109951165375065973.jpg",
|
"https://p2.music.126.net/FDtX55P2NjccDna-LBj9PA==/109951165375065973.jpg",
|
||||||
name: "Festival Bangers",
|
name: "Festival Bangers",
|
||||||
id: 5277969451,
|
id: 5277969451,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
coverImgUrl:
|
coverImgUrl:
|
||||||
"http://p2.music.126.net/hC0q2dGbOWHVfg4nkhIXPg==/109951165374881177.jpg",
|
"https://p2.music.126.net/hC0q2dGbOWHVfg4nkhIXPg==/109951165374881177.jpg",
|
||||||
name: "Bedtime Beats",
|
name: "Bedtime Beats",
|
||||||
id: 5277778542,
|
id: 5277778542,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -276,6 +276,7 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 78vw;
|
width: 78vw;
|
||||||
margin-bottom: 72px;
|
margin-bottom: 72px;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
.info {
|
.info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
@ -330,6 +331,29 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.playlist-info {
|
||||||
|
width: calc(100vw - 2 * var(--main-content-padding-x));
|
||||||
|
padding: var(--main-content-padding);
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
.cover {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
margin-top: 24px;
|
||||||
|
margin-left: 0;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 48px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.explicit-symbol {
|
.explicit-symbol {
|
||||||
opacity: 0.28;
|
opacity: 0.28;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
|
@ -345,6 +369,7 @@ export default {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
opacity: 0.48;
|
opacity: 0.48;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
padding: var(--main-content-padding);
|
||||||
div {
|
div {
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
@ -363,6 +388,7 @@ export default {
|
||||||
opacity: 0.88;
|
opacity: 0.88;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.description-fulltext {
|
.description-fulltext {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="head">
|
<div class="head">
|
||||||
<img :src="artist.img1v1Url | resizeImage(1024)" />
|
<img :src="artist.img1v1Url | resizeImage(1024)" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="info">
|
||||||
<div class="name">{{ artist.name }}</div>
|
<div class="name">{{ artist.name }}</div>
|
||||||
<div class="artist">{{ $t("artist.artist") }}</div>
|
<div class="artist">{{ $t("artist.artist") }}</div>
|
||||||
<div class="statistics">
|
<div class="statistics">
|
||||||
|
|
@ -253,6 +253,7 @@ export default {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 26px;
|
margin-bottom: 26px;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
padding: var(--main-content-padding);
|
||||||
img {
|
img {
|
||||||
height: 192px;
|
height: 192px;
|
||||||
width: 192px;
|
width: 192px;
|
||||||
|
|
@ -289,12 +290,37 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.artist-info {
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
.head {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
margin-top: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-size: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.section-title {
|
.section-title {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
opacity: 0.88;
|
opacity: 0.88;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
padding-top: 46px;
|
padding-top: 46px;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -309,6 +335,11 @@ export default {
|
||||||
|
|
||||||
.latest-release {
|
.latest-release {
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
padding: var(--main-content-padding);
|
||||||
|
.section-title {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
.release {
|
.release {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
@ -343,6 +374,7 @@ export default {
|
||||||
.popular-tracks {
|
.popular-tracks {
|
||||||
.show-more {
|
.show-more {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
|
|
||||||
button {
|
button {
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ export default {
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 42px;
|
font-size: 42px;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
padding: var(--main-content-padding);
|
||||||
.avatar {
|
.avatar {
|
||||||
height: 44px;
|
height: 44px;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel" v-show="showCatOptions">
|
<div class="panel" v-bind:class="{ show: showCatOptions }">
|
||||||
<div class="big-cat" v-for="bigCat in allBigCats" :key="bigCat">
|
<div class="big-cat" v-for="bigCat in allBigCats" :key="bigCat">
|
||||||
<div class="name">{{ bigCat }}</div>
|
<div class="name">{{ bigCat }}</div>
|
||||||
<div class="cats">
|
<div class="cats">
|
||||||
|
|
@ -174,6 +174,23 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
|
var updatePanelHeight = () => {
|
||||||
|
var panelChildren = this.$el.getElementsByClassName("panel")[0].children;
|
||||||
|
this.$el.style.setProperty(
|
||||||
|
"--explore-panel-children-height",
|
||||||
|
`${
|
||||||
|
Math.abs(
|
||||||
|
panelChildren[0].getBoundingClientRect().y -
|
||||||
|
(panelChildren[panelChildren.length - 1].getBoundingClientRect()
|
||||||
|
.y +
|
||||||
|
panelChildren[panelChildren.length - 1].clientHeight)
|
||||||
|
) + 16
|
||||||
|
}px`
|
||||||
|
);
|
||||||
|
};
|
||||||
|
window.addEventListener("load", updatePanelHeight);
|
||||||
|
window.addEventListener("resize", updatePanelHeight);
|
||||||
|
|
||||||
this.loadData();
|
this.loadData();
|
||||||
},
|
},
|
||||||
beforeRouteUpdate(to, from, next) {
|
beforeRouteUpdate(to, from, next) {
|
||||||
|
|
@ -193,10 +210,12 @@ export default {
|
||||||
h1 {
|
h1 {
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
font-size: 56px;
|
font-size: 56px;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
}
|
}
|
||||||
.buttons {
|
.buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
}
|
}
|
||||||
.button {
|
.button {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
@ -226,8 +245,19 @@ h1 {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
background: var(--color-secondary-bg);
|
background: var(--color-secondary-bg);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 8px;
|
padding: 0 8px;
|
||||||
|
margin: var(--main-content-padding);
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
height: 0;
|
||||||
|
opacity: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: all 0.3s;
|
||||||
|
|
||||||
|
&.show {
|
||||||
|
height: var(--explore-panel-children-height);
|
||||||
|
opacity: 1;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.big-cat {
|
.big-cat {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,7 @@ export default {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
padding: var(--main-content-padding);
|
||||||
a {
|
a {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
:id="likedSongsPlaylist.id"
|
:id="likedSongsPlaylist.id"
|
||||||
dbclickTrackFunc="playPlaylistByID"
|
dbclickTrackFunc="playPlaylistByID"
|
||||||
:columnNumber="3"
|
:columnNumber="3"
|
||||||
|
:withoutPadding="true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -355,6 +356,7 @@ h1 {
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
.avatar {
|
.avatar {
|
||||||
height: 44px;
|
height: 44px;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
|
|
@ -373,6 +375,7 @@ h1 {
|
||||||
.section-one {
|
.section-one {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
.songs {
|
.songs {
|
||||||
flex: 7;
|
flex: 7;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
|
@ -381,6 +384,16 @@ h1 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
.section-one {
|
||||||
|
display: block;
|
||||||
|
.songs {
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.liked-songs {
|
.liked-songs {
|
||||||
flex: 3;
|
flex: 3;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
|
@ -460,6 +473,7 @@ h1 {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs {
|
.tabs {
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@ export default {
|
||||||
.login {
|
.login {
|
||||||
display: flex;
|
display: flex;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
padding: var(--main-content-padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-side">
|
<div class="right-side">
|
||||||
<transition name="slide-fade">
|
<transition name="slide-fade">
|
||||||
<div class="lyrics-container" ref="lyricsContainer" v-show="!noLyric">
|
<div
|
||||||
|
class="lyrics-container"
|
||||||
|
ref="lyricsContainer"
|
||||||
|
v-show="!noLyric"
|
||||||
|
@scroll="blurEffect($event)"
|
||||||
|
>
|
||||||
<div class="line" id="line-1"></div>
|
<div class="line" id="line-1"></div>
|
||||||
<div
|
<div
|
||||||
class="line"
|
class="line"
|
||||||
|
|
@ -270,6 +275,23 @@ export default {
|
||||||
this.$parent.$refs.player.setProgress(value);
|
this.$parent.$refs.player.setProgress(value);
|
||||||
this.$parent.$refs.player.player.seek(value);
|
this.$parent.$refs.player.player.seek(value);
|
||||||
},
|
},
|
||||||
|
blurEffect(ev) {
|
||||||
|
ev.target.children.forEach((el) => {
|
||||||
|
const distanceToCenterPercentage =
|
||||||
|
Math.abs(
|
||||||
|
el.getBoundingClientRect().y +
|
||||||
|
el.clientHeight / 2 -
|
||||||
|
window.innerHeight / 2
|
||||||
|
) /
|
||||||
|
(window.innerHeight / 2);
|
||||||
|
const functionedEffectValue =
|
||||||
|
1 - Math.sqrt(1 - Math.pow(distanceToCenterPercentage, 2));
|
||||||
|
el.style.setProperty(
|
||||||
|
"--func-val",
|
||||||
|
isNaN(functionedEffectValue) ? "" : functionedEffectValue.toFixed(2)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
setLyricsInterval() {
|
setLyricsInterval() {
|
||||||
this.lyricsInterval = setInterval(() => {
|
this.lyricsInterval = setInterval(() => {
|
||||||
const progress = this.player.seek() ?? 0;
|
const progress = this.player.seek() ?? 0;
|
||||||
|
|
@ -282,11 +304,36 @@ export default {
|
||||||
});
|
});
|
||||||
if (oldHighlightLyricIndex !== this.highlightLyricIndex) {
|
if (oldHighlightLyricIndex !== this.highlightLyricIndex) {
|
||||||
const el = document.getElementById(`line${this.highlightLyricIndex}`);
|
const el = document.getElementById(`line${this.highlightLyricIndex}`);
|
||||||
if (el)
|
if (el) {
|
||||||
el.scrollIntoView({
|
const duration = 500;
|
||||||
behavior: "smooth",
|
var start;
|
||||||
block: "center",
|
var animationProgress;
|
||||||
});
|
const oldY = el.parentNode.scrollTop;
|
||||||
|
const newY =
|
||||||
|
el.offsetTop - window.innerHeight / 2 + el.clientHeight / 2;
|
||||||
|
const distance = oldY - newY;
|
||||||
|
var animation = (timeStamp) => {
|
||||||
|
if (!start) {
|
||||||
|
start = timeStamp;
|
||||||
|
}
|
||||||
|
animationProgress = (timeStamp - start) / duration;
|
||||||
|
if (animationProgress < 1) {
|
||||||
|
el.parentNode.scrollTo(
|
||||||
|
0,
|
||||||
|
oldY -
|
||||||
|
Math.sqrt(
|
||||||
|
2 * animationProgress - Math.pow(animationProgress, 2)
|
||||||
|
) *
|
||||||
|
distance
|
||||||
|
);
|
||||||
|
window.requestAnimationFrame(animation);
|
||||||
|
} else {
|
||||||
|
window.cancelAnimationFrame(animation);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.requestAnimationFrame(animation);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, 50);
|
}, 50);
|
||||||
},
|
},
|
||||||
|
|
@ -316,6 +363,8 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
$layoutBreakpoint: 1000px;
|
||||||
|
|
||||||
.lyrics-page {
|
.lyrics-page {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
@ -424,9 +473,28 @@ export default {
|
||||||
height: 22px;
|
height: 22px;
|
||||||
width: 22px;
|
width: 22px;
|
||||||
}
|
}
|
||||||
|
@media (max-width: $layoutBreakpoint) {
|
||||||
|
button:nth-child(2) .svg-icon {
|
||||||
|
height: 48px;
|
||||||
|
width: 48px;
|
||||||
|
}
|
||||||
|
.svg-icon {
|
||||||
|
height: 36px;
|
||||||
|
width: 36px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: $layoutBreakpoint) {
|
||||||
|
.controls {
|
||||||
|
max-width: 100vw;
|
||||||
|
width: calc(100vw - 2 * var(--main-content-padding-x));
|
||||||
|
padding: var(--main-content-padding);
|
||||||
|
margin-top: 48px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cover {
|
.cover {
|
||||||
|
|
@ -435,18 +503,31 @@ export default {
|
||||||
.cover-container {
|
.cover-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: $layoutBreakpoint) {
|
||||||
|
.cover-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
border-radius: 0.75em;
|
border-radius: 0.75em;
|
||||||
width: 54vh;
|
width: 86vw;
|
||||||
height: 54vh;
|
height: 86vw;
|
||||||
|
max-width: 54vh;
|
||||||
|
max-height: 54vh;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
.shadow {
|
.shadow {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 12px;
|
top: 12px;
|
||||||
height: 54vh;
|
width: 86vw;
|
||||||
width: 54vh;
|
height: 86vw;
|
||||||
|
max-width: 54vh;
|
||||||
|
max-height: 54vh;
|
||||||
filter: blur(16px) opacity(0.6);
|
filter: blur(16px) opacity(0.6);
|
||||||
transform: scale(0.92, 0.96);
|
transform: scale(0.92, 0.96);
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
|
|
@ -469,13 +550,24 @@ export default {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
transition: 0.5s;
|
transition: 0.5s;
|
||||||
.line {
|
.line {
|
||||||
|
--func-val: 1;
|
||||||
// margin-top: 38px;
|
// margin-top: 38px;
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
transition: 0.2s;
|
transition: background 0.2s, transform 0.5s cubic-bezier(0.2, 0, 0, 1);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
|
filter: blur(12px);
|
||||||
|
filter: blur(calc(var(--func-val) * 12px));
|
||||||
|
opacity: calc(1 - var(--func-val));
|
||||||
|
transform: scale(0.9) translate(-5%, 0);
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--color-secondary-bg);
|
background: var(--color-secondary-bg);
|
||||||
}
|
}
|
||||||
|
&#line-1 {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
&.highlight {
|
||||||
|
transform: scale(1) translate(0, 0);
|
||||||
|
}
|
||||||
span {
|
span {
|
||||||
opacity: 0.28;
|
opacity: 0.28;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
|
@ -497,6 +589,12 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: $layoutBreakpoint) {
|
||||||
|
.right-side {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.close-button {
|
.close-button {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 24px;
|
top: 24px;
|
||||||
|
|
|
||||||
|
|
@ -146,11 +146,13 @@ export default {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
max-height: 100vh;
|
max-height: 100vh;
|
||||||
|
margin: var(--main-content-padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-info {
|
.video-info {
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
padding: var(--main-content-padding);
|
||||||
.title {
|
.title {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
@ -175,6 +177,8 @@ export default {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
opacity: 0.88;
|
opacity: 0.88;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -453,6 +453,7 @@ export default {
|
||||||
.playlist-info {
|
.playlist-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 72px;
|
margin-bottom: 72px;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
.info {
|
.info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
@ -511,6 +512,28 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.playlist-info {
|
||||||
|
width: calc(100vw - 2 * var(--main-content-padding-x));
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
.cover {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
margin-top: 24px;
|
||||||
|
margin-left: 0;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 48px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.special-playlist {
|
.special-playlist {
|
||||||
margin-top: 192px;
|
margin-top: 192px;
|
||||||
margin-bottom: 128px;
|
margin-bottom: 128px;
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
:columnNumber="3"
|
:columnNumber="3"
|
||||||
:items="artists.slice(0, 3)"
|
:items="artists.slice(0, 3)"
|
||||||
gap="34px 24px"
|
gap="34px 24px"
|
||||||
|
:withoutPadding="true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -30,6 +31,7 @@
|
||||||
:columnNumber="3"
|
:columnNumber="3"
|
||||||
subTextFontSize="14px"
|
subTextFontSize="14px"
|
||||||
gap="34px 24px"
|
gap="34px 24px"
|
||||||
|
:withoutPadding="true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -41,7 +43,7 @@
|
||||||
$t("home.seeMore")
|
$t("home.seeMore")
|
||||||
}}</router-link></div
|
}}</router-link></div
|
||||||
>
|
>
|
||||||
<TrackList :tracks="tracks" type="tracklist" />
|
<TrackList :tracks="tracks" type="tracklist" :withoutPadding="true" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="music-videos" v-show="musicVideos.length > 0">
|
<div class="music-videos" v-show="musicVideos.length > 0">
|
||||||
|
|
@ -51,7 +53,7 @@
|
||||||
$t("home.seeMore")
|
$t("home.seeMore")
|
||||||
}}</router-link></div
|
}}</router-link></div
|
||||||
>
|
>
|
||||||
<MvRow :mvs="musicVideos.slice(0, 5)" />
|
<MvRow :mvs="musicVideos.slice(0, 5)" :withoutPadding="true" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="playlists" v-show="playlists.length > 0">
|
<div class="playlists" v-show="playlists.length > 0">
|
||||||
|
|
@ -68,6 +70,7 @@
|
||||||
:columnNumber="6"
|
:columnNumber="6"
|
||||||
subTextFontSize="14px"
|
subTextFontSize="14px"
|
||||||
gap="34px 24px"
|
gap="34px 24px"
|
||||||
|
:withoutPadding="true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -215,6 +218,10 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.search {
|
||||||
|
padding: var(--main-content-padding);
|
||||||
|
}
|
||||||
|
|
||||||
.section-title {
|
.section-title {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,7 @@ export default {
|
||||||
h1 {
|
h1 {
|
||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
margin-bottom: 28px;
|
margin-bottom: 28px;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
span {
|
span {
|
||||||
opacity: 0.58;
|
opacity: 0.58;
|
||||||
|
|
|
||||||
|
|
@ -393,6 +393,7 @@ export default {
|
||||||
.settings {
|
.settings {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
padding: var(--main-content-padding);
|
||||||
}
|
}
|
||||||
.container {
|
.container {
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
|
|
|
||||||
|
|
@ -11176,6 +11176,11 @@ vm-browserify@^1.0.1:
|
||||||
resolved "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz?cache=0&sync_timestamp=1589682787766&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvm-browserify%2Fdownload%2Fvm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
|
resolved "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz?cache=0&sync_timestamp=1589682787766&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvm-browserify%2Fdownload%2Fvm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
|
||||||
integrity sha1-eGQcSIuObKkadfUR56OzKobl3aA=
|
integrity sha1-eGQcSIuObKkadfUR56OzKobl3aA=
|
||||||
|
|
||||||
|
vscode-codicons@^0.0.14:
|
||||||
|
version "0.0.14"
|
||||||
|
resolved "https://registry.yarnpkg.com/vscode-codicons/-/vscode-codicons-0.0.14.tgz#e0d05418e2e195564ff6f6a2199d70415911c18f"
|
||||||
|
integrity sha512-6CEH5KT9ct5WMw7n5dlX7rB8ya4CUI2FSq1Wk36XaW+c5RglFtAanUV0T+gvZVVFhl/WxfjTvFHq06Hz9c1SLA==
|
||||||
|
|
||||||
vue-analytics@^5.22.1:
|
vue-analytics@^5.22.1:
|
||||||
version "5.22.1"
|
version "5.22.1"
|
||||||
resolved "https://registry.yarnpkg.com/vue-analytics/-/vue-analytics-5.22.1.tgz#9d6b32da56daee1b9dfb23a267b50349a03f710f"
|
resolved "https://registry.yarnpkg.com/vue-analytics/-/vue-analytics-5.22.1.tgz#9d6b32da56daee1b9dfb23a267b50349a03f710f"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue