mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 13:17:46 +00:00
Compare commits
No commits in common. "master" and "v0.4.8-1" have entirely different histories.
33 changed files with 602 additions and 1308 deletions
4
.envrc
4
.envrc
|
|
@ -1,4 +0,0 @@
|
||||||
source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="
|
|
||||||
|
|
||||||
export NIXPKGS_ALLOW_INSECURE=1
|
|
||||||
use devenv
|
|
||||||
1
.github/workflows/build.yaml
vendored
1
.github/workflows/build.yaml
vendored
|
|
@ -81,7 +81,6 @@ jobs:
|
||||||
- name: Build/release Electron app
|
- name: Build/release Electron app
|
||||||
uses: samuelmeuli/action-electron-builder@v1.6.0
|
uses: samuelmeuli/action-electron-builder@v1.6.0
|
||||||
env:
|
env:
|
||||||
VUE_APP_NETEASE_API_URL: /api
|
|
||||||
VUE_APP_ELECTRON_API_URL: /api
|
VUE_APP_ELECTRON_API_URL: /api
|
||||||
VUE_APP_ELECTRON_API_URL_DEV: http://127.0.0.1:10754
|
VUE_APP_ELECTRON_API_URL_DEV: http://127.0.0.1:10754
|
||||||
VUE_APP_LASTFM_API_KEY: 09c55292403d961aa517ff7f5e8a3d9c
|
VUE_APP_LASTFM_API_KEY: 09c55292403d961aa517ff7f5e8a3d9c
|
||||||
|
|
|
||||||
9
.gitignore
vendored
9
.gitignore
vendored
|
|
@ -32,12 +32,3 @@ NeteaseCloudMusicApi-master.zip
|
||||||
# Local Netlify folder
|
# Local Netlify folder
|
||||||
.netlify
|
.netlify
|
||||||
vercel.json
|
vercel.json
|
||||||
# Devenv
|
|
||||||
.devenv*
|
|
||||||
devenv.local.nix
|
|
||||||
|
|
||||||
# direnv
|
|
||||||
.direnv
|
|
||||||
|
|
||||||
# pre-commit
|
|
||||||
.pre-commit-config.yaml
|
|
||||||
|
|
|
||||||
14
README.md
14
README.md
|
|
@ -8,7 +8,7 @@
|
||||||
<p align="center">
|
<p align="center">
|
||||||
高颜值的第三方网易云播放器
|
高颜值的第三方网易云播放器
|
||||||
<br />
|
<br />
|
||||||
<a href="https://music.ineko.cc" target="blank"><strong>🌎 访问DEMO</strong></a> |
|
<a href="https://music.qier222.com" target="blank"><strong>🌎 访问DEMO</strong></a> |
|
||||||
<a href="#%EF%B8%8F-安装" target="blank"><strong>📦️ 下载安装包</strong></a> |
|
<a href="#%EF%B8%8F-安装" target="blank"><strong>📦️ 下载安装包</strong></a> |
|
||||||
<a href="https://t.me/yesplaymusic" target="blank"><strong>💬 加入交流群</strong></a>
|
<a href="https://t.me/yesplaymusic" target="blank"><strong>💬 加入交流群</strong></a>
|
||||||
<br />
|
<br />
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
[![Library][library-screenshot]](https://music.ineko.cc)
|
[![Library][library-screenshot]](https://music.qier222.com)
|
||||||
|
|
||||||
|
|
||||||
## 全新版本
|
## 全新版本
|
||||||
|
|
@ -125,16 +125,6 @@ yarn run build
|
||||||
|
|
||||||
7. 将 `/dist` 目录下的文件上传到你的 Web 服务器
|
7. 将 `/dist` 目录下的文件上传到你的 Web 服务器
|
||||||
|
|
||||||
## ⚙️ 宝塔面板 docker应用商店 部署
|
|
||||||
|
|
||||||
1. 安装宝塔面板,前往[宝塔面板官网](https://www.bt.cn/new/download.html) ,选择正式版的脚本下载安装。
|
|
||||||
|
|
||||||
2. 安装后登录宝塔面板,在左侧导航栏中点击 Docker,首次进入会提示安装Docker服务,点击立即安装,按提示完成安装
|
|
||||||
|
|
||||||
3. 安装完成后在应用商店中找到YesPlayMusic,点击安装,配置域名、端口等基本信息即可完成安装。
|
|
||||||
|
|
||||||
4. 安装后在浏览器输入上一步骤设置的域名即可访问。
|
|
||||||
|
|
||||||
## ⚙️ Docker 部署
|
## ⚙️ Docker 部署
|
||||||
|
|
||||||
1. 构建 Docker Image
|
1. 构建 Docker Image
|
||||||
|
|
|
||||||
132
devenv.lock
132
devenv.lock
|
|
@ -1,132 +0,0 @@
|
||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"devenv": {
|
|
||||||
"locked": {
|
|
||||||
"dir": "src/modules",
|
|
||||||
"lastModified": 1730412360,
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "devenv",
|
|
||||||
"rev": "45847cb1f14a6d8cfa86ea943703c54a8798ae7e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"dir": "src/modules",
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "devenv",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696426674,
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gitignore": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"pre-commit-hooks",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1709087332,
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1730272153,
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1730327045,
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "080166c15633801df010977d9d7474b4a6c549d7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-24.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nodejs16": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1700230496,
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "a71323f68d4377d12c04a5410e214495ec598d4c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "a71323f68d4377d12c04a5410e214495ec598d4c",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pre-commit-hooks": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat",
|
|
||||||
"gitignore": "gitignore",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1730302582,
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "pre-commit-hooks.nix",
|
|
||||||
"rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "pre-commit-hooks.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"devenv": "devenv",
|
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"nodejs16": "nodejs16",
|
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
||||||
53
devenv.nix
53
devenv.nix
|
|
@ -1,53 +0,0 @@
|
||||||
{ pkgs, lib, config, inputs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
nodejs16 = import inputs.nodejs16 { system = pkgs.stdenv.system; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
# https://devenv.sh/basics/
|
|
||||||
env.GREET = "devenv";
|
|
||||||
|
|
||||||
# https://devenv.sh/packages/
|
|
||||||
packages = [ pkgs.git ] ++ lib.optionals pkgs.stdenv.isDarwin (with pkgs.darwin.apple_sdk; [
|
|
||||||
frameworks.AppKit
|
|
||||||
]);
|
|
||||||
|
|
||||||
# https://devenv.sh/languages/
|
|
||||||
languages.javascript.enable = true;
|
|
||||||
languages.javascript.package = nodejs16.pkgs.nodejs_16;
|
|
||||||
languages.javascript.corepack.enable = true;
|
|
||||||
# languages.rust.enable = true;
|
|
||||||
|
|
||||||
# https://devenv.sh/processes/
|
|
||||||
# processes.cargo-watch.exec = "cargo-watch";
|
|
||||||
|
|
||||||
# https://devenv.sh/services/
|
|
||||||
# services.postgres.enable = true;
|
|
||||||
|
|
||||||
# https://devenv.sh/scripts/
|
|
||||||
scripts.hello.exec = ''
|
|
||||||
echo hello from $GREET
|
|
||||||
'';
|
|
||||||
|
|
||||||
enterShell = ''
|
|
||||||
hello
|
|
||||||
git --version
|
|
||||||
'';
|
|
||||||
|
|
||||||
# https://devenv.sh/tasks/
|
|
||||||
# tasks = {
|
|
||||||
# "myproj:setup".exec = "mytool build";
|
|
||||||
# "devenv:enterShell".after = [ "myproj:setup" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# https://devenv.sh/tests/
|
|
||||||
enterTest = ''
|
|
||||||
echo "Running tests"
|
|
||||||
git --version | grep --color=auto "${pkgs.git.version}"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# https://devenv.sh/pre-commit-hooks/
|
|
||||||
# pre-commit.hooks.shellcheck.enable = true;
|
|
||||||
|
|
||||||
# See full reference at https://devenv.sh/reference/options/
|
|
||||||
}
|
|
||||||
19
devenv.yaml
19
devenv.yaml
|
|
@ -1,19 +0,0 @@
|
||||||
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
|
|
||||||
inputs:
|
|
||||||
nixpkgs:
|
|
||||||
url: github:nixos/nixpkgs/nixpkgs-unstable
|
|
||||||
nodejs16:
|
|
||||||
url: github:nixos/nixpkgs/a71323f68d4377d12c04a5410e214495ec598d4c
|
|
||||||
|
|
||||||
# https://github.com/cachix/devenv/issues/792#issuecomment-2043166453
|
|
||||||
impure: true
|
|
||||||
# If you're using non-OSS software, you can set allowUnfree to true.
|
|
||||||
# allowUnfree: true
|
|
||||||
|
|
||||||
# If you're willing to use a package that's vulnerable
|
|
||||||
# permittedInsecurePackages:
|
|
||||||
# - "openssl-1.1.1w"
|
|
||||||
|
|
||||||
# If you have more than one devenv you can merge them
|
|
||||||
#imports:
|
|
||||||
# - ./backend
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "yesplaymusic",
|
"name": "yesplaymusic",
|
||||||
"version": "0.4.9",
|
"version": "0.4.8",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "A third party music player for Netease Music",
|
"description": "A third party music player for Netease Music",
|
||||||
"author": "qier222<qier222@outlook.com>",
|
"author": "qier222<qier222@outlook.com>",
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@unblockneteasemusic/rust-napi": "^0.4.0",
|
"@unblockneteasemusic/rust-napi": "^0.4.0",
|
||||||
"NeteaseCloudMusicApi": "^4.23.3",
|
"NeteaseCloudMusicApi": "^4.8.7",
|
||||||
"axios": "^0.26.1",
|
"axios": "^0.26.1",
|
||||||
"change-case": "^4.1.2",
|
"change-case": "^4.1.2",
|
||||||
"cli-color": "^2.0.0",
|
"cli-color": "^2.0.0",
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
User-agent: *
|
User-agent: *
|
||||||
Disallow: /
|
Disallow:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import { mapTrackPlayableStatus } from '@/utils/common';
|
import { mapTrackPlayableStatus } from '@/utils/common';
|
||||||
import { isAccountLoggedIn } from '@/utils/auth';
|
|
||||||
import { getTrackDetail } from '@/api/track';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取歌手单曲
|
* 获取歌手单曲
|
||||||
|
|
@ -16,13 +14,7 @@ export function getArtist(id) {
|
||||||
id,
|
id,
|
||||||
timestamp: new Date().getTime(),
|
timestamp: new Date().getTime(),
|
||||||
},
|
},
|
||||||
}).then(async data => {
|
}).then(data => {
|
||||||
if (!isAccountLoggedIn()) {
|
|
||||||
const trackIDs = data.hotSongs.map(t => t.id);
|
|
||||||
const tracks = await getTrackDetail(trackIDs.join(','));
|
|
||||||
data.hotSongs = tracks.songs;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
data.hotSongs = mapTrackPlayableStatus(data.hotSongs);
|
data.hotSongs = mapTrackPlayableStatus(data.hotSongs);
|
||||||
return data;
|
return data;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
<svg width="14" height="14" viewBox="0 0 14 14" data-darkreader-inline-fill="" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path id="path" d="M1 11L3 11L3 13C3 13.55 3.45 14 4 14C4.55 14 5 13.55 5 13L5 10C5 9.45 4.55 9 4 9L1 9C0.45 9 0 9.45 0 10C0 10.55 0.45 11 1 11ZM11 3L11 1C11 0.45 10.55 0 10 0C9.45 0 9 0.45 9 1L9 4C9 4.54 9.45 5 10 5L13 5C13.55 5 14 4.54 14 4C14 3.45 13.55 3 13 3L11 3Z"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 396 B |
|
|
@ -1,3 +0,0 @@
|
||||||
<svg width="14" height="14" viewBox="0 0 14 14" data-darkreader-inline-fill="" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path id="path" d="M1 9C0.45 9 0 9.45 0 10L0 13C0 13.55 0.45 14 1 14L4 14C4.55 14 5 13.55 5 13C5 12.45 4.55 12 4 12L2 12L2 10C2 9.45 1.55 9 1 9ZM9 1C9 1.54 9.45 2 10 2L12 2L12 4C12 4.54 12.45 5 13 5C13.55 5 14 4.54 14 4L14 1C14 0.45 13.55 0 13 0L10 0C9.45 0 9 0.45 9 1Z"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 396 B |
|
|
@ -50,7 +50,7 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
items: { type: Array, required: true },
|
items: { type: Array, required: true },
|
||||||
type: { type: String, required: true },
|
type: { type: String, required: true },
|
||||||
subText: { type: String, default: 'none' },
|
subText: { type: String, default: 'null' },
|
||||||
subTextFontSize: { type: String, default: '16px' },
|
subTextFontSize: { type: String, default: '16px' },
|
||||||
showPlayCount: { type: Boolean, default: false },
|
showPlayCount: { type: Boolean, default: false },
|
||||||
columnNumber: { type: Number, default: 5 },
|
columnNumber: { type: Number, default: 5 },
|
||||||
|
|
@ -96,7 +96,7 @@ export default {
|
||||||
return this.type === 'playlist' && item.privacy === 10;
|
return this.type === 'playlist' && item.privacy === 10;
|
||||||
},
|
},
|
||||||
isExplicit(item) {
|
isExplicit(item) {
|
||||||
return this.type === 'album' && (item.mark & 1048576) === 1048576;
|
return this.type === 'album' && item.mark === 1056768;
|
||||||
},
|
},
|
||||||
getTitleLink(item) {
|
getTitleLink(item) {
|
||||||
return `/${this.type}/${item.id}`;
|
return `/${this.type}/${item.id}`;
|
||||||
|
|
|
||||||
|
|
@ -42,15 +42,13 @@
|
||||||
:exclude="$parent.albumObject.artist.name"
|
:exclude="$parent.albumObject.artist.name"
|
||||||
prefix="-"
|
prefix="-"
|
||||||
/></span>
|
/></span>
|
||||||
<span
|
<span v-if="isAlbum && track.mark === 1318912" class="explicit-symbol"
|
||||||
v-if="isAlbum && (track.mark & 1048576) === 1048576"
|
|
||||||
class="explicit-symbol"
|
|
||||||
><ExplicitSymbol
|
><ExplicitSymbol
|
||||||
/></span>
|
/></span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!isAlbum" class="artist">
|
<div v-if="!isAlbum" class="artist">
|
||||||
<span
|
<span
|
||||||
v-if="(track.mark & 1048576) === 1048576"
|
v-if="track.mark === 1318912"
|
||||||
class="explicit-symbol before-artist"
|
class="explicit-symbol before-artist"
|
||||||
><ExplicitSymbol :size="15"
|
><ExplicitSymbol :size="15"
|
||||||
/></span>
|
/></span>
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ export function initIpcMain(win, store, trayEventEmitter) {
|
||||||
details: track.name + ' - ' + track.ar.map(ar => ar.name).join(','),
|
details: track.name + ' - ' + track.ar.map(ar => ar.name).join(','),
|
||||||
state: track.al.name,
|
state: track.al.name,
|
||||||
endTimestamp: Date.now() + track.dt,
|
endTimestamp: Date.now() + track.dt,
|
||||||
largeImageKey: track.al.picUrl,
|
largeImageKey: 'logo',
|
||||||
largeImageText: 'Listening ' + track.name,
|
largeImageText: 'Listening ' + track.name,
|
||||||
smallImageKey: 'play',
|
smallImageKey: 'play',
|
||||||
smallImageText: 'Playing',
|
smallImageText: 'Playing',
|
||||||
|
|
@ -252,7 +252,7 @@ export function initIpcMain(win, store, trayEventEmitter) {
|
||||||
client.updatePresence({
|
client.updatePresence({
|
||||||
details: track.name + ' - ' + track.ar.map(ar => ar.name).join(','),
|
details: track.name + ' - ' + track.ar.map(ar => ar.name).join(','),
|
||||||
state: track.al.name,
|
state: track.al.name,
|
||||||
largeImageKey: track.al.picUrl,
|
largeImageKey: 'logo',
|
||||||
largeImageText: 'YesPlayMusic',
|
largeImageText: 'YesPlayMusic',
|
||||||
smallImageKey: 'pause',
|
smallImageKey: 'pause',
|
||||||
smallImageText: 'Pause',
|
smallImageText: 'Pause',
|
||||||
|
|
|
||||||
|
|
@ -244,8 +244,6 @@ export default {
|
||||||
minePlaylists: 'My Playlists',
|
minePlaylists: 'My Playlists',
|
||||||
likedPlaylists: 'Liked Playlists',
|
likedPlaylists: 'Liked Playlists',
|
||||||
cardiacMode: 'Cardiac Mode',
|
cardiacMode: 'Cardiac Mode',
|
||||||
copyLyric: 'Copy Lyric',
|
|
||||||
copyLyricWithTranslation: 'Copy Lyric With Translation',
|
|
||||||
},
|
},
|
||||||
toast: {
|
toast: {
|
||||||
savedToPlaylist: 'Saved to playlist',
|
savedToPlaylist: 'Saved to playlist',
|
||||||
|
|
|
||||||
|
|
@ -230,8 +230,6 @@ export default {
|
||||||
minePlaylists: 'My Playlists',
|
minePlaylists: 'My Playlists',
|
||||||
likedPlaylists: 'Liked Playlists',
|
likedPlaylists: 'Liked Playlists',
|
||||||
cardiacMode: 'Cardiac Mode',
|
cardiacMode: 'Cardiac Mode',
|
||||||
copyLyric: 'Copy Lyric',
|
|
||||||
copyLyricWithTranslation: 'Copy Lyric With Translation',
|
|
||||||
},
|
},
|
||||||
toast: {
|
toast: {
|
||||||
savedToMyLikedSongs: 'Beğendiğim Müziklere Kaydet',
|
savedToMyLikedSongs: 'Beğendiğim Müziklere Kaydet',
|
||||||
|
|
|
||||||
|
|
@ -243,8 +243,6 @@ export default {
|
||||||
minePlaylists: '创建的歌单',
|
minePlaylists: '创建的歌单',
|
||||||
likedPlaylists: '收藏的歌单',
|
likedPlaylists: '收藏的歌单',
|
||||||
cardiacMode: '心动模式',
|
cardiacMode: '心动模式',
|
||||||
copyLyric: '复制歌词',
|
|
||||||
copyLyricWithTranslation: '复制歌词(含翻译)',
|
|
||||||
},
|
},
|
||||||
toast: {
|
toast: {
|
||||||
savedToPlaylist: '已添加到歌单',
|
savedToPlaylist: '已添加到歌单',
|
||||||
|
|
|
||||||
|
|
@ -240,8 +240,6 @@ export default {
|
||||||
minePlaylists: '我建立的歌單',
|
minePlaylists: '我建立的歌單',
|
||||||
likedPlaylists: '收藏的歌單',
|
likedPlaylists: '收藏的歌單',
|
||||||
cardiacMode: '心動模式',
|
cardiacMode: '心動模式',
|
||||||
copyLyric: '複製歌詞',
|
|
||||||
copyLyricWithTranslation: '複製歌詞(含翻譯)',
|
|
||||||
},
|
},
|
||||||
toast: {
|
toast: {
|
||||||
savedToPlaylist: '已新增至歌單',
|
savedToPlaylist: '已新增至歌單',
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import i18n from '@/locale';
|
||||||
import '@/assets/icons';
|
import '@/assets/icons';
|
||||||
import '@/utils/filters';
|
import '@/utils/filters';
|
||||||
import './registerServiceWorker';
|
import './registerServiceWorker';
|
||||||
|
import { dailyTask } from '@/utils/common';
|
||||||
import '@/assets/css/global.scss';
|
import '@/assets/css/global.scss';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import '@/assets/css/nprogress.css';
|
import '@/assets/css/nprogress.css';
|
||||||
|
|
@ -37,6 +38,7 @@ Vue.use(
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false, trickleSpeed: 100 });
|
NProgress.configure({ showSpinner: false, trickleSpeed: 100 });
|
||||||
|
dailyTask();
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
i18n,
|
i18n,
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,6 @@ let localStorage = {
|
||||||
server: '',
|
server: '',
|
||||||
port: null,
|
port: null,
|
||||||
},
|
},
|
||||||
enableRealIP: false,
|
|
||||||
realIP: null,
|
|
||||||
shortcuts: shortcuts,
|
shortcuts: shortcuts,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { getArtist } from '@/api/artist';
|
||||||
import { trackScrobble, trackUpdateNowPlaying } from '@/api/lastfm';
|
import { trackScrobble, trackUpdateNowPlaying } from '@/api/lastfm';
|
||||||
import { fmTrash, personalFM } from '@/api/others';
|
import { fmTrash, personalFM } from '@/api/others';
|
||||||
import { getPlaylistDetail, intelligencePlaylist } from '@/api/playlist';
|
import { getPlaylistDetail, intelligencePlaylist } from '@/api/playlist';
|
||||||
import { getLyric, getMP3, getTrackDetail } from '@/api/track';
|
import { getLyric, getMP3, getTrackDetail, scrobble } from '@/api/track';
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import { isAccountLoggedIn } from '@/utils/auth';
|
import { isAccountLoggedIn } from '@/utils/auth';
|
||||||
import { cacheTrackSource, getTrackSource } from '@/utils/db';
|
import { cacheTrackSource, getTrackSource } from '@/utils/db';
|
||||||
|
|
@ -130,8 +130,6 @@ export default class {
|
||||||
if (shuffle) {
|
if (shuffle) {
|
||||||
this._shuffleTheList();
|
this._shuffleTheList();
|
||||||
}
|
}
|
||||||
// 同步当前歌曲在列表中的下标
|
|
||||||
this.current = this.list.indexOf(this.currentTrackID);
|
|
||||||
}
|
}
|
||||||
get reversed() {
|
get reversed() {
|
||||||
return this._reversed;
|
return this._reversed;
|
||||||
|
|
@ -309,6 +307,11 @@ export default class {
|
||||||
);
|
);
|
||||||
const trackDuration = ~~(track.dt / 1000);
|
const trackDuration = ~~(track.dt / 1000);
|
||||||
time = completed ? trackDuration : ~~time;
|
time = completed ? trackDuration : ~~time;
|
||||||
|
scrobble({
|
||||||
|
id: track.id,
|
||||||
|
sourceid: this.playlistSource.id,
|
||||||
|
time,
|
||||||
|
});
|
||||||
if (
|
if (
|
||||||
store.state.lastfm.key !== undefined &&
|
store.state.lastfm.key !== undefined &&
|
||||||
(time >= trackDuration / 2 || time >= 240)
|
(time >= trackDuration / 2 || time >= 240)
|
||||||
|
|
@ -889,7 +892,7 @@ export default class {
|
||||||
if (autoPlayTrackID === 'first') {
|
if (autoPlayTrackID === 'first') {
|
||||||
this._replaceCurrentTrack(this.list[0]);
|
this._replaceCurrentTrack(this.list[0]);
|
||||||
} else {
|
} else {
|
||||||
this.current = this.list.indexOf(autoPlayTrackID);
|
this.current = trackIDs.indexOf(autoPlayTrackID);
|
||||||
this._replaceCurrentTrack(autoPlayTrackID);
|
this._replaceCurrentTrack(autoPlayTrackID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,30 +84,3 @@ function trimContent(content) {
|
||||||
let t = content.trim();
|
let t = content.trim();
|
||||||
return t.length < 1 ? content : t;
|
return t.length < 1 ? content : t;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {string} lyric
|
|
||||||
*/
|
|
||||||
export async function copyLyric(lyric) {
|
|
||||||
const textToCopy = lyric;
|
|
||||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
||||||
try {
|
|
||||||
await navigator.clipboard.writeText(textToCopy);
|
|
||||||
} catch (err) {
|
|
||||||
alert('复制失败,请手动复制!');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
const tempInput = document.createElement('textarea');
|
|
||||||
tempInput.value = textToCopy;
|
|
||||||
tempInput.style.position = 'absolute';
|
|
||||||
tempInput.style.left = '-9999px';
|
|
||||||
document.body.appendChild(tempInput);
|
|
||||||
tempInput.select();
|
|
||||||
try {
|
|
||||||
document.execCommand('copy');
|
|
||||||
} catch (err) {
|
|
||||||
alert('复制失败,请手动复制!');
|
|
||||||
}
|
|
||||||
document.body.removeChild(tempInput);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -38,15 +38,8 @@ service.interceptors.request.use(function (config) {
|
||||||
config.params.realIP = '211.161.244.70';
|
config.params.realIP = '211.161.244.70';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force real_ip
|
|
||||||
const enableRealIP = JSON.parse(
|
|
||||||
localStorage.getItem('settings')
|
|
||||||
).enableRealIP;
|
|
||||||
const realIP = JSON.parse(localStorage.getItem('settings')).realIP;
|
|
||||||
if (process.env.VUE_APP_REAL_IP) {
|
if (process.env.VUE_APP_REAL_IP) {
|
||||||
config.params.realIP = process.env.VUE_APP_REAL_IP;
|
config.params.realIP = process.env.VUE_APP_REAL_IP;
|
||||||
} else if (enableRealIP) {
|
|
||||||
config.params.realIP = realIP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const proxy = JSON.parse(localStorage.getItem('settings')).proxyConfig;
|
const proxy = JSON.parse(localStorage.getItem('settings')).proxyConfig;
|
||||||
|
|
@ -64,16 +57,8 @@ service.interceptors.response.use(
|
||||||
},
|
},
|
||||||
async error => {
|
async error => {
|
||||||
/** @type {import('axios').AxiosResponse | null} */
|
/** @type {import('axios').AxiosResponse | null} */
|
||||||
let response;
|
const response = error.response;
|
||||||
let data;
|
const data = response.data;
|
||||||
if (error === 'TypeError: baseURL is undefined') {
|
|
||||||
response = error;
|
|
||||||
data = error;
|
|
||||||
console.error("You must set up the baseURL in the service's config");
|
|
||||||
} else if (error.response) {
|
|
||||||
response = error.response;
|
|
||||||
data = response.data;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
response &&
|
response &&
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,7 @@
|
||||||
<span v-else>Compilation by Various Artists</span>
|
<span v-else>Compilation by Various Artists</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="date-and-count">
|
<div class="date-and-count">
|
||||||
<span
|
<span v-if="album.mark === 1056768" class="explicit-symbol"
|
||||||
v-if="(album.mark & 1048576) === 1048576"
|
|
||||||
class="explicit-symbol"
|
|
||||||
><ExplicitSymbol
|
><ExplicitSymbol
|
||||||
/></span>
|
/></span>
|
||||||
<span :title="album.publishTime | formatDate">{{
|
<span :title="album.publishTime | formatDate">{{
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,6 @@ import {
|
||||||
followAArtist,
|
followAArtist,
|
||||||
similarArtists,
|
similarArtists,
|
||||||
} from '@/api/artist';
|
} from '@/api/artist';
|
||||||
import { getTrackDetail } from '@/api/track';
|
|
||||||
import locale from '@/locale';
|
import locale from '@/locale';
|
||||||
import { isAccountLoggedIn } from '@/utils/auth';
|
import { isAccountLoggedIn } from '@/utils/auth';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
|
|
@ -279,7 +278,7 @@ export default {
|
||||||
this.$parent.$refs.main.scrollTo({ top: 0 });
|
this.$parent.$refs.main.scrollTo({ top: 0 });
|
||||||
getArtist(id).then(data => {
|
getArtist(id).then(data => {
|
||||||
this.artist = data.artist;
|
this.artist = data.artist;
|
||||||
this.setPopularTracks(data.hotSongs);
|
this.popularTracks = data.hotSongs;
|
||||||
if (next !== undefined) next();
|
if (next !== undefined) next();
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
this.show = true;
|
this.show = true;
|
||||||
|
|
@ -292,16 +291,8 @@ export default {
|
||||||
this.mvs = data.mvs;
|
this.mvs = data.mvs;
|
||||||
this.hasMoreMV = data.hasMore;
|
this.hasMoreMV = data.hasMore;
|
||||||
});
|
});
|
||||||
if (isAccountLoggedIn()) {
|
similarArtists(id).then(data => {
|
||||||
similarArtists(id).then(data => {
|
this.similarArtists = data.artists;
|
||||||
this.similarArtists = data.artists;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setPopularTracks(hotSongs) {
|
|
||||||
const trackIDs = hotSongs.map(t => t.id);
|
|
||||||
getTrackDetail(trackIDs.join(',')).then(data => {
|
|
||||||
this.popularTracks = data.songs;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goToAlbum(id) {
|
goToAlbum(id) {
|
||||||
|
|
|
||||||
|
|
@ -120,13 +120,10 @@ export default {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!this.show) NProgress.start();
|
if (!this.show) NProgress.start();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
const queryCategory = this.$route.query.category;
|
this.activeCategory =
|
||||||
if (queryCategory === undefined) {
|
this.$route.query.category === undefined
|
||||||
this.playlists = [];
|
? '全部'
|
||||||
this.activeCategory = '全部';
|
: this.$route.query.category;
|
||||||
} else {
|
|
||||||
this.activeCategory = queryCategory;
|
|
||||||
}
|
|
||||||
this.getPlaylist();
|
this.getPlaylist();
|
||||||
},
|
},
|
||||||
goToCategory(Category) {
|
goToCategory(Category) {
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapActions, mapMutations, mapState } from 'vuex';
|
import { mapActions, mapMutations, mapState } from 'vuex';
|
||||||
import { randomNum } from '@/utils/common';
|
import { randomNum, dailyTask } from '@/utils/common';
|
||||||
import { isAccountLoggedIn } from '@/utils/auth';
|
import { isAccountLoggedIn } from '@/utils/auth';
|
||||||
import { uploadSong } from '@/api/user';
|
import { uploadSong } from '@/api/user';
|
||||||
import { getLyric } from '@/api/track';
|
import { getLyric } from '@/api/track';
|
||||||
|
|
@ -310,6 +310,7 @@ export default {
|
||||||
activated() {
|
activated() {
|
||||||
this.$parent.$refs.scrollbar.restorePosition();
|
this.$parent.$refs.scrollbar.restorePosition();
|
||||||
this.loadData();
|
this.loadData();
|
||||||
|
dailyTask();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['showToast']),
|
...mapActions(['showToast']),
|
||||||
|
|
|
||||||
|
|
@ -7,19 +7,16 @@
|
||||||
<div class="title">{{ $t('login.loginText') }}</div>
|
<div class="title">{{ $t('login.loginText') }}</div>
|
||||||
<div class="section-2">
|
<div class="section-2">
|
||||||
<div v-show="mode === 'phone'" class="input-box">
|
<div v-show="mode === 'phone'" class="input-box">
|
||||||
<div
|
<div class="container" :class="{ active: inputFocus === 'phone' }">
|
||||||
class="container"
|
|
||||||
:class="{ active: ['phone', 'countryCode'].includes(inputFocus) }"
|
|
||||||
>
|
|
||||||
<svg-icon icon-class="mobile" />
|
<svg-icon icon-class="mobile" />
|
||||||
<div class="inputs">
|
<div class="inputs">
|
||||||
<input
|
<input
|
||||||
id="countryCode"
|
id="countryCode"
|
||||||
v-model="countryCode"
|
v-model="countryCode"
|
||||||
:placeholder="
|
:placeholder="
|
||||||
inputFocus === 'countryCode' ? '' : $t('login.countryCode')
|
inputFocus === 'phone' ? '' : $t('login.countryCode')
|
||||||
"
|
"
|
||||||
@focus="inputFocus = 'countryCode'"
|
@focus="inputFocus = 'phone'"
|
||||||
@blur="inputFocus = ''"
|
@blur="inputFocus = ''"
|
||||||
@keyup.enter="login"
|
@keyup.enter="login"
|
||||||
/>
|
/>
|
||||||
|
|
@ -90,14 +87,14 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="other-login">
|
<div class="other-login">
|
||||||
<!-- <a v-show="mode !== 'email'" @click="changeMode('email')">{{
|
<a v-show="mode !== 'email'" @click="changeMode('email')">{{
|
||||||
$t('login.loginWithEmail')
|
$t('login.loginWithEmail')
|
||||||
}}</a>
|
}}</a>
|
||||||
<span v-show="mode === 'qrCode'">|</span>
|
<span v-show="mode === 'qrCode'">|</span>
|
||||||
<a v-show="mode !== 'phone'" @click="changeMode('phone')">{{
|
<a v-show="mode !== 'phone'" @click="changeMode('phone')">{{
|
||||||
$t('login.loginWithPhone')
|
$t('login.loginWithPhone')
|
||||||
}}</a>
|
}}</a>
|
||||||
<span v-show="mode !== 'qrCode'">|</span> -->
|
<span v-show="mode !== 'qrCode'">|</span>
|
||||||
<a v-show="mode !== 'qrCode'" @click="changeMode('qrCode')">
|
<a v-show="mode !== 'qrCode'" @click="changeMode('qrCode')">
|
||||||
二维码登录
|
二维码登录
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -248,11 +248,7 @@
|
||||||
@dblclick="clickLyricLine(line.time, true)"
|
@dblclick="clickLyricLine(line.time, true)"
|
||||||
>
|
>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<span
|
<span v-if="line.contents[0]">{{ line.contents[0] }}</span>
|
||||||
v-if="line.contents[0]"
|
|
||||||
@click.right="openLyricMenu($event, line, 0)"
|
|
||||||
>{{ line.contents[0] }}</span
|
|
||||||
>
|
|
||||||
<br />
|
<br />
|
||||||
<span
|
<span
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -260,26 +256,10 @@
|
||||||
$store.state.settings.showLyricsTranslation
|
$store.state.settings.showLyricsTranslation
|
||||||
"
|
"
|
||||||
class="translation"
|
class="translation"
|
||||||
@click.right="openLyricMenu($event, line, 1)"
|
|
||||||
>{{ line.contents[1] }}</span
|
>{{ line.contents[1] }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ContextMenu v-if="!noLyric" ref="lyricMenu">
|
|
||||||
<div class="item" @click="copyLyric(false)">{{
|
|
||||||
$t('contextMenu.copyLyric')
|
|
||||||
}}</div>
|
|
||||||
<div
|
|
||||||
v-if="
|
|
||||||
rightClickLyric &&
|
|
||||||
rightClickLyric.contents[1] &&
|
|
||||||
$store.state.settings.showLyricsTranslation
|
|
||||||
"
|
|
||||||
class="item"
|
|
||||||
@click="copyLyric(true)"
|
|
||||||
>{{ $t('contextMenu.copyLyricWithTranslation') }}</div
|
|
||||||
>
|
|
||||||
</ContextMenu>
|
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -288,12 +268,6 @@
|
||||||
<svg-icon icon-class="arrow-down" />
|
<svg-icon icon-class="arrow-down" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="close-button" style="left: 24px" @click="fullscreen">
|
|
||||||
<button>
|
|
||||||
<svg-icon v-if="isFullscreen" icon-class="fullscreen-exit" />
|
|
||||||
<svg-icon v-else icon-class="fullscreen" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -304,10 +278,9 @@
|
||||||
|
|
||||||
import { mapState, mapMutations, mapActions } from 'vuex';
|
import { mapState, mapMutations, mapActions } from 'vuex';
|
||||||
import VueSlider from 'vue-slider-component';
|
import VueSlider from 'vue-slider-component';
|
||||||
import ContextMenu from '@/components/ContextMenu.vue';
|
|
||||||
import { formatTrackTime } from '@/utils/common';
|
import { formatTrackTime } from '@/utils/common';
|
||||||
import { getLyric } from '@/api/track';
|
import { getLyric } from '@/api/track';
|
||||||
import { lyricParser, copyLyric } from '@/utils/lyrics';
|
import { lyricParser } from '@/utils/lyrics';
|
||||||
import ButtonIcon from '@/components/ButtonIcon.vue';
|
import ButtonIcon from '@/components/ButtonIcon.vue';
|
||||||
import * as Vibrant from 'node-vibrant/dist/vibrant.worker.min.js';
|
import * as Vibrant from 'node-vibrant/dist/vibrant.worker.min.js';
|
||||||
import Color from 'color';
|
import Color from 'color';
|
||||||
|
|
@ -320,7 +293,6 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
VueSlider,
|
VueSlider,
|
||||||
ButtonIcon,
|
ButtonIcon,
|
||||||
ContextMenu,
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -333,8 +305,6 @@ export default {
|
||||||
minimize: true,
|
minimize: true,
|
||||||
background: '',
|
background: '',
|
||||||
date: this.formatTime(new Date()),
|
date: this.formatTime(new Date()),
|
||||||
isFullscreen: !!document.fullscreenElement,
|
|
||||||
rightClickLyric: null,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -465,15 +435,6 @@ export default {
|
||||||
this.getLyric();
|
this.getLyric();
|
||||||
this.getCoverColor();
|
this.getCoverColor();
|
||||||
this.initDate();
|
this.initDate();
|
||||||
document.addEventListener('keydown', e => {
|
|
||||||
if (e.key === 'F11') {
|
|
||||||
e.preventDefault();
|
|
||||||
this.fullscreen();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
document.addEventListener('fullscreenchange', () => {
|
|
||||||
this.isFullscreen = !!document.fullscreenElement;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
beforeDestroy: function () {
|
beforeDestroy: function () {
|
||||||
if (this.timer) {
|
if (this.timer) {
|
||||||
|
|
@ -505,13 +466,6 @@ export default {
|
||||||
second.padStart(2, '0')
|
second.padStart(2, '0')
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
fullscreen() {
|
|
||||||
if (document.fullscreenElement) {
|
|
||||||
document.exitFullscreen();
|
|
||||||
} else {
|
|
||||||
document.documentElement.requestFullscreen();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
addToPlaylist() {
|
addToPlaylist() {
|
||||||
if (!isAccountLoggedIn()) {
|
if (!isAccountLoggedIn()) {
|
||||||
this.showToast(locale.t('toast.needToLogin'));
|
this.showToast(locale.t('toast.needToLogin'));
|
||||||
|
|
@ -610,21 +564,6 @@ export default {
|
||||||
this.player.play();
|
this.player.play();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openLyricMenu(e, lyric, idx) {
|
|
||||||
this.rightClickLyric = { ...lyric, idx };
|
|
||||||
this.$refs.lyricMenu.openMenu(e);
|
|
||||||
e.preventDefault();
|
|
||||||
},
|
|
||||||
copyLyric(withTranslation) {
|
|
||||||
if (this.rightClickLyric) {
|
|
||||||
const idx = this.rightClickLyric.idx;
|
|
||||||
if (!withTranslation) {
|
|
||||||
copyLyric(this.rightClickLyric.contents[idx]);
|
|
||||||
} else {
|
|
||||||
copyLyric(this.rightClickLyric.contents.join(' '));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setLyricsInterval() {
|
setLyricsInterval() {
|
||||||
this.lyricsInterval = setInterval(() => {
|
this.lyricsInterval = setInterval(() => {
|
||||||
const progress = this.player.seek(null, false) ?? 0;
|
const progress = this.player.seek(null, false) ?? 0;
|
||||||
|
|
@ -964,7 +903,6 @@ export default {
|
||||||
transform-origin: center left;
|
transform-origin: center left;
|
||||||
transform: scale(0.95);
|
transform: scale(0.95);
|
||||||
transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
user-select: none;
|
|
||||||
|
|
||||||
span {
|
span {
|
||||||
opacity: 0.28;
|
opacity: 0.28;
|
||||||
|
|
|
||||||
|
|
@ -57,9 +57,7 @@ export default {
|
||||||
this.player.current + 1,
|
this.player.current + 1,
|
||||||
this.player.current + 100
|
this.player.current + 100
|
||||||
);
|
);
|
||||||
return trackIDs
|
return this.tracks.filter(t => trackIDs.includes(t.id));
|
||||||
.map(tid => this.tracks.find(t => t.id === tid))
|
|
||||||
.filter(t => t);
|
|
||||||
},
|
},
|
||||||
playNextList() {
|
playNextList() {
|
||||||
return this.player.playNextList;
|
return this.player.playNextList;
|
||||||
|
|
|
||||||
|
|
@ -641,33 +641,6 @@
|
||||||
<button @click="sendProxyConfig">更新代理</button>
|
<button @click="sendProxyConfig">更新代理</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isElectron">
|
|
||||||
<h3>Real IP</h3>
|
|
||||||
<div class="item">
|
|
||||||
<div class="left">
|
|
||||||
<div class="title"> Real IP </div>
|
|
||||||
</div>
|
|
||||||
<div class="right">
|
|
||||||
<div class="toggle">
|
|
||||||
<input
|
|
||||||
id="enable-real-ip"
|
|
||||||
v-model="enableRealIP"
|
|
||||||
type="checkbox"
|
|
||||||
name="enable-real-ip"
|
|
||||||
/>
|
|
||||||
<label for="enable-real-ip"></label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="real-ip" :class="{ disabled: !enableRealIP }">
|
|
||||||
<input
|
|
||||||
v-model="realIP"
|
|
||||||
class="text-input"
|
|
||||||
placeholder="IP地址"
|
|
||||||
:disabled="!enableRealIP"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="isElectron">
|
<div v-if="isElectron">
|
||||||
<h3>快捷键</h3>
|
<h3>快捷键</h3>
|
||||||
|
|
@ -1151,28 +1124,6 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
enableRealIP: {
|
|
||||||
get() {
|
|
||||||
return this.settings.enableRealIP || false;
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
this.$store.commit('updateSettings', {
|
|
||||||
key: 'enableRealIP',
|
|
||||||
value: value,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
realIP: {
|
|
||||||
get() {
|
|
||||||
return this.settings.realIP || '';
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
this.$store.commit('updateSettings', {
|
|
||||||
key: 'realIP',
|
|
||||||
value: value,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
proxyPort: {
|
proxyPort: {
|
||||||
get() {
|
get() {
|
||||||
return this.settings.proxyConfig?.port || '';
|
return this.settings.proxyConfig?.port || '';
|
||||||
|
|
@ -1615,13 +1566,11 @@ input[type='number'] {
|
||||||
-moz-appearance: textfield;
|
-moz-appearance: textfield;
|
||||||
}
|
}
|
||||||
|
|
||||||
#proxy-form,
|
#proxy-form {
|
||||||
#real-ip {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
#proxy-form.disabled,
|
#proxy-form.disabled {
|
||||||
#real-ip.disabled {
|
|
||||||
opacity: 0.47;
|
opacity: 0.47;
|
||||||
button:hover {
|
button:hover {
|
||||||
transform: unset;
|
transform: unset;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue