Compare commits

...

86 Commits

Author SHA1 Message Date
lyswhut
b04c676288 更换反馈方式 2020-03-15 21:15:15 +08:00
lyswhut
01e2a2bdb2 发布0.17.0版本 2020-03-15 20:10:58 +08:00
lyswhut
670533807a 新增热搜词、历史搜索记录 2020-03-15 17:17:41 +08:00
lyswhut
9d1270374e 优化右上角最小化/关闭按钮布局 2020-03-15 00:15:52 +08:00
lyswhut
353e8bd0de 支持打开短链接歌单 2020-03-14 23:36:38 +08:00
lyswhut
9ca0ec82a8 修复下载列表标签切换及全选bug 2020-03-14 23:13:36 +08:00
lyswhut
bb5fd44750 更新歌单打开描述 2020-03-14 22:56:12 +08:00
lyswhut
1e435b0ff8 支持直接打开酷我手机版分享出来的歌单地址 2020-03-14 22:54:19 +08:00
lyswhut
bb080c2d18 优化歌单打开机制 2020-03-14 20:58:03 +08:00
lyswhut
91063075d3 新增发现新版本更新失败弹窗的忽略提醒按钮 2020-03-14 18:08:02 +08:00
lyswhut
ccaf485c91 修复数据导入Bug 2020-03-14 00:49:13 +08:00
lyswhut
125207226b 改变下载任务插入方式 2020-03-13 19:44:55 +08:00
lyswhut
393affbd90 优化选择器显示 2020-03-13 16:37:00 +08:00
lyswhut
4f06fe45d3 新增音源别名 2020-03-13 16:16:42 +08:00
lyswhut
ba1a981c87 修改默认窗口大小为重 2020-03-13 14:45:06 +08:00
lyswhut
6d51240a27 修复选择器bug,新增较小、较大窗口设置 2020-03-13 13:38:02 +08:00
lyswhut
527143405f 恢复更新超时时间 2020-03-13 12:24:50 +08:00
lyswhut
2808fdd3c0 添加供应链攻击科普链接 2020-03-13 12:22:19 +08:00
lyswhut
a2c84392f4 新增软件界面元素大小调整 2020-03-12 23:33:19 +08:00
lyswhut
3fdff4e6eb 完善翻译 2020-03-12 21:12:12 +08:00
lyswhut
dd41e00691 移除窗口恢复事件 2020-03-12 19:02:59 +08:00
lyswhut
29bcaa9558 更新依赖 2020-03-12 16:59:16 +08:00
lyswhut
3be3e8546f 修复鼠标右击复制列表内容时会复制音质标签文字的问题 2020-03-12 16:06:12 +08:00
lyswhut
0bbb760e61 完善音频输出功能 2020-03-10 23:31:25 +08:00
lyswhut
4f238f4f62 完善音频输出设置功能 2020-03-10 12:40:47 +08:00
lyswhut
a244c6d5e3 Merge branch 'md' into dev 2020-03-10 12:20:14 +08:00
lyswhut
aa5765971e 完善选择器 2020-03-07 13:21:13 +08:00
lyswhut
2a66edd1c5 完善默认值显示 2020-03-07 11:55:31 +08:00
lyswhut
a6e86e8d6b 修复歌单详情处于加载状态时无法返回的问题 2020-03-07 10:52:43 +08:00
lyswhut
f30cb9da59 Merge branch 'dev' into md 2020-03-03 12:31:40 +08:00
lyswhut
e94d17a922 添加启动参数说明 2020-03-02 16:21:40 +08:00
lyswhut
53f5c168ad 新增启动参数 search 2020-03-02 15:57:26 +08:00
lyswhut
4533f7b1d5 优化播放进度条的动画效果 2020-03-02 15:50:05 +08:00
lyswhut
b9398e882a 初步完善 2020-02-28 13:19:49 +08:00
lyswhut
66f19d72da 更新依赖 2020-02-28 13:18:44 +08:00
lyswhut
35e85cfdcb 修复文件导入顺序导致的恢复设置语言报错 2020-02-27 23:25:21 +08:00
lyswhut
6d6b63cce1 新增对主题名字的翻译 2020-02-27 23:21:28 +08:00
lyswhut
a7d5e77a1c 更新无法打开外部歌单描述 2020-02-26 11:16:51 +08:00
lyswhut
0332b22c4a 补上翻译 2020-02-23 23:56:09 +08:00
lyswhut
09a7974818 支持搜索源翻译 2020-02-19 22:11:48 +08:00
lyswhut
66d2f0d550 修复歌单标签翻译读取bug 2020-02-19 21:51:41 +08:00
lyswhut
d2556fed20 优化月里嫦娥皮肤侧栏鼠标悬浮颜色 2020-02-19 21:44:50 +08:00
lyswhut
49cd8536a7 新增无法打开外部歌单FAQ 2020-02-19 21:15:27 +08:00
lyswhut
b8f15bcca9 新增多语言设置 2020-02-19 20:41:34 +08:00
lyswhut
a17ba9f62c update issue template 2020-02-18 12:28:20 +08:00
lyswhut
a9aa9a2e20 发布0.16.0版本 2020-02-16 11:09:25 +08:00
lyswhut
43da07ca4c 优化版本对比机制 2020-02-15 22:16:16 +08:00
lyswhut
1b22abcd50 优化版本号对比机制 2020-02-15 21:02:47 +08:00
lyswhut
f85c83169d 设置响应时间限制 2020-02-15 19:39:50 +08:00
lyswhut
ecff344473 更新electron到8.0.1 2020-02-15 18:08:49 +08:00
lyswhut
cde380782f 从request模块切换到needle 2020-02-15 18:08:04 +08:00
lyswhut
d557149326 加载新列表时清空当前列表 2020-02-15 18:07:12 +08:00
lyswhut
ecdcb040ee 优化列表加载交互 2020-02-15 12:59:35 +08:00
lyswhut
e58471fe37 修复QQ源歌单热门标签歌单列表无法加载问题 2020-02-15 12:00:53 +08:00
lyswhut
30e66473db 修复酷狗歌单热门标签列表无法加载问题 2020-02-15 00:15:11 +08:00
lyswhut
5357ed3746 修复无结果时的错误处理 2020-02-14 23:57:21 +08:00
lyswhut
337f443cbf 优化音质标签判断显示逻辑 2020-02-14 19:25:23 +08:00
lyswhut
e7ad1b8496 优化各个主题音质标签颜色 2020-02-14 19:24:56 +08:00
lyswhut
aea01de449 更新软件界面无法显示解决方案 2020-02-13 15:22:34 +08:00
lyswhut
b7fb75a49e 更新issue模板 2020-02-13 14:54:50 +08:00
lyswhut
57752d09cd 调整火影主题翻页器背景颜色 2020-02-12 15:03:23 +08:00
lyswhut
bd395f557a 添加单独win x64 x32安装包构建 2020-02-11 17:08:25 +08:00
lyswhut
2d865d8fed 添加单独win x64 x32安装包构建 2020-02-11 16:45:14 +08:00
lyswhut
5bff74e7a9 移除多个空格 2020-02-10 18:12:38 +08:00
lyswhut
a9e3723764 新增在搜索框鼠标右击时自动粘贴剪贴板的文本到搜索框中 2020-02-10 18:05:16 +08:00
lyswhut
b811227c41 更新electron到 8.0.0 2020-02-10 17:25:58 +08:00
lyswhut
4896c4dda5 新增在列表可选内容区域鼠标右击时自动复制列表已选文字的功能 2020-02-10 17:25:07 +08:00
lyswhut
b4ee1ade2d 修正描述 2020-02-07 23:09:23 +08:00
lyswhut
a6e2308282 修正邮箱地址 2020-02-03 23:01:49 +08:00
lyswhut
f56c42f353 修复某些情况下暂停任务会自动开始任务的问题 2020-02-01 14:45:52 +08:00
lyswhut
5edf51810d 新增下载失败时显示搜索按钮 2020-02-01 14:44:15 +08:00
lyswhut
81985b0e31 添加主进程代码编译错误输出 2020-01-31 12:00:10 +08:00
lyswhut
163830f1bd 更新electron到7.1.11 2020-01-31 11:59:20 +08:00
lyswhut
867ae2991c 允许选中列表内的部分文字,优化界面 2020-01-30 11:54:04 +08:00
lyswhut
ee3d04ba23 更新更新提示 2020-01-29 20:45:26 +08:00
lyswhut
71dd8c14f8 更新软件启动后,界面无法显示的解决方案 2020-01-29 20:33:45 +08:00
lyswhut
88dc9c2a74 修复大窗口时设置的音乐来源选项不换行的问题 2020-01-28 13:49:05 +08:00
lyswhut
98f012de4d 更新electron到 7.1.10 2020-01-28 12:39:42 +08:00
lyswhut
c85a036ac6 修复启用透明窗口鼠标不穿透的bug 2020-01-28 12:38:29 +08:00
lyswhut
1f8b632d95 修正架构包名 2020-01-23 17:50:44 +08:00
lyswhut
59dd56e542 发布0.15.0版本 2020-01-23 01:32:22 +08:00
lyswhut
1bfa8dcb3f bug 修复 2020-01-23 01:26:46 +08:00
lyswhut
1b381af7a7 修复歌曲下载列表无法加载的问题 2020-01-23 01:01:02 +08:00
lyswhut
2bc4912416 发布0.14.1版本 2020-01-22 22:31:39 +08:00
lyswhut
474f0d8291 修正描述 2020-01-22 22:31:04 +08:00
lyswhut
231fe54408 修复由于旧版配置文件迁移出错导致的软件界面无法显示的问题 2020-01-22 22:30:50 +08:00
138 changed files with 4114 additions and 1821 deletions

View File

@@ -7,6 +7,11 @@ assignees: ''
---
**解决方案检查**
<!-- 请确保你已从以下渠道寻找过解决方案,然后将 [ ] 替换成 [x] -->
- [ ] 我已阅读常见问题(<https://github.com/lyswhut/lx-music-desktop/blob/master/FAQ.md>)
- [ ] 我已搜索issue列表(<https://github.com/lyswhut/lx-music-desktop/issues?utf8=✓&q=>)
**描述您想要的解决方案**
简洁明了地描述您要发生的事情。
@@ -14,4 +19,4 @@ assignees: ''
对您考虑过的所有替代解决方案或功能的简洁明了的描述。
**其他内容**
在此处添加有关功能请求的任何其他上下文或屏幕截图。
在此处添加有关功能请求的任何其他上下文或屏幕截图(直接把图片拖到编辑框即可添加图片)

View File

@@ -7,6 +7,11 @@ assignees: ''
---
**解决方案检查**
<!-- 请确保你已从以下渠道寻找过解决方案,然后将 [ ] 替换成 [x] -->
- [ ] 我已阅读常见问题(<https://github.com/lyswhut/lx-music-desktop/blob/master/FAQ.md>)
- [ ] 我已搜索issue列表(<https://github.com/lyswhut/lx-music-desktop/issues?utf8=✓&q=>)
**描述错误**
清楚简洁地说明错误是什么。
@@ -21,7 +26,7 @@ assignees: ''
对您期望发生的事情的简洁明了的描述。
**截图**
如果适用,请添加屏幕截图以帮助解释您的问题。
如果适用,请添加屏幕截图以帮助解释您的问题(直接把图片拖到编辑框即可添加图片)
**环境:**
  -操作系统及版本:[例如Windows 10 64位 18362.156]

View File

@@ -6,6 +6,86 @@ Project versioning adheres to [Semantic Versioning](http://semver.org/).
Commit convention is based on [Conventional Commits](http://conventionalcommits.org).
Change log format is based on [Keep a Changelog](http://keepachangelog.com/).
## [0.17.0](https://github.com/lyswhut/lx-music-desktop/compare/v0.16.0...v0.17.0) - 2020-03-15
### 新增
- 新增多语言设置目前软件内置了简体中文、繁体中文、英语三种语言欢迎提交PR翻译更多语言
- 新增无法打开外部歌单FAQ
- 新增启动参数`search`,使用例子:`.\lx-music-desktop.exe -search="突然的自我 - 伍佰"`
- 新增音频输出设置
- 新增软件内的包括字体在内的界面内容大小调整,现在当窗口大小切换到“较小/大/较大”时,软件内的元素将会适当减小或加大,窗口大小的“小”与“中”内的元素将保持之前的大小暂不做改变
- 新增音源别名,默认将显示别名,想要显示回原名可到设置切换(免责声明:别名仅是本软件用于描述各音源的标签,其名字归版权方所有)
- 新增发现新版本更新失败弹窗的忽略提醒按钮,忽略提醒后,以后同一个版本再失败时将不会弹窗提醒,但仍可到设置-版本更新手动点开更新弹窗查看或恢复提醒
- 新增热搜词,默认关闭,可到设置开启
- 新增历史搜索记录,默认关闭,可到设置开启(右击单个历史记录标签可移除所点击的记录)
### 优化
- 优化月里嫦娥皮肤侧栏鼠标悬浮颜色
- 优化播放进度条的动画效果
- 现在添加下载任务时,后面添加的任务会在列表顶部插入
- 优化歌单打开机制,现在歌单加载失败时会提示加载失败了,并且支持直接打开企鹅、酷我手机分享出来的歌单了
- 优化右上角最小化/关闭按钮布局
### 修复
- 修复歌单详情处于加载状态时无法返回的问题
- 修复鼠标右击复制列表内容时会复制音质标签的问题
- 修复`0.6.2`及以前的版本导出的“所有数据”内的歌曲列表无法导入的问题
- 修复下载列表在某些情况下无法取消全选的问题
### 其他
- 更新Electron到 8.1.1
## [0.16.0](https://github.com/lyswhut/lx-music-desktop/compare/v0.15.0...v0.16.0) - 2020-02-16
### 新增
- 允许选中列表内歌曲名、歌手名、专辑名内的文字,选中后可使用键盘快捷键进行复制
- 新增在列表可选内容区域**鼠标右击**时自动复制列表已选文字的功能
- 新增在搜索框**鼠标右击**时自动粘贴剪贴板的文本到搜索框中
- 任务下载失败时将显示搜索按钮,方便在其他源搜索该歌曲
### 优化
- 优化木叶之村主题翻页器背景颜色
- 优化各个主题音质标签颜色
- 优化其他一些界面细节及用户交互效果
### 修复
- 修复启用透明窗口鼠标不穿透的bug
- 修复大窗口时设置的音乐来源选项不换行的问题
- 修复某些情况下暂停任务会自动开始任务的问题
- 修复移除暂停、错误的任务时不删除未下载完成的文件的问题
- 修复酷狗源歌单热门标签歌单列表无法加载问题
- 修复QQ源歌单热门标签歌单列表无法加载问题
### 其他
- 更新electron到 8.0.1
## [0.15.0](https://github.com/lyswhut/lx-music-desktop/compare/v0.14.1...v0.15.0) - 2020-01-23
洛雪提前祝大家新年快乐、身体健康、阖家幸福!
### 修复
- 修复歌曲下载列表无法加载的问题
- 修复歌曲下载任务数大于最大下载任务数的问题
- 修复某些情况下歌曲下载错误的问题
- 修复下载列表数据没有被迁移直接被丢弃的问题
## [0.14.1](https://github.com/lyswhut/lx-music-desktop/compare/v0.14.0...v0.14.1) - 2020-01-22
洛雪提前祝大家新年快乐、身体健康、阖家幸福!
### 修复
- 修复由于旧版配置文件迁移出错导致的软件界面无法显示的问题
## [0.14.0](https://github.com/lyswhut/lx-music-desktop/compare/v0.13.1...v0.14.0) - 2020-01-22
洛雪提前祝大家新年快乐、身体健康、阖家幸福!

23
FAQ.md
View File

@@ -12,7 +12,7 @@
1. 尝试更新到最新版本
2. 尝试切换其他歌曲(或直接搜索该歌曲),若全部歌曲都无法试听与下载则进行下一步
3. 尝试到设置-接口来源切换到其他接口
3. 尝试到 设置-音乐来源 切换到其他接口
4. 尝试切换网络,比如用手机开热点(目前存在某些网络无法访问接口服务器的情况)
5. 若还不行请到这个链接查看详情:<https://github.com/lyswhut/lx-music-desktop/issues/5>
6. 若没有在第5条链接中的第一条评论中看到接口无法使用的说明则应该是你网络无法访问接口服务器的问题如果接口有问题我会在那里说明。
@@ -59,10 +59,15 @@
## 软件启动后,界面无法显示
软件启动后,可以在任务栏看到软件,但软件界面在桌面上无任何显示。<br>
解决办法:下载`.NET Framework 4.7.1`或更高版本安装即可。<br>
原始问题看:<https://github.com/electron/electron/issues/19569#issuecomment-522231083>
原始问题看:<https://github.com/electron/electron/issues/19569#issuecomment-522231083><br>
解决办法:下载`.NET Framework 4.7.1`或**更高**版本安装即可(建议安装最新版,若安装过程中遇到问题可尝试自行百度解决)。<br>
微软官方下载地址:<https://dotnet.microsoft.com/download/dotnet-framework><br>
下载`Runtime(运行时)`版即可,安装完成后可能需要重启才生效。
若还是不行可尝试更新显卡驱动。
若还是不行可尝试以下操作:
- 更新显卡驱动
- 尝试将绿色版的软件放在**桌面**或**我的文档**运行
## 安装版安装失败,提示安装程序并未成功地运行完成
@@ -83,8 +88,8 @@
## 杀毒软件提示有病毒或恶意行为
本人只能保证我写的代码不包含任何**恶意代码**、**收集用户信息**的行为并且软件代码已开源请自行查阅软件安装包也是由CI拉取源代码构建构建日志[windows包](https://ci.appveyor.com/project/lyswhut/lx-music-desktop)、[Mac/Linux包](https://travis-ci.org/lyswhut/lx-music-desktop)<br>
尽管如此但这不意味着软件是100%安全的,由于软件使用了第三方依赖,当这些依赖存在恶意行为时(供应链攻击),软件也将会受到牵连,所以我只能尽量选择使用较多人用、信任度较高的依赖。<br>
当然,以上说明建立的前提是在你所用的安装包是从**官方渠道**下载的,或者有相关能力者还可以下载源代码自己构建安装包。
尽管如此但这不意味着软件是100%安全的,由于软件使用了第三方依赖,当这些依赖存在恶意行为时([供应链攻击](https://docs.microsoft.com/zh-cn/windows/security/threat-protection/intelligence/supply-chain-malware)),软件也将会受到牵连,所以我只能尽量选择使用较多人用、信任度较高的依赖。<br>
当然,以上说明建立的前提是在你所用的安装包是从**本项目主页上写的链接**下载的,或者有相关能力者还可以下载源代码自己构建安装包。
最后,若出现杀毒软件报毒,请自行判断选择是否继续使用本软件!
@@ -94,3 +99,9 @@
- 检查是否在设置界面开启了代理(当代理乱设置时软件将无法联网)
- 检查软件是否被第三方软件/防火墙阻止联网
## 无法打开外部歌单
对于分享出来的歌单若打开失败可尝试先在浏览器中打开后再从浏览器地址栏复制URL地址到软件打开<br>
或者如果你知道歌单 id 也可以直接输入歌单 id 打开。<br>
目前不支持打开**酷狗用户自定义**歌单。

View File

@@ -36,7 +36,7 @@
所用技术栈:
- Electron 7
- Electron 8
- Vue 2
已支持的平台:
@@ -70,6 +70,13 @@ npm run pack
<p><a href="https://github.com/lyswhut/lx-music-desktop"><img width="100%" src="https://github.com/lyswhut/lx-music-desktop/blob/master/doc/images/app.png" alt="lx-music UI"></a></p>
### 启动参数
目前软件已支持的启动参数如下:
- `-search` 启动软件时自动在搜索框搜索指定的内容,例如:`-search="突然的自我 - 伍佰"`
- `-nt` 以非透明模式启动对于未开启AERO效果的win7系统可加此参数启动以确保界面正常显示
### 常见问题
常见问题已移至:<https://github.com/lyswhut/lx-music-desktop/blob/master/FAQ.md>
@@ -81,7 +88,7 @@ npm run pack
### 免责声明
本项目**不开发或者破解直接获取音频数据**的功能,所有音频数据均来自**第三方接口**<br>
本软件仅用于**测试 `electron 7` 在各种系统上的兼容性**及用于**对比各大音乐平台歌单、排行榜等数据列表的差异性**,使用本软件产生的**任何涉及版权相关的数据**请于**24小时内删除**。<br>
本软件仅用于**测试 `electron 8` 在各种系统上的兼容性**及用于**对比各大音乐平台歌单、排行榜等数据列表的差异性**,使用本软件产生的**任何涉及版权相关的数据**请于**24小时内删除**。<br>
本软件仅用于学习交流使用,禁止用于商业用途,使用本软件所造成的的后果由使用者承担!<br>
若对此有疑问请 mail to: lyswhut@qq.com

View File

@@ -1,6 +1,7 @@
const path = require('path')
const merge = require('webpack-merge')
const webpack = require('webpack')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const baseConfig = require('./webpack.config.base')
@@ -18,5 +19,17 @@ module.exports = merge(baseConfig, {
__static: `"${path.join(__dirname, '../../src/static').replace(/\\/g, '\\\\')}"`,
}),
new webpack.NoEmitOnErrorsPlugin(),
new FriendlyErrorsPlugin({
onErrors(severity, errors) { // Silent warning from electron-debug
if (severity != 'warning') return
for (let i = errors.length; i > -1; i--) {
const error = errors[i]
if (error.file == './node_modules/electron-debug/index.js') errors.splice(i, 1)
}
// You can listen to errors transformed and prioritized by the plugin
// severity can be 'error' or 'warning'
},
}),
],
})

2132
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,17 @@
{
"name": "lx-music-desktop",
"version": "0.14.0",
"version": "0.17.0",
"description": "一个免费的音乐下载助手",
"main": "./dist/electron/main.js",
"productName": "lx-music-desktop",
"scripts": {
"pack": "node build-config/pack.js && npm run pack:win",
"pack:win": "npm run pack:win:setup && npm run pack:win:7z",
"pack:win:setup": "cross-env TARGET=win_安装版 ARCH=x64_x86 electron-builder -w=nsis --x64 --ia32",
"pack:win:portable": "npm run pack:win:portable:x64_x86 && npm run pack:win:portable:x64 && npm run pack:win:portable:x86",
"pack:win:portable:x64_x86": "cross-env TARGET=便携版 ARCH=x64_x86 electron-builder -w=portable --x64 --ia32",
"pack:win": "npm run pack:win:setup:x86_64 && npm run pack:win:7z",
"pack:win:setup:x86_64": "cross-env TARGET=win_安装版 ARCH=x86_64 electron-builder -w=nsis --x64 --ia32",
"pack:win:setup:x64": "cross-env TARGET=win_安装版 ARCH=x64 electron-builder -w=nsis --x64",
"pack:win:setup:x86": "cross-env TARGET=win_安装版 ARCH=x86 electron-builder -w=nsis --ia32",
"pack:win:portable": "npm run pack:win:portable:x86_64 && npm run pack:win:portable:x64 && npm run pack:win:portable:x86",
"pack:win:portable:x86_64": "cross-env TARGET=便携版 ARCH=x86_64 electron-builder -w=portable --x64 --ia32",
"pack:win:portable:x64": "cross-env TARGET=便携版 ARCH=x64 electron-builder -w=portable --x64",
"pack:win:portable:x86": "cross-env TARGET=便携版 ARCH=x86 electron-builder -w=portable --ia32",
"pack:win:7z": "npm run pack:win:7z:x64 && npm run pack:win:7z:x86",
@@ -18,9 +20,9 @@
"publish": "node publish",
"publish:gh": "node build-config/pack.js && npm run publish:win",
"publish:win": "npm run publish:win:7z && npm run publish:win:setup",
"publish:win:setup": "cross-env TARGET=Setup ARCH=x64_x86 electron-builder -w=nsis --x64 --ia32 -p onTagOrDraft",
"publish:win:portable": "npm run publish:win:portable:x64_x86 && npm run publish:win:portable:x64 && npm run publish:win:portable:x86",
"publish:win:portable:x64_x86": "cross-env TARGET=portable ARCH=x64_x86 electron-builder -w=portable --x64 --ia32 -p onTagOrDraft",
"publish:win:setup": "cross-env TARGET=Setup ARCH=x86_64 electron-builder -w=nsis --x64 --ia32 -p onTagOrDraft",
"publish:win:portable": "npm run publish:win:portable:x86_64 && npm run publish:win:portable:x64 && npm run publish:win:portable:x86",
"publish:win:portable:x86_64": "cross-env TARGET=portable ARCH=x86_64 electron-builder -w=portable --x64 --ia32 -p onTagOrDraft",
"publish:win:portable:x64": "cross-env TARGET=portable ARCH=x64 electron-builder -w=portable --x64 -p onTagOrDraft",
"publish:win:portable:x86": "cross-env TARGET=portable ARCH=x86 electron-builder -w=portable --ia32 -p onTagOrDraft",
"publish:win:7z": "npm run publish:win:7z:x64 && npm run publish:win:7z:x86",
@@ -49,7 +51,7 @@
"lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-formatter-friendly --fix src"
},
"browserslist": [
"Electron 7.1.9"
"Electron 8.1.1"
],
"engines": {
"node": ">= 12"
@@ -75,7 +77,7 @@
"category": "public.app-category.music"
},
"linux": {
"maintainer": "lyswhut <lyswuhut@qq.com>",
"maintainer": "lyswhut <lyswhut@qq.com>",
"artifactName": "${productName} v${version} ${env.ARCH}.${ext}",
"icon": "./resources/icons",
"category": "Utility;AudioVideo;Audio;Player;Music;",
@@ -131,7 +133,7 @@
],
"author": {
"name": "lyswhut",
"email": "lyswuhut@qq.com"
"email": "lyswhut@qq.com"
},
"license": "Apache-2.0",
"bugs": {
@@ -139,81 +141,85 @@
},
"homepage": "https://github.com/lyswhut/lx-music-desktop#readme",
"devDependencies": {
"@babel/core": "^7.8.3",
"@babel/core": "^7.8.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/polyfill": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"@babel/polyfill": "^7.8.7",
"@babel/preset-env": "^7.8.7",
"autoprefixer": "^9.7.4",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"babel-minify-webpack-plugin": "^0.3.1",
"babel-preset-minify": "^0.5.1",
"browserslist": "^4.8.5",
"cfonts": "^2.4.8",
"browserslist": "^4.9.1",
"cfonts": "^2.8.0",
"chalk": "^3.0.0",
"changelog-parser": "^2.8.0",
"copy-webpack-plugin": "^5.1.1",
"core-js": "^3.6.4",
"cos-nodejs-sdk-v5": "^2.5.14",
"cross-env": "^6.0.3",
"cos-nodejs-sdk-v5": "^2.5.20",
"cross-env": "^7.0.2",
"css-loader": "^3.4.2",
"del": "^5.1.0",
"electron": "^7.1.9",
"electron-builder": "^22.2.0",
"electron": "^8.1.1",
"electron-builder": "^22.4.1",
"electron-debug": "^3.0.1",
"electron-devtools-installer": "^2.2.4",
"electron-to-chromium": "^1.3.376",
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.0",
"eslint-formatter-friendly": "^7.0.0",
"eslint-loader": "^3.0.3",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"file-loader": "^5.0.2",
"file-loader": "^5.1.0",
"friendly-errors-webpack-plugin": "^1.7.0",
"html-webpack-plugin": "^3.2.0",
"less": "^3.10.3",
"less": "^3.11.1",
"less-loader": "^5.0.0",
"markdown-it": "^10.0.0",
"mini-css-extract-plugin": "^0.9.0",
"multispinner": "^0.2.1",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"postcss-loader": "^3.0.0",
"postcss-pxtorem": "^5.1.1",
"pug": "^2.0.4",
"pug-loader": "^2.4.0",
"pug-plain-loader": "^1.0.0",
"raw-loader": "^4.0.0",
"rimraf": "^3.0.0",
"rimraf": "^3.0.2",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"terser-webpack-plugin": "^2.3.2",
"terser-webpack-plugin": "^2.3.5",
"url-loader": "^3.0.0",
"vue-loader": "^15.8.3",
"vue-loader": "^15.9.0",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.10.1",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3",
"webpack-hot-middleware": "^2.25.0",
"webpack-merge": "^4.2.2"
},
"dependencies": {
"crypto-js": "^3.1.9-1",
"crypto-js": "^4.0.0",
"dnscache": "^1.0.2",
"electron-log": "^4.0.3",
"electron-store": "^5.1.0",
"electron-updater": "^4.2.0",
"electron-log": "^4.1.0",
"electron-store": "^5.1.1",
"electron-updater": "^4.2.5",
"flac-metadata": "^0.1.1",
"js-htmlencode": "^0.3.0",
"lrc-file-parser": "^1.0.0",
"node-id3": "^0.1.13",
"request": "^2.88.0",
"needle": "^2.3.3",
"node-id3": "^0.1.14",
"request": "^2.88.2",
"vue": "^2.6.11",
"vue-electron": "^1.0.6",
"vue-router": "^3.1.5",
"vuex": "^3.1.2",
"vue-i18n": "^8.15.5",
"vue-router": "^3.1.6",
"vuex": "^3.1.3",
"vuex-electron": "^1.0.3",
"vuex-router-sync": "^5.0.0"
}

View File

@@ -1,7 +1,28 @@
const autoprefixer = require('autoprefixer')
const pxtorem = require('postcss-pxtorem')
module.exports = {
plugins: [
pxtorem({
rootValue: 16,
unitPrecision: 5,
propList: [
'font', 'font-size',
'line-height',
'letter-spacing',
'padding', 'margin',
'height', 'width',
'max-width', 'max-height',
'min-width', 'min-height',
'top', 'left', 'bottom', 'right',
'border-radius',
],
selectorBlackList: ['html'],
replace: true,
mediaQuery: false,
minPixelValue: 0,
exclude: [/node_modules/i],
}),
autoprefixer(),
],
}

View File

@@ -1,26 +1,30 @@
洛雪提前祝大家新年快乐、身体健康、阖家幸福!
### 新增
- 新增各大平台歌单热门标签显示(显示在歌单界面的第一个下拉标签菜单中)
- 恢复QQ音乐源128k音质试听
- 新增不强制win7开启透明效果即可使用但要配置运行参数`-nt`,例如`.\lx-music-desktop.exe -nt`,添加方法可自行百度“给快捷方式加参数”
- 新增“新年快乐”主题,可自行切换体验
- 新增多语言设置目前软件内置了简体中文、繁体中文、英语三种语言欢迎提交PR翻译更多语言
- 新增无法打开外部歌单FAQ
- 新增启动参数`search`,使用例子`.\lx-music-desktop.exe -search="突然的自我 - 伍佰"`
- 新增音频输出设置
- 新增软件内的包括字体在内的界面内容大小调整,现在当窗口大小切换到“较小/大/较大”时,软件内的元素将会适当减小或加大,窗口大小的“小”与“中”内的元素将保持之前的大小暂不做改变
- 新增音源别名,默认将显示别名,想要显示回原名可到设置切换(免责声明:别名仅是本软件用于描述各音源的标签,其名字归版权方所有)
- 新增发现新版本更新失败弹窗的忽略提醒按钮,忽略提醒后,以后同一个版本再失败时将不会弹窗提醒,但仍可到设置-版本更新手动点开更新弹窗查看或恢复提醒
- 新增热搜词,默认关闭,可到设置开启
- 新增历史搜索记录,默认关闭,可到设置开启(右击单个历史记录标签可移除所点击的记录)
### 优化
- 减淡各个主题的歌曲列表分隔线颜色
- 在线音乐列表音质标签优化,当歌曲有无损音质时隐藏高品质标签
- 更新改进的歌词播放插件,现在歌词的播放显示将更准确
- 优化月里嫦娥皮肤侧栏鼠标悬浮颜色
- 优化播放进度条的动画效果
- 现在添加下载任务时,后面添加的任务会在列表顶部插入
- 优化歌单打开机制,现在歌单加载失败时会提示加载失败了,并且支持直接打开企鹅、酷我手机分享出来的歌单了
- 优化右上角最小化/关闭按钮布局
### 修复
- 修复咪咕源无法搜索的问题
- 修复更新弹窗底部文字颜色没有适配当前主题颜色的问题
- 修复导入设置窗口大小、代理设置不立即生效的问题
- 修复在线音乐列表获取失败时无限循环请求的问题
- 修复歌单详情处于加载状态时无法返回的问题
- 修复鼠标右击复制列表内容时会复制音质标签的问题
- 修复`0.6.2`及以前的版本导出的“所有数据”内的歌曲列表无法导入的问题
- 修复下载列表在某些情况下无法取消全选的问题
### 其他
- 将软件设置与播放列表分离存储成两个文件
- 更新 Electron 到 7.1.9
- 更新Electron到 8.1.1

View File

@@ -1,7 +1,23 @@
{
"version": "0.14.0",
"desc": "<p>洛雪提前祝大家新年快乐、身体健康、阖家幸福!</p>\n<h3>新增</h3>\n<ul>\n<li>新增各大平台歌单热门标签显示(显示在歌单界面的第一个下拉标签菜单中)</li>\n<li>恢复QQ音乐源128k音质试听</li>\n<li>新增不强制win7开启透明效果即可使用但要配置运行参数<code>-nt</code>例如<code>.\\lx-music-desktop.exe -nt</code>,添加方法可自行百度“给快捷方式加参数”</li>\n<li>新增“新年快乐”主题,可自行切换体验</li>\n</ul>\n<h3>优化</h3>\n<ul>\n<li>减淡各个主题的歌曲列表分隔线颜色</li>\n<li>在线音乐列表音质标签优化,当歌曲有无损音质时隐藏高品质标签</li>\n<li>更新改进的歌词播放插件,现在歌词的播放显示将更准确</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复咪咕源无法搜索的问题</li>\n<li>修复更新弹窗底部文字颜色没有适配当前主题颜色的问题</li>\n<li>修复导入设置窗口大小、代理设置不立即生效的问题</li>\n<li>修复在线音乐列表获取失败时无限循环请求的问题</li>\n</ul>\n<h3>其他</h3>\n<ul>\n<li>将软件设置与播放列表分离存储成两个文件</li>\n<li>更新 Electron 7.1.9</li>\n</ul>\n",
"version": "0.17.0",
"desc": "<h3>新增</h3>\n<ul>\n<li>新增多语言设置目前软件内置了简体中文、繁体中文、英语三种语言欢迎提交PR翻译更多语言</li>\n<li>新增无法打开外部歌单FAQ</li>\n<li>新增启动参数<code>search</code>使用例子<code>.\\lx-music-desktop.exe -search=&quot;突然的自我 - 伍佰&quot;</code></li>\n<li>新增音频输出设置</li>\n<li>新增软件内的包括字体在内的界面内容大小调整,现在当窗口大小切换到“较小/大/较大”时,软件内的元素将会适当减小或加大,窗口大小的“小”与“中”内的元素将保持之前的大小暂不做改变</li>\n<li>新增音源别名,默认将显示别名,想要显示回原名可到设置切换(免责声明:别名仅是本软件用于描述各音源的标签,其名字归版权方所有)</li>\n<li>新增发现新版本更新失败弹窗的忽略提醒按钮,忽略提醒后,以后同一个版本再失败时将不会弹窗提醒,但仍可到设置-版本更新手动点开更新弹窗查看或恢复提醒</li>\n<li>新增热搜词,默认关闭,可到设置开启</li>\n<li>新增历史搜索记录,默认关闭,可到设置开启(右击单个历史记录标签可移除所点击的记录)</li>\n</ul>\n<h3>优化</h3>\n<ul>\n<li>优化月里嫦娥皮肤侧栏鼠标悬浮颜色</li>\n<li>优化播放进度条的动画效果</li>\n<li>现在添加下载任务时,后面添加的任务会在列表顶部插入</li>\n<li>优化歌单打开机制,现在歌单加载失败时会提示加载失败了,并且支持直接打开企鹅、酷我手机分享出来的歌单了</li>\n<li>优化右上角最小化/关闭按钮布局</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复歌单详情处于加载状态时无法返回的问题</li>\n<li>修复鼠标右击复制列表内容时会复制音质标签的问题</li>\n<li>修复<code>0.6.2</code>及以前的版本导出的“所有数据”内的歌曲列表无法导入的问题</li>\n<li>修复下载列表在某些情况下无法取消全选的问题</li>\n</ul>\n<h3>其他</h3>\n<ul>\n<li>更新Electron到 8.1.1</li>\n</ul>\n",
"history": [
{
"version": "0.16.0",
"desc": "<h3>新增</h3>\n<ul>\n<li>允许选中列表内歌曲名、歌手名、专辑名内的文字,选中后可使用键盘快捷键进行复制</li>\n<li>新增在列表可选内容区域<strong>鼠标右击</strong>时自动复制列表已选文字的功能</li>\n<li>新增在搜索框<strong>鼠标右击</strong>时自动粘贴剪贴板的文本到搜索框中</li>\n<li>任务下载失败时将显示搜索按钮,方便在其他源搜索该歌曲</li>\n</ul>\n<h3>优化</h3>\n<ul>\n<li>优化木叶之村主题翻页器背景颜色</li>\n<li>优化各个主题音质标签颜色</li>\n<li>优化其他一些界面细节及用户交互效果</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复启用透明窗口鼠标不穿透的bug</li>\n<li>修复大窗口时设置的音乐来源选项不换行的问题</li>\n<li>修复某些情况下暂停任务会自动开始任务的问题</li>\n<li>修复移除暂停、错误的任务时不删除未下载完成的文件的问题</li>\n<li>修复酷狗源歌单热门标签歌单列表无法加载问题</li>\n<li>修复QQ源歌单热门标签歌单列表无法加载问题</li>\n</ul>\n<h3>其他</h3>\n<ul>\n<li>更新electron到 8.0.1</li>\n</ul>\n"
},
{
"version": "0.15.0",
"desc": "<p>洛雪提前祝大家新年快乐、身体健康、阖家幸福!</p>\n<h3>修复</h3>\n<ul>\n<li>修复歌曲下载列表无法加载的问题</li>\n<li>修复歌曲下载任务数大于最大下载任务数的问题</li>\n<li>修复某些情况下歌曲下载错误的问题</li>\n<li>修复下载列表数据没有被迁移直接被丢弃的问题</li>\n</ul>\n"
},
{
"version": "0.14.1",
"desc": "<p>洛雪提前祝大家新年快乐、身体健康、阖家幸福!</p>\n<h3>修复</h3>\n<ul>\n<li>修复由于旧版配置文件迁移出错导致的软件界面无法显示的问题</li>\n</ul>\n"
},
{
"version": "0.14.0",
"desc": "<p>洛雪提前祝大家新年快乐、身体健康、阖家幸福!</p>\n<h3>新增</h3>\n<ul>\n<li>新增各大平台歌单热门标签显示(显示在歌单界面的第一个下拉标签菜单中)</li>\n<li>恢复QQ音乐源128k音质试听</li>\n<li>新增不强制win7开启透明效果即可使用但要配置运行参数<code>-nt</code>,例如:<code>.\\lx-music-desktop.exe -nt</code>,添加方法可自行百度“给快捷方式加参数”</li>\n<li>新增“新年快乐”主题,可自行切换体验</li>\n</ul>\n<h3>优化</h3>\n<ul>\n<li>减淡各个主题的歌曲列表分隔线颜色</li>\n<li>在线音乐列表音质标签优化,当歌曲有无损音质时隐藏高品质标签</li>\n<li>更新改进的歌词播放插件,现在歌词的播放显示将更准确</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复咪咕源无法搜索的问题</li>\n<li>修复更新弹窗底部文字颜色没有适配当前主题颜色的问题</li>\n<li>修复导入设置窗口大小、代理设置不立即生效的问题</li>\n<li>修复在线音乐列表获取失败时无限循环请求的问题</li>\n</ul>\n<h3>其他</h3>\n<ul>\n<li>将软件设置与播放列表分离存储成两个文件</li>\n<li>更新 Electron 到 7.1.9</li>\n</ul>\n"
},
{
"version": "0.13.1",
"desc": "<h3>修复</h3>\n<ul>\n<li>修复全局更新弹窗无法遮盖搜索框的问题</li>\n</ul>\n<h3>其他</h3>\n<ul>\n<li>由于electron 7.1.3 - 7.1.5 的自动更新功能存在Bug现降级到7.1.2</li>\n</ul>\n"

View File

@@ -1,25 +1,39 @@
module.exports = {
windowSizeList: [
{
id: 0,
name: 'smaller',
width: 828,
height: 530,
fontSize: '14px',
},
{
id: 1,
name: '',
name: 'small',
width: 920,
height: 590,
tabList: '645px',
fontSize: '16px',
},
{
id: 2,
name: '',
name: 'medium',
width: 1012,
height: 650,
tabList: '719px',
fontSize: '16px',
},
{
id: 3,
name: '',
name: 'big',
width: 1104,
height: 708,
tabList: '792px',
fontSize: '17px',
},
{
id: 4,
name: 'larger',
width: 1198,
height: 766,
fontSize: '18px',
},
],
}

View File

@@ -0,0 +1,13 @@
module.exports = mainWindow => {
mainWindow.on('close', () => {
mainWindow.setProgressBar(-1)
})
mainWindow.on('closed', () => {
mainWindow = global.mainWindow = null
})
// mainWindow.on('restore', () => {
// mainWindow.webContents.send('restore')
// })
}

View File

@@ -15,21 +15,21 @@ app.on('second-instance', (event, argv, cwd) => {
}
})
const isDev = process.env.NODE_ENV !== 'production'
// https://github.com/electron/electron/issues/18397
app.allowRendererProcessReuse = !isDev
const { getWindowSizeInfo, parseEnv } = require('./utils')
global.envParams = parseEnv()
require('../common/error')
require('./events')
const winEvent = require('./events/winEvent')
const autoUpdate = require('./utils/autoUpdate')
const { isLinux, isMac } = require('../common/utils')
const isDev = process.env.NODE_ENV !== 'production'
/**
* Set `__static` path to static files in production
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html
*/
let mainWindow
let winURL
@@ -68,13 +68,7 @@ function createWindow() {
mainWindow.loadURL(winURL)
mainWindow.on('close', () => {
mainWindow.setProgressBar(-1)
})
mainWindow.on('closed', () => {
mainWindow = global.mainWindow = null
})
winEvent(mainWindow)
// mainWindow.webContents.openDevTools()
if (!isDev) {

View File

@@ -88,7 +88,7 @@ module.exports = isFirstCheckedUpdate => {
})
autoUpdater.on('update-not-available', info => {
sendStatusToWindow('Update not available.')
handleSendEvent({ type: 'update-not-available' })
handleSendEvent({ type: 'update-not-available', info })
})
autoUpdater.on('error', err => {
sendStatusToWindow('Error in auto-updater.')

View File

@@ -47,12 +47,15 @@ export default {
}
},
computed: {
...mapGetters(['setting', 'theme', 'version']),
...mapGetters(['setting', 'theme', 'version', 'windowSizeActive']),
...mapGetters('list', ['defaultList', 'loveList']),
...mapGetters('download', {
downloadList: 'list',
downloadStatus: 'downloadStatus',
}),
...mapGetters('search', {
searchHistoryList: 'historyList',
}),
},
created() {
this.saveSetting = throttle(n => {
@@ -67,6 +70,9 @@ export default {
this.saveDownloadList = throttle(n => {
window.electronStore_list.set('downloadList', n)
}, 1000)
this.saveSearchHistoryList = throttle(n => {
window.electronStore_data.set('searchHistoryList', n)
}, 1000)
},
mounted() {
document.body.classList.add(this.isNt ? 'noTransparent' : 'transparent')
@@ -97,6 +103,9 @@ export default {
},
deep: true,
},
searchHistoryList(n) {
this.saveSearchHistoryList(n)
},
'globalObj.apiSource'(n) {
if (n != this.setting.apiSource) {
this.setSetting(Object.assign({}, this.setting, {
@@ -104,6 +113,9 @@ export default {
}))
}
},
'windowSizeActive.fontSize'(n) {
document.documentElement.style.fontSize = n
},
},
methods: {
...mapActions(['getVersionInfo']),
@@ -112,18 +124,10 @@ export default {
...mapMutations('download', ['updateDownloadList']),
...mapMutations(['setSetting']),
init() {
rendererInvoke('getEnvParams').then(envParams => {
this.envParams = envParams
this.isNt = isLinux || this.envParams.nt
if (this.isNt) {
document.body.classList.remove('transparent')
document.body.classList.add('noTransparent')
}
if (this.isProd && !this.isNt) {
document.body.addEventListener('mouseenter', this.dieableIgnoreMouseEvents)
document.body.addEventListener('mouseleave', this.enableIgnoreMouseEvents)
}
})
document.documentElement.style.fontSize = this.windowSizeActive.fontSize
rendererInvoke('getEnvParams').then(this.handleEnvParamsInit)
document.body.addEventListener('click', this.handleBodyClick, true)
rendererOn('update-available', (e, info) => {
// this.showUpdateModal(true)
@@ -160,11 +164,13 @@ export default {
this.showUpdateModal()
})
})
rendererOn('update-not-available', () => {
rendererOn('update-not-available', (e, info) => {
this.clearUpdateTimeout()
this.setNewVersion({
version: this.version.version,
version: info.version,
desc: info.releaseNotes,
})
this.setVersionModalVisible({ isLatestVer: true })
})
// 更新超时定时器
this.updateTimeout = setTimeout(() => {
@@ -184,12 +190,12 @@ export default {
music.init()
},
enableIgnoreMouseEvents() {
if (!this.isNt) return
if (this.isNt) return
rendererSend('setIgnoreMouseEvents', false)
// console.log('content enable')
},
dieableIgnoreMouseEvents() {
if (!this.isNt) return
if (this.isNt) return
// console.log('content disable')
rendererSend('setIgnoreMouseEvents', true)
},
@@ -204,7 +210,7 @@ export default {
this.initList({ defaultList, loveList })
},
initDownloadList() {
let downloadList = window.electronStore_list.get('download.list')
let downloadList = window.electronStore_list.get('downloadList')
if (downloadList) {
downloadList.forEach(item => {
if (item.status == this.downloadStatus.RUN || item.status == this.downloadStatus.WAITING) {
@@ -216,10 +222,13 @@ export default {
}
},
showUpdateModal() {
(this.version.newVersion && this.version.newVersion.history ? Promise.resolve(this.version.newVersion) : this.getVersionInfo().then(body => {
this.setNewVersion(body)
return body
})).catch(() => {
(this.version.newVersion && this.version.newVersion.history
? Promise.resolve(this.version.newVersion)
: this.getVersionInfo().then(body => {
this.setNewVersion(body)
return body
})
).catch(() => {
if (this.version.newVersion) return this.version.newVersion
this.setVersionModalVisible({ isUnknow: true })
let result = {
@@ -229,7 +238,14 @@ export default {
this.setNewVersion(result)
return result
}).then(result => {
if (result.version === this.version.version || result.version === this.setting.ignoreVersion) return
let newVer = result.version.replace(/\./g, '')
let currentVer = this.version.version.replace(/\./g, '')
let len = Math.max(newVer.length, currentVer.length)
newVer.padStart(len, '0')
currentVer.padStart(len, '0')
if (parseInt(newVer) <= parseInt(currentVer)) return this.setVersionModalVisible({ isLatestVer: true })
if (result.version === this.setting.ignoreVersion) return
// console.log(this.version)
this.$nextTick(() => {
this.setVersionModalVisible({ isShow: true })
@@ -247,6 +263,27 @@ export default {
event.preventDefault()
if (/^https?:\/\//.test(event.target.href)) openUrl(event.target.href)
},
handleEnvParamsInit(envParams) {
this.envParams = envParams
this.isNt = isLinux || this.envParams.nt
if (this.isNt) {
document.body.classList.remove('transparent')
document.body.classList.add('noTransparent')
}
if (this.isProd && !this.isNt) {
document.body.addEventListener('mouseenter', this.dieableIgnoreMouseEvents)
document.body.addEventListener('mouseleave', this.enableIgnoreMouseEvents)
}
if (this.envParams.search != null) {
this.$router.push({
path: 'search',
query: {
text: this.envParams.search,
},
})
}
},
},
beforeDestroy() {
this.clearUpdateTimeout()

View File

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 181 KiB

View File

@@ -4,6 +4,10 @@
-webkit-user-drag: none;
}
html {
font-size: 16px;
}
.nobreak {
white-space: nowrap;
}
@@ -20,6 +24,13 @@
word-break: break-all;
}
.select {
user-select: text;
}
.no-select {
user-select: none;
}
table {
width: 100%;
border-spacing: 0;
@@ -46,11 +57,11 @@ table {
border-top: none;
}
td {
padding: 5px;
padding: 6px;
position: relative;
transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
font-size: 13px;
line-height: 1.3;
line-height: 18px;
vertical-align: middle;
}
}
@@ -129,6 +140,10 @@ input, textarea {
color: @color-theme_2-font-label;
}
}
::selection {
color: @color-theme_2;
background: @color-btn;
}
.hover, a {
cursor: pointer;
@@ -142,6 +157,7 @@ input, textarea {
}
.scroll {
overflow: auto;
&::-webkit-scrollbar {
width: 6px;
height: 6px;
@@ -206,7 +222,11 @@ each(@themes, {
color: ~'@{color-@{value}-theme_2-font-label}';
}
}
::selection {
color: ~'@{color-@{value}-theme_2}';
background: ~'@{color-@{value}-btn}';
}
.badge {
&.badge-theme-success {
color: ~'@{color-@{value}-badge-success-font}';

View File

@@ -1,6 +1,6 @@
@import './colors.less';
@themes: green, yellow, blue, red, purple, orange, grey, midAutumn, dhHyrz, happyNewYear;
@themes: green, yellow, blue, red, purple, orange, grey, mid_autumn, naruto, happy_new_year;
// Colors
@@ -61,7 +61,7 @@
@color-green-badge-success-font: #fff;
@color-green-badge-info: #4baed5;
@color-green-badge-info-font: #fff;
@color-badge-success: #32bc63;
@color-badge-success: @color-theme;
@color-badge-success-font: #fff;
@color-badge-info: #4baed5;
@color-badge-info-font: #fff;
@@ -111,9 +111,9 @@
@color-green-minBtn-hover: fadeout(@color-green-minBtn, 10%);
@color-green-maxBtn-hover: fadeout(@color-green-maxBtn, 10%);
@color-green-closeBtn-hover: fadeout(@color-green-closeBtn, 10%);
@color-green-badge-success: #32bc63;
@color-green-badge-success: lighten(@color-green-theme, 7%);
@color-green-badge-success-font: #fff;
@color-green-badge-info: #4baed5;
@color-green-badge-info: #66a2bd;
@color-green-badge-info-font: #fff;
@@ -161,9 +161,9 @@
@color-yellow-minBtn-hover: fadeout(@color-yellow-minBtn, 10%);
@color-yellow-maxBtn-hover: fadeout(@color-yellow-maxBtn, 10%);
@color-yellow-closeBtn-hover: fadeout(@color-yellow-closeBtn, 10%);
@color-yellow-badge-success: #32bc63;
@color-yellow-badge-success: lighten(@color-yellow-theme, 10%);
@color-yellow-badge-success-font: #fff;
@color-yellow-badge-info: #4baed5;
@color-yellow-badge-info: #7cd295;
@color-yellow-badge-info-font: #fff;
@color-orange-theme: #f5ab35;
@@ -210,9 +210,9 @@
@color-orange-minBtn-hover: fadeout(@color-orange-minBtn, 10%);
@color-orange-maxBtn-hover: fadeout(@color-orange-maxBtn, 10%);
@color-orange-closeBtn-hover: fadeout(@color-orange-closeBtn, 10%);
@color-orange-badge-success: #32bc63;
@color-orange-badge-success: lighten(@color-orange-theme, 10%);
@color-orange-badge-success-font: #fff;
@color-orange-badge-info: #4baed5;
@color-orange-badge-info: #9ed458;
@color-orange-badge-info-font: #fff;
@color-blue-theme: #3498db;
@@ -259,9 +259,9 @@
@color-blue-minBtn-hover: fadeout(@color-blue-minBtn, 10%);
@color-blue-maxBtn-hover: fadeout(@color-blue-maxBtn, 10%);
@color-blue-closeBtn-hover: fadeout(@color-blue-closeBtn, 10%);
@color-blue-badge-success: #32bc63;
@color-blue-badge-success: #5cbf9b;
@color-blue-badge-success-font: #fff;
@color-blue-badge-info: #4baed5;
@color-blue-badge-info: lighten(@color-blue-theme, 10%);
@color-blue-badge-info-font: #fff;
@color-red-theme: #d64541;
@@ -310,9 +310,9 @@
@color-red-minBtn-hover: fadeout(@color-red-minBtn, 10%);
@color-red-maxBtn-hover: fadeout(@color-red-maxBtn, 10%);
@color-red-closeBtn-hover: fadeout(@color-red-closeBtn, 10%);
@color-red-badge-success: #32bc63;
@color-red-badge-success: lighten(@color-red-theme, 10%);
@color-red-badge-success-font: #fff;
@color-red-badge-info: #4baed5;
@color-red-badge-info: #dfbb6b;
@color-red-badge-info-font: #fff;
@color-purple-theme: #9b59b6;
@@ -359,9 +359,9 @@
@color-purple-minBtn-hover: fadeout(@color-purple-minBtn, 10%);
@color-purple-maxBtn-hover: fadeout(@color-purple-maxBtn, 10%);
@color-purple-closeBtn-hover: fadeout(@color-purple-closeBtn, 10%);
@color-purple-badge-success: #32bc63;
@color-purple-badge-success: lighten(@color-purple-theme, 15%);
@color-purple-badge-success-font: #fff;
@color-purple-badge-info: #4baed5;
@color-purple-badge-info: #e5a39f;
@color-purple-badge-info-font: #fff;
@color-grey-theme: #6c7a89;
@@ -408,157 +408,157 @@
@color-grey-minBtn-hover: fadeout(@color-grey-minBtn, 10%);
@color-grey-maxBtn-hover: fadeout(@color-grey-maxBtn, 10%);
@color-grey-closeBtn-hover: fadeout(@color-grey-closeBtn, 10%);
@color-grey-badge-success: #32bc63;
@color-grey-badge-success: lighten(@color-grey-theme, 15%);
@color-grey-badge-success-font: #fff;
@color-grey-badge-info: #4baed5;
@color-grey-badge-info: #b19b9f;
@color-grey-badge-info-font: #fff;
@color-midAutumn-theme: rgba(74, 55, 82, 1);
@color-midAutumn-theme-bgimg: url(../images/jqbg.jpg);
@color-midAutumn-theme-bgposition: center;
@color-midAutumn-theme-bgsize: auto 100%;
@color-midAutumn-theme-hover: fadeout(lighten(@color-midAutumn-theme, 10%), 30%);
@color-midAutumn-theme-active: fadeout(lighten(@color-midAutumn-theme, 15%), 60%);
@color-midAutumn-theme-font: rgba(246, 233, 255, 0.9);
@color-midAutumn-theme-font-label: fadeout(lighten(@color-midAutumn-theme, 20%), 20%);
@color-midAutumn-theme_2: rgba(255, 255, 255, .93);
@color-midAutumn-theme_2-background_1: #eeedef;
@color-midAutumn-theme_2-background_2: fadeout(@color-midAutumn-theme_2-background_1, 2%);
@color-midAutumn-theme_2-hover: fadeout(lighten(@color-midAutumn-theme, 10%), 65%);
@color-midAutumn-theme_2-active: fadeout(darken(@color-midAutumn-theme, 5%), 70%);
@color-midAutumn-theme_2-font: darken(@color-midAutumn-theme_2, 70%);
@color-midAutumn-theme_2-font-label: desaturate(lighten(@color-midAutumn-theme, 30%), 45%);
@color-midAutumn-theme_2-line: lighten(@color-midAutumn-theme, 63%);
@color-midAutumn-theme-sidebar: rgba(255, 255, 255, 0);
@color-midAutumn-btn: fadeout(darken(@color-midAutumn-theme, 5%), 27%);
@color-midAutumn-btn-background: fadeout(lighten(@color-midAutumn-theme, 35%), 70%);
@color-midAutumn-pagination-background: fadeout(lighten(@color-midAutumn-theme, 45%), 50%);
@color-midAutumn-pagination-hover: fadeout(lighten(@color-midAutumn-theme, 10%), 70%);
@color-midAutumn-pagination-active: fadeout(darken(@color-midAutumn-theme, 10%), 70%);
@color-midAutumn-pagination-select: fadeout(lighten(@color-midAutumn-theme, 10%), 55%);
@color-midAutumn-search-form-background: fadeout(lighten(@color-midAutumn-theme, 50%), 10%);
@color-midAutumn-search-list-hover: fadeout(darken(@color-midAutumn-theme, 10%), 70%);
@color-midAutumn-scrollbar-track: fadeout(@color-midAutumn-theme, 80%);
@color-midAutumn-scrollbar-thumb: fadeout(@color-midAutumn-theme, 60%);
@color-midAutumn-scrollbar-thumb-hover: fadeout(@color-midAutumn-theme, 40%);
@color-midAutumn-player-pic-c1: fadeout(@color-midAutumn-theme_2, 50%);
@color-midAutumn-player-pic-c2: darken(@color-midAutumn-theme_2, 30%);
@color-midAutumn-player-progress: darken(@color-midAutumn-theme_2, 10%);
@color-midAutumn-player-progress-bar1: darken(@color-midAutumn-theme_2, 12%);
@color-midAutumn-player-progress-bar2: lighten(@color-midAutumn-theme, 12%);
@color-midAutumn-player-status-text: lighten(@color-midAutumn-theme_2-font, 10%);
@color-midAutumn-tab-btn-background: fadeout(lighten(@color-midAutumn-theme, 10%), 80%);
@color-midAutumn-tab-btn-background-hover: @color-midAutumn-theme_2-hover;
@color-midAutumn-tab-border-top: fadeout(lighten(@color-midAutumn-theme, 5%), 50%);
@color-midAutumn-tab-border-bottom: lighten(@color-midAutumn-theme, 5%);
@color-midAutumn-minBtn: #85c43b;
@color-midAutumn-maxBtn: #e7aa36;
@color-midAutumn-closeBtn: #ea6e4d;
@color-midAutumn-minBtn-hover: fadeout(@color-midAutumn-minBtn, 10%);
@color-midAutumn-maxBtn-hover: fadeout(@color-midAutumn-maxBtn, 10%);
@color-midAutumn-closeBtn-hover: fadeout(@color-midAutumn-closeBtn, 10%);
@color-midAutumn-badge-success: #32bc63;
@color-midAutumn-badge-success-font: #fff;
@color-midAutumn-badge-info: #4baed5;
@color-midAutumn-badge-info-font: #fff;
@color-mid_autumn-theme: rgba(74, 55, 82, 1);
@color-mid_autumn-theme-bgimg: url(../images/jqbg.jpg);
@color-mid_autumn-theme-bgposition: center;
@color-mid_autumn-theme-bgsize: auto 100%;
@color-mid_autumn-theme-hover: fadeout(lighten(@color-mid_autumn-theme, 10%), 40%);
@color-mid_autumn-theme-active: fadeout(lighten(@color-mid_autumn-theme, 15%), 60%);
@color-mid_autumn-theme-font: rgba(246, 233, 255, 0.9);
@color-mid_autumn-theme-font-label: fadeout(lighten(@color-mid_autumn-theme, 20%), 20%);
@color-mid_autumn-theme_2: rgba(255, 255, 255, .93);
@color-mid_autumn-theme_2-background_1: #eeedef;
@color-mid_autumn-theme_2-background_2: fadeout(@color-mid_autumn-theme_2-background_1, 2%);
@color-mid_autumn-theme_2-hover: fadeout(lighten(@color-mid_autumn-theme, 10%), 65%);
@color-mid_autumn-theme_2-active: fadeout(darken(@color-mid_autumn-theme, 5%), 70%);
@color-mid_autumn-theme_2-font: darken(@color-mid_autumn-theme_2, 70%);
@color-mid_autumn-theme_2-font-label: desaturate(lighten(@color-mid_autumn-theme, 30%), 45%);
@color-mid_autumn-theme_2-line: lighten(@color-mid_autumn-theme, 63%);
@color-mid_autumn-theme-sidebar: rgba(255, 255, 255, 0);
@color-mid_autumn-btn: fadeout(darken(@color-mid_autumn-theme, 5%), 27%);
@color-mid_autumn-btn-background: fadeout(lighten(@color-mid_autumn-theme, 35%), 70%);
@color-mid_autumn-pagination-background: fadeout(lighten(@color-mid_autumn-theme, 45%), 50%);
@color-mid_autumn-pagination-hover: fadeout(lighten(@color-mid_autumn-theme, 10%), 70%);
@color-mid_autumn-pagination-active: fadeout(darken(@color-mid_autumn-theme, 10%), 70%);
@color-mid_autumn-pagination-select: fadeout(lighten(@color-mid_autumn-theme, 10%), 55%);
@color-mid_autumn-search-form-background: fadeout(lighten(@color-mid_autumn-theme, 50%), 10%);
@color-mid_autumn-search-list-hover: fadeout(darken(@color-mid_autumn-theme, 10%), 70%);
@color-mid_autumn-scrollbar-track: fadeout(@color-mid_autumn-theme, 80%);
@color-mid_autumn-scrollbar-thumb: fadeout(@color-mid_autumn-theme, 60%);
@color-mid_autumn-scrollbar-thumb-hover: fadeout(@color-mid_autumn-theme, 40%);
@color-mid_autumn-player-pic-c1: fadeout(@color-mid_autumn-theme_2, 50%);
@color-mid_autumn-player-pic-c2: darken(@color-mid_autumn-theme_2, 30%);
@color-mid_autumn-player-progress: darken(@color-mid_autumn-theme_2, 10%);
@color-mid_autumn-player-progress-bar1: darken(@color-mid_autumn-theme_2, 12%);
@color-mid_autumn-player-progress-bar2: lighten(@color-mid_autumn-theme, 12%);
@color-mid_autumn-player-status-text: lighten(@color-mid_autumn-theme_2-font, 10%);
@color-mid_autumn-tab-btn-background: fadeout(lighten(@color-mid_autumn-theme, 10%), 80%);
@color-mid_autumn-tab-btn-background-hover: @color-mid_autumn-theme_2-hover;
@color-mid_autumn-tab-border-top: fadeout(lighten(@color-mid_autumn-theme, 5%), 50%);
@color-mid_autumn-tab-border-bottom: lighten(@color-mid_autumn-theme, 5%);
@color-mid_autumn-minBtn: #85c43b;
@color-mid_autumn-maxBtn: #e7aa36;
@color-mid_autumn-closeBtn: #ea6e4d;
@color-mid_autumn-minBtn-hover: fadeout(@color-mid_autumn-minBtn, 10%);
@color-mid_autumn-maxBtn-hover: fadeout(@color-mid_autumn-maxBtn, 10%);
@color-mid_autumn-closeBtn-hover: fadeout(@color-mid_autumn-closeBtn, 10%);
@color-mid_autumn-badge-success: lighten(@color-mid_autumn-theme, 25%);
@color-mid_autumn-badge-success-font: #fff;
@color-mid_autumn-badge-info: #af9479;
@color-mid_autumn-badge-info-font: #fff;
@color-dhHyrz-theme: rgb(87, 144, 167);
@color-dhHyrz-theme-bgimg: url(../images/hzwbg.jpeg);
@color-dhHyrz-theme-bgposition: center;
@color-dhHyrz-theme-bgsize: auto 100%;
@color-dhHyrz-theme-hover: fadeout(lighten(@color-dhHyrz-theme, 10%), 45%);
@color-dhHyrz-theme-active: fadeout(lighten(@color-dhHyrz-theme, 15%), 60%);
@color-dhHyrz-theme-font: rgba(67, 118, 148, 0.9);
@color-dhHyrz-theme-font-label: fadeout(darken(@color-dhHyrz-theme, 20%), 20%);
@color-dhHyrz-theme_2: rgba(255, 255, 255, 0.8);
@color-dhHyrz-theme_2-background_1: #e9faff;
@color-dhHyrz-theme_2-background_2: fadeout(@color-dhHyrz-theme_2-background_1, 2%);
@color-dhHyrz-theme_2-hover: fadeout(lighten(@color-dhHyrz-theme, 10%), 65%);
@color-dhHyrz-theme_2-active: fadeout(darken(@color-dhHyrz-theme, 5%), 70%);
@color-dhHyrz-theme_2-font: darken(@color-dhHyrz-theme_2, 80%);
@color-dhHyrz-theme_2-font-label: desaturate(lighten(@color-dhHyrz-theme, 10%), 45%);
@color-dhHyrz-theme_2-line: fadeout(lighten(@color-dhHyrz-theme, 36%), 70%);
@color-dhHyrz-theme-sidebar: rgba(255, 255, 255, .3);
@color-dhHyrz-btn: fadeout(darken(@color-dhHyrz-theme, 5%), 15%);
@color-dhHyrz-btn-background: fadeout(lighten(@color-dhHyrz-theme, 35%), 70%);
@color-dhHyrz-pagination-background: fadeout(lighten(@color-dhHyrz-theme, 45%), 50%);
@color-dhHyrz-pagination-hover: fadeout(lighten(@color-dhHyrz-theme, 10%), 70%);
@color-dhHyrz-pagination-active: fadeout(darken(@color-dhHyrz-theme, 10%), 70%);
@color-dhHyrz-pagination-select: fadeout(lighten(@color-dhHyrz-theme, 10%), 55%);
@color-dhHyrz-search-form-background: fadeout(lighten(@color-dhHyrz-theme, 30%), 20%);
@color-dhHyrz-search-list-hover: fadeout(darken(@color-dhHyrz-theme, 10%), 50%);
@color-dhHyrz-scrollbar-track: fadeout(@color-dhHyrz-theme, 80%);
@color-dhHyrz-scrollbar-thumb: fadeout(@color-dhHyrz-theme, 60%);
@color-dhHyrz-scrollbar-thumb-hover: fadeout(@color-dhHyrz-theme, 40%);
@color-dhHyrz-player-pic-c1: fadeout(@color-dhHyrz-theme_2, 50%);
@color-dhHyrz-player-pic-c2: darken(@color-dhHyrz-theme_2, 30%);
@color-dhHyrz-player-progress: darken(@color-dhHyrz-theme_2, 10%);
@color-dhHyrz-player-progress-bar1: darken(@color-dhHyrz-theme_2, 12%);
@color-dhHyrz-player-progress-bar2: lighten(@color-dhHyrz-theme, 12%);
@color-dhHyrz-player-status-text: lighten(@color-dhHyrz-theme_2-font, 10%);
@color-dhHyrz-tab-btn-background: fadeout(lighten(@color-dhHyrz-theme, 10%), 80%);
@color-dhHyrz-tab-btn-background-hover: @color-dhHyrz-theme_2-hover;
@color-dhHyrz-tab-border-top: fadeout(lighten(@color-dhHyrz-theme, 5%), 50%);
@color-dhHyrz-tab-border-bottom: lighten(@color-dhHyrz-theme, 5%);
@color-dhHyrz-minBtn: #85c43b;
@color-dhHyrz-maxBtn: #e7aa36;
@color-dhHyrz-closeBtn: #ea6e4d;
@color-dhHyrz-minBtn-hover: fadeout(@color-dhHyrz-minBtn, 10%);
@color-dhHyrz-maxBtn-hover: fadeout(@color-dhHyrz-maxBtn, 10%);
@color-dhHyrz-closeBtn-hover: fadeout(@color-dhHyrz-closeBtn, 10%);
@color-dhHyrz-badge-success: #32bc63;
@color-dhHyrz-badge-success-font: #fff;
@color-dhHyrz-badge-info: #4baed5;
@color-dhHyrz-badge-info-font: #fff;
@color-naruto-theme: rgb(87, 144, 167);
@color-naruto-theme-bgimg: url(../images/myzcbg.jpeg);
@color-naruto-theme-bgposition: center;
@color-naruto-theme-bgsize: auto 100%;
@color-naruto-theme-hover: fadeout(lighten(@color-naruto-theme, 10%), 45%);
@color-naruto-theme-active: fadeout(lighten(@color-naruto-theme, 15%), 60%);
@color-naruto-theme-font: rgba(67, 118, 148, 0.9);
@color-naruto-theme-font-label: fadeout(darken(@color-naruto-theme, 20%), 20%);
@color-naruto-theme_2: rgba(255, 255, 255, 0.8);
@color-naruto-theme_2-background_1: #e9faff;
@color-naruto-theme_2-background_2: fadeout(@color-naruto-theme_2-background_1, 2%);
@color-naruto-theme_2-hover: fadeout(lighten(@color-naruto-theme, 10%), 65%);
@color-naruto-theme_2-active: fadeout(darken(@color-naruto-theme, 5%), 70%);
@color-naruto-theme_2-font: darken(@color-naruto-theme_2, 80%);
@color-naruto-theme_2-font-label: desaturate(lighten(@color-naruto-theme, 10%), 45%);
@color-naruto-theme_2-line: fadeout(lighten(@color-naruto-theme, 36%), 70%);
@color-naruto-theme-sidebar: rgba(255, 255, 255, .3);
@color-naruto-btn: fadeout(darken(@color-naruto-theme, 5%), 15%);
@color-naruto-btn-background: fadeout(lighten(@color-naruto-theme, 35%), 70%);
@color-naruto-pagination-background: fadeout(lighten(@color-naruto-theme, 20%), 70%);
@color-naruto-pagination-hover: fadeout(lighten(@color-naruto-theme, 10%), 60%);
@color-naruto-pagination-active: fadeout(darken(@color-naruto-theme, 10%), 70%);
@color-naruto-pagination-select: fadeout(lighten(@color-naruto-theme, 10%), 50%);
@color-naruto-search-form-background: fadeout(lighten(@color-naruto-theme, 30%), 20%);
@color-naruto-search-list-hover: fadeout(darken(@color-naruto-theme, 10%), 50%);
@color-naruto-scrollbar-track: fadeout(@color-naruto-theme, 80%);
@color-naruto-scrollbar-thumb: fadeout(@color-naruto-theme, 60%);
@color-naruto-scrollbar-thumb-hover: fadeout(@color-naruto-theme, 40%);
@color-naruto-player-pic-c1: fadeout(@color-naruto-theme_2, 50%);
@color-naruto-player-pic-c2: darken(@color-naruto-theme_2, 30%);
@color-naruto-player-progress: darken(@color-naruto-theme_2, 10%);
@color-naruto-player-progress-bar1: darken(@color-naruto-theme_2, 12%);
@color-naruto-player-progress-bar2: lighten(@color-naruto-theme, 12%);
@color-naruto-player-status-text: lighten(@color-naruto-theme_2-font, 10%);
@color-naruto-tab-btn-background: fadeout(lighten(@color-naruto-theme, 10%), 80%);
@color-naruto-tab-btn-background-hover: @color-naruto-theme_2-hover;
@color-naruto-tab-border-top: fadeout(lighten(@color-naruto-theme, 5%), 50%);
@color-naruto-tab-border-bottom: lighten(@color-naruto-theme, 5%);
@color-naruto-minBtn: #85c43b;
@color-naruto-maxBtn: #e7aa36;
@color-naruto-closeBtn: #ea6e4d;
@color-naruto-minBtn-hover: fadeout(@color-naruto-minBtn, 10%);
@color-naruto-maxBtn-hover: fadeout(@color-naruto-maxBtn, 10%);
@color-naruto-closeBtn-hover: fadeout(@color-naruto-closeBtn, 10%);
@color-naruto-badge-success: #7fb575;
@color-naruto-badge-success-font: #fff;
@color-naruto-badge-info: lighten(@color-naruto-theme, 10%);
@color-naruto-badge-info-font: #fff;
@color-happyNewYear-theme: rgb(252, 57, 57);
@color-happyNewYear-theme-bgimg: url(../images/xnkl.jpg);
@color-happyNewYear-theme-bgposition: center;
@color-happyNewYear-theme-bgsize: auto 100%;
@color-happyNewYear-theme-hover: fadeout(lighten(@color-happyNewYear-theme, 10%), 45%);
@color-happyNewYear-theme-active: fadeout(lighten(@color-happyNewYear-theme, 15%), 60%);
@color-happyNewYear-theme-font: rgba(255, 255, 255, 0.9);
@color-happyNewYear-theme-font-label: fadeout(lighten(@color-happyNewYear-theme, 20%), 20%);
@color-happyNewYear-theme_2: rgba(255, 199, 199, 0.8);
@color-happyNewYear-theme_2-background_1: #f2a4a4;
@color-happyNewYear-theme_2-background_2: fadeout(@color-happyNewYear-theme_2-background_1, 2%);
@color-happyNewYear-theme_2-hover: fadeout(lighten(@color-happyNewYear-theme, 10%), 55%);
@color-happyNewYear-theme_2-active: fadeout(darken(@color-happyNewYear-theme, 5%), 70%);
@color-happyNewYear-theme_2-font: darken(@color-happyNewYear-theme_2, 90%);
@color-happyNewYear-theme_2-font-label: desaturate(darken(@color-happyNewYear-theme, 5%), 50%);
@color-happyNewYear-theme_2-line: fadeout(lighten(@color-happyNewYear-theme, 16%), 70%);
@color-happyNewYear-theme-sidebar: rgba(119, 37, 18, 0.1);
@color-happyNewYear-btn: fadeout(darken(@color-happyNewYear-theme, 5%), 15%);
@color-happyNewYear-btn-background: fadeout(lighten(@color-happyNewYear-theme, 15%), 60%);
@color-happyNewYear-pagination-background: fadeout(lighten(@color-happyNewYear-theme, 15%), 40%);
@color-happyNewYear-pagination-hover: fadeout(lighten(@color-happyNewYear-theme, 10%), 70%);
@color-happyNewYear-pagination-active: fadeout(darken(@color-happyNewYear-theme, 10%), 70%);
@color-happyNewYear-pagination-select: fadeout(lighten(@color-happyNewYear-theme, 10%), 55%);
@color-happyNewYear-search-form-background: fadeout(lighten(@color-happyNewYear-theme, 15%), 20%);
@color-happyNewYear-search-list-hover: fadeout(darken(@color-happyNewYear-theme, 10%), 50%);
@color-happyNewYear-scrollbar-track: fadeout(@color-happyNewYear-theme, 80%);
@color-happyNewYear-scrollbar-thumb: fadeout(@color-happyNewYear-theme, 60%);
@color-happyNewYear-scrollbar-thumb-hover: fadeout(@color-happyNewYear-theme, 40%);
@color-happyNewYear-player-pic-c1: fadeout(@color-happyNewYear-theme_2, 50%);
@color-happyNewYear-player-pic-c2: darken(@color-happyNewYear-theme_2, 30%);
@color-happyNewYear-player-progress: darken(@color-happyNewYear-theme_2, 10%);
@color-happyNewYear-player-progress-bar1: darken(@color-happyNewYear-theme_2, 12%);
@color-happyNewYear-player-progress-bar2: lighten(@color-happyNewYear-theme, 9%);
@color-happyNewYear-player-status-text: lighten(@color-happyNewYear-theme_2-font, 10%);
@color-happyNewYear-tab-btn-background: fadeout(lighten(@color-happyNewYear-theme, 10%), 80%);
@color-happyNewYear-tab-btn-background-hover: @color-happyNewYear-theme_2-hover;
@color-happyNewYear-tab-border-top: fadeout(lighten(@color-happyNewYear-theme, 5%), 50%);
@color-happyNewYear-tab-border-bottom: lighten(@color-happyNewYear-theme, 5%);
@color-happyNewYear-minBtn: #c4943b;
@color-happyNewYear-maxBtn: #e7aa36;
@color-happyNewYear-closeBtn: #ea6e4d;
@color-happyNewYear-minBtn-hover: fadeout(@color-happyNewYear-minBtn, 10%);
@color-happyNewYear-maxBtn-hover: fadeout(@color-happyNewYear-maxBtn, 10%);
@color-happyNewYear-closeBtn-hover: fadeout(@color-happyNewYear-closeBtn, 10%);
@color-happyNewYear-badge-success: @color-happyNewYear-theme;
@color-happyNewYear-badge-success-font: #fff;
@color-happyNewYear-badge-info: #c4943b;
@color-happyNewYear-badge-info-font: #fff;
@color-happy_new_year-theme: rgb(252, 57, 57);
@color-happy_new_year-theme-bgimg: url(../images/xnkl.jpg);
@color-happy_new_year-theme-bgposition: center;
@color-happy_new_year-theme-bgsize: auto 100%;
@color-happy_new_year-theme-hover: fadeout(lighten(@color-happy_new_year-theme, 10%), 45%);
@color-happy_new_year-theme-active: fadeout(lighten(@color-happy_new_year-theme, 15%), 60%);
@color-happy_new_year-theme-font: rgba(255, 255, 255, 0.9);
@color-happy_new_year-theme-font-label: fadeout(lighten(@color-happy_new_year-theme, 20%), 20%);
@color-happy_new_year-theme_2: rgba(255, 199, 199, 0.8);
@color-happy_new_year-theme_2-background_1: #f2a4a4;
@color-happy_new_year-theme_2-background_2: fadeout(@color-happy_new_year-theme_2-background_1, 2%);
@color-happy_new_year-theme_2-hover: fadeout(lighten(@color-happy_new_year-theme, 10%), 55%);
@color-happy_new_year-theme_2-active: fadeout(darken(@color-happy_new_year-theme, 5%), 70%);
@color-happy_new_year-theme_2-font: darken(@color-happy_new_year-theme_2, 90%);
@color-happy_new_year-theme_2-font-label: desaturate(darken(@color-happy_new_year-theme, 5%), 50%);
@color-happy_new_year-theme_2-line: fadeout(lighten(@color-happy_new_year-theme, 16%), 70%);
@color-happy_new_year-theme-sidebar: rgba(119, 37, 18, 0.1);
@color-happy_new_year-btn: fadeout(darken(@color-happy_new_year-theme, 5%), 15%);
@color-happy_new_year-btn-background: fadeout(lighten(@color-happy_new_year-theme, 15%), 60%);
@color-happy_new_year-pagination-background: fadeout(lighten(@color-happy_new_year-theme, 15%), 40%);
@color-happy_new_year-pagination-hover: fadeout(lighten(@color-happy_new_year-theme, 10%), 70%);
@color-happy_new_year-pagination-active: fadeout(darken(@color-happy_new_year-theme, 10%), 70%);
@color-happy_new_year-pagination-select: fadeout(lighten(@color-happy_new_year-theme, 10%), 55%);
@color-happy_new_year-search-form-background: fadeout(lighten(@color-happy_new_year-theme, 15%), 20%);
@color-happy_new_year-search-list-hover: fadeout(darken(@color-happy_new_year-theme, 10%), 50%);
@color-happy_new_year-scrollbar-track: fadeout(@color-happy_new_year-theme, 80%);
@color-happy_new_year-scrollbar-thumb: fadeout(@color-happy_new_year-theme, 60%);
@color-happy_new_year-scrollbar-thumb-hover: fadeout(@color-happy_new_year-theme, 40%);
@color-happy_new_year-player-pic-c1: fadeout(@color-happy_new_year-theme_2, 50%);
@color-happy_new_year-player-pic-c2: darken(@color-happy_new_year-theme_2, 30%);
@color-happy_new_year-player-progress: darken(@color-happy_new_year-theme_2, 10%);
@color-happy_new_year-player-progress-bar1: darken(@color-happy_new_year-theme_2, 12%);
@color-happy_new_year-player-progress-bar2: lighten(@color-happy_new_year-theme, 9%);
@color-happy_new_year-player-status-text: lighten(@color-happy_new_year-theme_2-font, 10%);
@color-happy_new_year-tab-btn-background: fadeout(lighten(@color-happy_new_year-theme, 10%), 80%);
@color-happy_new_year-tab-btn-background-hover: @color-happy_new_year-theme_2-hover;
@color-happy_new_year-tab-border-top: fadeout(lighten(@color-happy_new_year-theme, 5%), 50%);
@color-happy_new_year-tab-border-bottom: lighten(@color-happy_new_year-theme, 5%);
@color-happy_new_year-minBtn: #c4943b;
@color-happy_new_year-maxBtn: #e7aa36;
@color-happy_new_year-closeBtn: #ea6e4d;
@color-happy_new_year-minBtn-hover: fadeout(@color-happy_new_year-minBtn, 10%);
@color-happy_new_year-maxBtn-hover: fadeout(@color-happy_new_year-maxBtn, 10%);
@color-happy_new_year-closeBtn-hover: fadeout(@color-happy_new_year-closeBtn, 10%);
@color-happy_new_year-badge-success: @color-happy_new_year-theme;
@color-happy_new_year-badge-success-font: #fff;
@color-happy_new_year-badge-info: #c4943b;
@color-happy_new_year-badge-info-font: #fff;
@@ -578,3 +578,5 @@
@radius-progress-border: 5px;
@transition-theme: .4s ease;
@form-radius: 3px;

View File

@@ -6,25 +6,25 @@ div(:class="$style.aside")
div(:class="$style.menu")
dl
dt 在线音乐
dt {{$t('core.aside.online_music')}}
dd
router-link(:active-class="$style.active" to="search") 搜索
router-link(:active-class="$style.active" to="search") {{$t('core.aside.search')}}
dd
router-link(:active-class="$style.active" to="songList") 歌单
router-link(:active-class="$style.active" to="songList") {{$t('core.aside.song_list')}}
dd
router-link(:active-class="$style.active" to="leaderboard") 排行榜
router-link(:active-class="$style.active" to="leaderboard") {{$t('core.aside.leaderboard')}}
dl
dt 我的音乐
dt {{$t('core.aside.my_music')}}
dd
router-link(:active-class="($route.query.id === defaultList.id || $route.query.id == '') ? $style.active : ''" :to="`list?id=${defaultList.id || ''}`") {{defaultList.name}}
router-link(:active-class="$route.query.id === loveList.id ? $style.active : ''" :to="`list?id=${loveList.id}`") {{loveList.name}}
router-link(:active-class="($route.query.id === defaultList.id || $route.query.id == '') ? $style.active : ''" :to="`list?id=${defaultList.id || ''}`") {{$t('core.aside.default_list')}}
router-link(:active-class="$route.query.id === loveList.id ? $style.active : ''" :to="`list?id=${loveList.id}`") {{$t('core.aside.love_list')}}
router-link(:active-class="$route.query.id === item.id ? $style.active : ''" v-for="item in userList" :to="`list?id=${item._id}`" :key="item._id") {{item.name}}
dl
dt 其他
dt {{$t('core.aside.other')}}
dd
router-link(:active-class="$style.active" to="download") 下载管理
router-link(:active-class="$style.active" to="download") {{$t('core.aside.download')}}
dd
router-link(:active-class="$style.active" to="setting") 设置
router-link(:active-class="$style.active" to="setting") {{$t('core.aside.setting')}}
</template>
<script>

View File

@@ -14,6 +14,7 @@ svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/19
g#icon-addTo
path(fill='currentColor' d='M37.059,16H26V4.941C26,2.224,23.718,0,21,0s-5,2.224-5,4.941V16H4.941C2.224,16,0,18.282,0,21s2.224,5,4.941,5H16v11.059C16,39.776,18.282,42,21,42s5-2.224,5-4.941V26h11.059C39.776,26,42,23.718,42,21S39.776,16,37.059,16z')
g#icon-delete
// 0 0 212.982 212.982
path(fill='currentColor' d='M131.804,106.491l75.936-75.936c6.99-6.99,6.99-18.323,0-25.312c-6.99-6.99-18.322-6.99-25.312,0l-75.937,75.937L30.554,5.242c-6.99-6.99-18.322-6.99-25.312,0c-6.989,6.99-6.989,18.323,0,25.312l75.937,75.936L5.242,182.427c-6.989,6.99-6.989,18.323,0,25.312c6.99,6.99,18.322,6.99,25.312,0l75.937-75.937l75.937,75.937c6.989,6.99,18.322,6.99,25.312,0c6.99-6.99,6.99-18.322,0-25.312L131.804,106.491z')
g#icon-left
// 451.847 451.847
@@ -69,5 +70,11 @@ svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/19
g#icon-down
// 0 0 451.847 451.847
path(fill='currentColor' d='M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z')
g#icon-refresh
// 0 0 512 512
path(fill='currentColor' d='M440.65 12.57l4 82.77A247.16 247.16 0 0 0 255.83 8C134.73 8 33.91 94.92 12.29 209.82A12 12 0 0 0 24.09 224h49.05a12 12 0 0 0 11.67-9.26 175.91 175.91 0 0 1 317-56.94l-101.46-4.86a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12H500a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12h-47.37a12 12 0 0 0-11.98 12.57zM255.83 432a175.61 175.61 0 0 1-146-77.8l101.8 4.87a12 12 0 0 0 12.57-12v-47.4a12 12 0 0 0-12-12H12a12 12 0 0 0-12 12V500a12 12 0 0 0 12 12h47.35a12 12 0 0 0 12-12.6l-4.15-82.57A247.17 247.17 0 0 0 255.83 504c121.11 0 221.93-86.92 243.55-201.82a12 12 0 0 0-11.8-14.18h-49.05a12 12 0 0 0-11.67 9.26A175.86 175.86 0 0 1 255.83 432z')
g#icon-eraser
// 0 0 512 512
path(fill='currentColor' d='M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z')
</template>

View File

@@ -7,19 +7,19 @@ div(:class="$style.player")
div(:class="$style.right")
div(:class="$style.column1")
div(:class="$style.container")
div(:class="$style.title" @click="handleCopy(title)" :title="title + '(点击复制)'") {{title}}
div(:class="$style.title" @click="handleCopy(title)" :title="title + $t('core.player.copy_title')") {{title}}
div(:class="$style.volumeContent")
div(:class="$style.volume")
div(:class="$style.volumeBar" :style="{ transform: `scaleX(${volume || 0})` }")
div(:class="$style.volumeMask" @mousedown="handleVolumeMsDown" ref="dom_volumeMask" :title="`当前音量:${parseInt(volume * 100)}%`")
div(:class="$style.volumeMask" @mousedown="handleVolumeMsDown" ref="dom_volumeMask" :title="`${$t('core.player.volume')}${parseInt(volume * 100)}%`")
//- div(:class="$style.playBtn" @click='handleNext' title="音量")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 291.063 291.064' space='preserve')
use(xlink:href='#icon-sound')
div(:class="$style.playBtn" @click='handleNext' title="下一首")
div(:class="$style.playBtn" @click='handleNext' :title="$t('core.player.next')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 220.847 220.847' space='preserve')
use(xlink:href='#icon-nextMusic')
div(:class="$style.playBtn" :title="isPlay ? '暂停' : '播放'" @click='togglePlay')
div(:class="$style.playBtn" :title="isPlay ? $t('core.player.pause') : $t('core.player.play')" @click='togglePlay')
svg(v-if="isPlay" version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 277.338 277.338' space='preserve')
use(xlink:href='#icon-pause')
svg(v-else version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 170 170' space='preserve')
@@ -150,6 +150,9 @@ export default {
'setting.player.togglePlayMethod'(n) {
this.audio.loop = n === 'singleLoop'
},
'setting.player.mediaDeviceId'(n) {
this.setMediaDevice()
},
list(n, o) {
if (n === o) {
let index = this.listId == 'download'
@@ -176,6 +179,9 @@ export default {
volume(n) {
this.handleSaveVolume(n)
},
nowPlayTime(n, o) {
if (Math.abs(n - o) > 2) this.isActiveTransition = true
},
},
methods: {
...mapActions('player', ['getUrl', 'getPic', 'getLrc']),
@@ -186,8 +192,10 @@ export default {
]),
...mapMutations(['setVolume']),
...mapMutations('list', ['updateMusicInfo']),
...mapMutations(['setMediaDeviceId']),
init() {
this.audio = document.createElement('audio')
this.setMediaDevice()
this.volume = this.audio.volume = this.setting.player.volume
this.audio.controls = false
this.audio.autoplay = true
@@ -196,19 +204,19 @@ export default {
this.audio.addEventListener('playing', () => {
console.log('开始播放')
this.status = '播放中...'
this.status = this.$t('core.player.playing')
this.startPlay()
})
this.audio.addEventListener('pause', () => {
console.log('暂停播放')
this.lyric.lrc.pause()
this.stopPlay()
this.status = '暂停播放'
this.status = this.$t('core.player.stop')
})
this.audio.addEventListener('ended', () => {
console.log('播放完毕')
this.stopPlay()
this.status = '播放完毕'
this.status = this.$t('core.player.end')
this.handleNext()
})
this.audio.addEventListener('error', () => {
@@ -221,12 +229,12 @@ export default {
if (!this.audioErrorTime) this.audioErrorTime = this.audio.currentTime // 记录出错的播放时间
this.retryNum++
this.setUrl(this.list[this.playIndex], true)
this.status = 'URL过期正在刷新URL...'
this.status = this.$t('core.player.refresh_url')
return
}
this.sendProgressEvent(this.progress, 'error')
this.status = '音频加载出错5 秒后切换下一首'
this.status = this.$t('core.player.error')
this.addDelayNextTimeout()
})
this.audio.addEventListener('loadeddata', () => {
@@ -236,10 +244,10 @@ export default {
this.audioErrorTime = 0
}
if (!this.targetSong.interval && this.listId != 'download') this.updateMusicInfo({ id: 'default', index: this.playIndex, data: { interval: formatPlayTime2(this.maxPlayTime) } })
this.status = '音乐加载中...'
this.status = this.$t('core.player.loading')
})
this.audio.addEventListener('loadstart', () => {
this.status = '音乐加载中...'
this.status = this.$t('core.player.loading')
})
this.audio.addEventListener('canplay', () => {
console.log('加载完成开始播放')
@@ -252,7 +260,7 @@ export default {
this.clearBufferTimeout()
}
// if (this.musicInfo.lrc) this.lyric.lrc.play(this.audio.currentTime * 1000)
this.status = '音乐加载中...'
this.status = this.$t('core.player.loading')
})
// this.audio.addEventListener('canplaythrough', () => {
// console.log('音乐加载完毕')
@@ -276,7 +284,7 @@ export default {
// console.log('缓冲中...')
this.stopPlay()
this.startBuffering()
this.status = '缓冲中...'
this.status = this.$t('core.player.buffering')
})
this.lyric.lrc = new Lyric({
@@ -385,7 +393,7 @@ export default {
},
setProgess(e) {
if (!this.audio.src) return
this.isActiveTransition = true
// this.isActiveTransition = true
this.$nextTick(() => {
const time = (e.offsetX / this.pregessWidth) * this.maxPlayTime
if (this.audioErrorTime) this.audioErrorTime = time
@@ -431,7 +439,7 @@ export default {
setUrl(targetSong, isRefresh) {
let type = this.getPlayType(this.setting.player.highQuality, targetSong)
this.musicInfo.url = targetSong.typeUrl[type]
this.status = '歌曲链接获取中...'
this.status = this.$t('core.player.geting_url')
return this.getUrl({ musicInfo: targetSong, type, isRefresh }).then(() => {
this.audio.src = this.musicInfo.url = targetSong.typeUrl[type]
@@ -466,7 +474,7 @@ export default {
if (this.isPlay && (this.musicInfo.url || this.listId == 'download')) this.lyric.lrc.play(this.audio.currentTime * 1000)
})
.catch(() => {
this.status = '歌词获取失败'
this.status = this.$t('core.player.lyric_error')
})
},
handleRemoveMusic() {
@@ -566,6 +574,18 @@ export default {
this.mediaBuffer.timeout = null
this.mediaBuffer.playTime = 0
},
async setMediaDevice() {
let mediaDeviceId = this.setting.player.mediaDeviceId
if (!mediaDeviceId) return
const devices = await navigator.mediaDevices.enumerateDevices()
let device = devices.find(device => device.deviceId === mediaDeviceId)
if (!device) return this.setMediaDeviceId('default')
// console.log(device)
this.audio.setSinkId(device.deviceId).catch((err) => {
console.log(err)
this.setMediaDeviceId('default')
})
},
},
}
</script>
@@ -588,7 +608,7 @@ export default {
}
}
.left {
width: @height-player;
width: @height-player - 2;
color: @color-theme;
transition: @transition-theme;
transition-property: color;
@@ -617,7 +637,7 @@ export default {
.right {
flex: auto;
// margin-left: 10px;
padding: 5px 10px;
padding: 5px 10px 5px 8px;
display: flex;
flex-flow: column nowrap;
}

View File

@@ -6,9 +6,9 @@
@event="handleEvent" :list="tipList" :visibleList="visibleList"
v-model="searchText")
div(:class="$style.control")
button(type="button" :class="$style.min" title="最小化" @click="min")
button(type="button" :class="$style.min" :title="$t('core.toolbar.min')" @click="min")
//- button(type="button" :class="$style.max" @click="max")
button(type="button" :class="$style.close" title="关闭" @click="close")
button(type="button" :class="$style.close" :title="$t('core.toolbar.close')" @click="close")
</template>
<script>
@@ -129,6 +129,8 @@ export default {
<style lang="less" module>
@import '../../assets/styles/layout.less';
@control-btn-width: @height-toolbar * .5;
.toolbar {
display: flex;
height: @height-toolbar;
@@ -161,8 +163,10 @@ export default {
.control {
display: flex;
align-items: center;
height: 100%;
-webkit-app-region: no-drag;
padding: 0 @control-btn-width / 2;
&:hover {
button:before {
opacity: 1;
@@ -171,7 +175,8 @@ export default {
button {
position: relative;
width: @height-toolbar;
width: @control-btn-width;
height: @control-btn-width;
background: none;
border: none;
display: flex;
@@ -180,6 +185,9 @@ export default {
outline: none;
padding: 0;
cursor: pointer;
+ button {
margin-left: @control-btn-width / 2;
}
&:after {
content: ' ';
@@ -224,8 +232,8 @@ export default {
content: ' ';
width: 8px;
height: 2px;
left: @height-toolbar / 2 - 4;
top: @height-toolbar / 2 - 1;
left: @control-btn-width / 2 - 4;
top: @control-btn-width / 2 - 1;
background-color: #fff;
}
}

View File

@@ -1,5 +1,5 @@
<template lang="pug">
button(:class="[$style.btn, min ? $style.min : '']" :disabled="disabled" @click="$emit('click', $event)")
button(:class="[$style.btn, min ? $style.min : null]" :disabled="disabled" @click="$emit('click', $event)")
slot
</template>
@@ -24,13 +24,14 @@ export default {
.btn {
display: inline-block;
border: none;
border-radius: 3px;
border-radius: @form-radius;
cursor: pointer;
padding: 8px 15px;
color: @color-btn;
outline: none;
transition: background-color 0.2s ease;
background-color: @color-btn-background;
font-size: 14px;
&[disabled] {
opacity: .4;
}

View File

@@ -33,7 +33,9 @@ export default {
type: Boolean,
default: false,
},
label: {},
label: {
type: String,
},
disabled: {
type: Boolean,
default: false,
@@ -77,7 +79,7 @@ export default {
}
checked = bool
} else {
checked = this.bool ? this.value : ''
checked = this.bool == null ? '' : this.value
}
this.$emit('input', checked)
this.$emit('change', checked)
@@ -112,7 +114,6 @@ export default {
.checkbox {
display: inline-block;
// font-size: 56px;
}
.input {
display: none;
@@ -149,6 +150,7 @@ export default {
cursor: pointer;
display: flex;
color: @color-theme;
margin-top: .25em;
// border: 1px solid #ccc;
&:after {
position: absolute;
@@ -159,13 +161,14 @@ export default {
right: 0;
border: 1px solid @color-theme_2-font-label;
transition: border-color 0.2s ease;
border-radius: 15%;
border-radius: 2px;
}
}
.icon {
transition: 0.3s ease;
transition-property: transform;
transform: scale(0);
border-radius: 2px;
// opacity: 0;
}
@@ -173,6 +176,7 @@ export default {
flex: auto;
line-height: 1;
margin-left: 5px;
line-height: 1.5;
cursor: pointer;
}

View File

@@ -5,7 +5,7 @@ material-modal(:show="show" :bg-close="bgClose" @close="handleClose")
| {{ info.name }}
br
| {{ info.singer }}
material-btn(:class="$style.btn" :title="!checkSource(type.type) && '腾讯、网易音源仅支持下载128k音质'" :disabled="!checkSource(type.type)" :key="type.type" @click="handleClick(type.type)" v-for="type in info.types") {{getTypeName(type.type)}} {{ type.type.toUpperCase() }}{{ type.size && ` - ${type.size.toUpperCase()}` }}
material-btn(:class="$style.btn" :title="!checkSource(type.type) && $t('material.download_modal.btn_tip')" :disabled="!checkSource(type.type)" :key="type.type" @click="handleClick(type.type)" v-for="type in info.types") {{getTypeName(type.type)}} {{ type.type.toUpperCase() }}{{ type.size && ` - ${type.size.toUpperCase()}` }}
</template>
@@ -41,12 +41,12 @@ export default {
switch (type) {
case 'flac':
case 'ape':
return '无损音质'
return this.$t('material.download_modal.lossless')
case '320k':
return '高品音质'
return this.$t('material.download_modal.high_quality')
case '192k':
case '128k':
return '普通音质'
return this.$t('material.download_modal.normal')
}
},
checkSource(type) {

View File

@@ -2,13 +2,13 @@
material-modal(:show="show" :bg-close="bgClose" @close="handleClose")
main(:class="$style.main")
h2
| 已选择 {{list.length}} 首歌曲
| {{$t('material.download_multiple_modal.tip', { len: list.length })}}
br
| 请选择要优先下载的音质
material-btn(:class="$style.btn" @click="handleClick('128k')") 普通音质 - 128K
material-btn(:class="$style.btn" @click="handleClick('320k')") 高品音质 - 320K
| {{$t('material.download_multiple_modal.tip2')}}
material-btn(:class="$style.btn" @click="handleClick('128k')") {{$t('material.download_multiple_modal.normal')}} - 128K
material-btn(:class="$style.btn" @click="handleClick('320k')") {{$t('material.download_multiple_modal.high_quality')}} - 320K
//- material-btn(:class="$style.btn" @click="handleClick('ape')") 无损音质 - APE
material-btn(:class="$style.btn" @click="handleClick('flac')") 无损音质 - FLAC
material-btn(:class="$style.btn" @click="handleClick('flac')") {{$t('material.download_multiple_modal.lossless')}} - FLAC
</template>
<script>

View File

@@ -1,22 +1,22 @@
<template lang="pug">
transition(enter-active-class="animated-fast zoomIn" leave-active-class="animated zoomOut")
div(:class="$style.btns" v-show="show")
button(type="button" v-if="playBtn" title="播放" @click.stop="handleClick('play')")
button(type="button" v-if="playBtn" :title="$t('material.flow_btn.play')" @click.stop="handleClick('play')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 287.386 287.386' space='preserve')
use(xlink:href='#icon-testPlay')
button(type="button" v-if="addBtn" title="添加" @click.stop="handleClick('add')")
button(type="button" v-if="addBtn" :title="$t('material.flow_btn.play')" @click.stop="handleClick('add')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 42 42' space='preserve')
use(xlink:href='#icon-addTo')
button(type="button" v-if="downloadBtn" title="下载" @click.stop="handleClick('download')")
button(type="button" v-if="downloadBtn" :title="$t('material.flow_btn.download')" @click.stop="handleClick('download')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 475.078 475.077' space='preserve')
use(xlink:href='#icon-download')
button(type="button" v-if="startBtn" title="开始" @click.stop="handleClick('start')")
button(type="button" v-if="startBtn" :title="$t('material.flow_btn.start')" @click.stop="handleClick('start')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 170 170' space='preserve')
use(xlink:href='#icon-play')
button(type="button" v-if="pauseBtn" title="暂停" @click.stop="handleClick('pause')")
button(type="button" v-if="pauseBtn" :title="$t('material.flow_btn.pause')" @click.stop="handleClick('pause')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 277.338 277.338' space='preserve')
use(xlink:href='#icon-pause')
button(type="button" v-if="removeBtn" title="移除" @click.stop="handleClick('remove')")
button(type="button" v-if="removeBtn" :title="$t('material.flow_btn.remove')" @click.stop="handleClick('remove')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 212.982 212.982' space='preserve')
use(xlink:href='#icon-delete')
@@ -78,10 +78,10 @@ export default {
button {
background-color: transparent;
border: none;
border-radius: 3px;
margin-right: 5px;
border-radius: @form-radius;
margin-right: 2px;
cursor: pointer;
padding: 4px 7px;
padding: 6px 10px;
color: @color-btn;
outline: none;
transition: background-color 0.2s ease;
@@ -91,7 +91,7 @@ export default {
}
svg {
height: 1.2em;
width: 18px;
}
&:hover {

View File

@@ -49,7 +49,7 @@ export default {
.input {
display: inline-block;
border: none;
border-radius: 3px;
border-radius: @form-radius;
padding: 7px 8px;
color: @color-btn;
outline: none;

View File

@@ -1,32 +1,32 @@
<template lang="pug">
div(:class="$style.btns")
button(type="button" v-if="playBtn" title="播放" @click.stop="handleClick('play')")
button(type="button" v-if="playBtn" :title="$t('material.list_buttons.play')" @click.stop="handleClick('play')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 287.386 287.386' space='preserve')
use(xlink:href='#icon-testPlay')
button(type="button" v-if="listAddBtn" title="添加到..." @click.stop="handleClick('listAdd')")
button(type="button" v-if="listAddBtn" :title="$t('material.list_buttons.add_to')" @click.stop="handleClick('listAdd')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 42 42' space='preserve')
use(xlink:href='#icon-addTo')
button(type="button" v-if="downloadBtn" title="下载" @click.stop="handleClick('download')")
button(type="button" v-if="downloadBtn" :title="$t('material.list_buttons.download')" @click.stop="handleClick('download')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 475.078 475.077' space='preserve')
use(xlink:href='#icon-download')
button(type="button" title="添加" v-if="userInfo" @click.stop="handleClick('add')")
button(type="button" :title="$t('material.list_buttons.add')" v-if="userInfo" @click.stop="handleClick('add')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 42 42' space='preserve')
use(xlink:href='#icon-addTo')
button(type="button" v-if="startBtn" title="开始" @click.stop="handleClick('start')")
button(type="button" v-if="startBtn" :title="$t('material.list_buttons.start')" @click.stop="handleClick('start')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 170 170' space='preserve')
use(xlink:href='#icon-play')
button(type="button" v-if="pauseBtn" title="暂停" @click.stop="handleClick('pause')")
button(type="button" v-if="pauseBtn" :title="$t('material.list_buttons.pause')" @click.stop="handleClick('pause')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 277.338 277.338' space='preserve')
use(xlink:href='#icon-pause')
button(type="button" v-if="fileBtn" title="定位文件" @click.stop="handleClick('file')")
button(type="button" v-if="fileBtn" :title="$t('material.list_buttons.file')" @click.stop="handleClick('file')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='-61 0 512 512' space='preserve')
use(xlink:href='#icon-musicFile')
button(type="button" v-if="removeBtn" title="移除" @click.stop="handleClick('remove')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 212.982 212.982' space='preserve')
use(xlink:href='#icon-delete')
button(type="button" v-if="searchBtn" title="搜索" @click.stop="handleClick('search')")
button(type="button" v-if="searchBtn" :title="$t('material.list_buttons.search')" @click.stop="handleClick('search')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 30.239 30.239' space='preserve')
use(xlink:href='#icon-search')
button(type="button" v-if="removeBtn" :title="$t('material.list_buttons.remove')" @click.stop="handleClick('remove')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 212.982 212.982' space='preserve')
use(xlink:href='#icon-delete')
</template>
@@ -88,10 +88,12 @@ export default {
@import '../../assets/styles/layout.less';
.btns {
line-height: 1;
button {
background-color: transparent;
border: none;
border-radius: 3px;
border-radius: @form-radius;
margin-right: 5px;
cursor: pointer;
padding: 4px 7px;
@@ -104,7 +106,7 @@ export default {
}
svg {
height: 1.2em;
height: 16px;
}
&:hover {

View File

@@ -6,20 +6,20 @@ div(:class="$style.pagination" v-if="allPage > 1")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 451.846 451.847' space='preserve')
use(xlink:href='#icon-left')
li(v-else)
button(type="button" @click="handleClick(page - 1)" title="上一页")
button(type="button" @click="handleClick(page - 1)" :title="$t('material.pagination.prev')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 451.846 451.847' space='preserve')
use(xlink:href='#icon-left')
li(v-if="allPage > btnLength && page > pageEvg+1" :class="$style.first")
button(type="button" @click="handleClick(1)" title=" 1 ")
button(type="button" @click="handleClick(1)" :title="$t('material.pagination.page', { num: 1 })")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 451.846 451.847' space='preserve')
use(xlink:href='#icon-first')
li(v-for="(p, index) in pages" :key="index" :class="{[$style.active] : p == page}")
span(v-if="p === page" v-text="page")
button(v-else type="button" @click="handleClick(p)" v-text="p" :title="`第 ${p} 页`")
button(v-else type="button" @click="handleClick(p)" v-text="p" :title="$t('material.pagination.page', { num: p })")
li(v-if="allPage > btnLength && allPage - page > pageEvg" :class="$style.last")
button(type="button" @click="handleClick(allPage)" :title="`第 ${allPage} 页`")
button(type="button" @click="handleClick(allPage)" :title="$t('material.pagination.page', { num: allPage })")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 451.846 451.847' space='preserve')
use(xlink:href='#icon-last')
@@ -29,7 +29,7 @@ div(:class="$style.pagination" v-if="allPage > 1")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 451.846 451.847' space='preserve')
use(xlink:href='#icon-right')
li(v-else)
button(type="button" @click="handleClick(page + 1)" title="下一页")
button(type="button" @click="handleClick(page + 1)" :title="$t('material.pagination.next')")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 451.846 451.847' space='preserve')
use(xlink:href='#icon-right')

View File

@@ -1,12 +1,13 @@
<template lang="pug">
div(:class="[$style.search, focus ? $style.active : '', big ? $style.big : '', small ? $style.small : '']")
div(:class="$style.form")
input(:placeholder="placeholder" v-model.trim="text"
input(:placeholder="placeholder" v-model.trim="text" ref="dom_input"
@focus="handleFocus" @blur="handleBlur" @input="$emit('input', text)"
@change="sendEvent('change')"
@keyup.enter="handleSearch"
@keyup.40.prevent="handleKeyDown"
@keyup.38.prevent="handleKeyUp")
@keyup.38.prevent="handleKeyUp"
@contextmenu="handleContextMenu")
button(type="button" @click="handleSearch")
slot
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 30.239 30.239' space='preserve')
@@ -21,6 +22,7 @@ div(:class="[$style.search, focus ? $style.active : '', big ? $style.big : '', s
</template>
<script>
import { clipboardReadText } from '../../utils'
export default {
props: {
placeholder: {
@@ -113,6 +115,15 @@ export default {
handleKeyUp() {
this.selectIndex = this.selectIndex - 1 < -1 ? this.list.length - 1 : this.selectIndex - 1
},
handleContextMenu() {
let str = clipboardReadText()
str = str.trim()
str = str.replace(/\t|\r\n|\n|\r/g, ' ')
str = str.replace(/\s+/g, ' ')
let dom_input = this.$refs.dom_input
this.text = `${this.text.substring(0, dom_input.selectionStart)}${str}${this.text.substring(dom_input.selectionEnd, this.text.length)}`
this.$emit('input', this.text)
},
},
}
</script>
@@ -122,7 +133,7 @@ export default {
@import '../../assets/styles/layout.less';
.search {
border-radius: 3px;
border-radius: @form-radius;
transition: box-shadow .4s ease, background-color @transition-theme;
display: flex;
flex-flow: column nowrap;

View File

@@ -83,6 +83,7 @@ export default {
border-top-left-radius: 4px;
color: @color-btn;
cursor: pointer;
.mixin-ellipsis-1;
&:hover {
background-color: @color-theme_2-hover;
@@ -94,6 +95,7 @@ export default {
.list {
position: absolute;
width: 100%;
top: 100%;
left: 0;
border-bottom: 2px solid @color-tab-border-bottom;
@@ -116,6 +118,7 @@ export default {
transition: background-color @transition-theme;
background-color: @color-btn-background;
box-sizing: border-box;
.mixin-ellipsis-1;
&:hover {
background-color: @color-theme_2-hover;

View File

@@ -0,0 +1,223 @@
<template lang="pug">
div(:class="[$style.select, show ? $style.active : '']")
div(:class="$style.label" ref="dom_btn" @click="handleShow")
span {{label}}
div(:class="$style.icon")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 451.847 451.847' space='preserve')
use(xlink:href='#icon-down')
ul.scroll(:class="$style.list" :style="listStyles" ref="dom_list")
li(v-for="item in list" :class="(itemKey ? item[itemKey] : item) == value ? $style.active : null" @click="handleClick(item)" :title="itemName ? item[itemName] : item") {{itemName ? item[itemName] : item}}
</template>
<script>
// import { isChildren } from '../../utils'
export default {
props: {
list: {
type: Array,
default() {
return []
},
},
value: {
type: [String, Number],
},
itemName: {
type: String,
},
itemKey: {
type: String,
},
},
data() {
return {
show: false,
listStyles: {
transform: 'scaleY(0) translateY(0)',
},
}
},
mounted() {
document.addEventListener('click', this.handleHide)
},
beforeDestroy() {
document.removeEventListener('click', this.handleHide)
},
computed: {
label() {
if (!this.value) return ''
if (!this.itemName) return this.value
const item = this.list.find(l => l[this.itemKey] == this.value)
if (!item) return ''
return item[this.itemName]
},
},
methods: {
handleHide(e) {
// if (e && e.target.parentNode != this.$refs.dom_list && this.show) return this.show = false
if (e && (e.target == this.$refs.dom_btn || this.$refs.dom_btn.contains(e.target))) return
this.listStyles.transform = 'scaleY(0) translateY(0)'
setTimeout(() => {
this.show = false
}, 50)
},
handleClick(item) {
// console.log(this.value)
if (item === this.value) return
this.$emit('input', this.itemKey ? item[this.itemKey] : item)
this.$emit('change', item)
},
handleShow() {
this.show = true
this.listStyles.transform = `scaleY(1) translateY(${this.handleGetOffset()}px)`
},
handleGetOffset() {
const listHeight = this.$refs.dom_list.clientHeight
const dom_select = this.$refs.dom_list.offsetParent
const dom_container = dom_select.offsetParent
const containerHeight = dom_container.clientHeight
if (containerHeight < listHeight) return 0
const offsetHeight = (dom_container.scrollTop + containerHeight) - (dom_select.offsetTop + listHeight)
if (offsetHeight > 0) return 0
return offsetHeight - 5
},
},
}
</script>
<style lang="less" module>
@import '../../assets/styles/layout.less';
@selection-height: 28px;
.select {
display: inline-block;
font-size: 12px;
position: relative;
width: 300px;
&.active {
.label {
background-color: @color-btn-background;
}
.list {
opacity: 1;
}
.icon {
svg{
transform: rotate(180deg);
}
}
}
}
.label {
background-color: @color-btn-background;
padding: 0 10px;
transition: background-color @transition-theme;
height: @selection-height;
line-height: 27px;
box-sizing: border-box;
color: @color-btn;
border-radius: @form-radius;
cursor: pointer;
display: flex;
span {
flex: auto;
.mixin-ellipsis-1;
}
.icon {
flex: none;
margin-left: 7px;
line-height: 0;
svg {
width: 1em;
transition: transform .2s ease;
transform: rotate(0);
}
}
&:hover {
background-color: @color-theme_2-hover;
}
&:active {
background-color: @color-theme_2-active;
}
}
.list {
position: absolute;
top: 0;
left: 0;
width: 100%;
background-color: @color-theme_2-background_2;
opacity: 0;
transform: scaleY(0) translateY(0);
transform-origin: 0 @selection-height / 2 0;
transition: .25s ease;
transition-property: transform, opacity;
z-index: 10;
border-radius: @form-radius;
box-shadow: 0 0 4px rgba(0, 0, 0, .15);
overflow: auto;
max-height: 200px;
li {
cursor: pointer;
padding: 0 10px;
line-height: @selection-height;
// color: @color-btn;
outline: none;
transition: background-color @transition-theme;
background-color: @color-btn-background;
box-sizing: border-box;
.mixin-ellipsis-1;
&:hover {
background-color: @color-theme_2-hover;
}
&:active {
background-color: @color-theme_2-active;
}
&.active {
color: @color-btn;
}
}
}
each(@themes, {
:global(#container.@{value}) {
.label {
color: ~'@{color-@{value}-btn}';
background-color: ~'@{color-@{value}-btn-background}';
&:hover {
background-color: ~'@{color-@{value}-theme_2-hover}';
}
&:active {
background-color: ~'@{color-@{value}-theme_2-active}';
}
}
.list {
background-color: ~'@{color-@{value}-theme_2-background_2}';
li {
// color: ~'@{color-@{value}-btn}';
background-color: ~'@{color-@{value}-btn-background}';
&:hover {
background-color: ~'@{color-@{value}-theme_2-hover}';
}
&:active {
background-color: ~'@{color-@{value}-theme_2-active}';
}
&.active {
color: ~'@{color-@{value}-btn}';
}
}
}
}
})
</style>

View File

@@ -1,31 +1,33 @@
<template lang="pug">
div(:class="$style.songList")
transition(enter-active-class="animated fadeIn" leave-active-class="animated fadeOut")
div(v-if="list.length" :class="$style.list")
transition(enter-active-class="animated-fast fadeIn" leave-active-class="animated-fast fadeOut")
div(v-show="list.length" :class="$style.list")
div(:class="$style.thead")
table
thead
tr
th.nobreak.center(style="width: 37px;")
material-checkbox(id="search_select_all" v-model="isSelectAll" @change="handleSelectAllData"
:indeterminate="isIndeterminate" :title="isSelectAll && !isIndeterminate ? '全不选' : '全选'")
th.nobreak(style="width: 25%;") 歌曲名
th.nobreak(style="width: 20%;") 歌手
th.nobreak(style="width: 20%;") 专辑
th.nobreak(style="width: 20%;") 操作
th.nobreak(style="width: 10%;") 时长
:indeterminate="isIndeterminate" :title="isSelectAll && !isIndeterminate ? $t('material.song_list.unselect_all') : $t('material.song_list.select_all')")
th.nobreak(style="width: 25%;") {{$t('material.song_list.name')}}
th.nobreak(style="width: 20%;") {{$t('material.song_list.singer')}}
th.nobreak(style="width: 20%;") {{$t('material.song_list.album')}}
th.nobreak(style="width: 20%;") {{$t('material.song_list.action')}}
th.nobreak(style="width: 10%;") {{$t('material.song_list.time')}}
div.scroll(:class="$style.tbody" ref="dom_scrollContent")
table
tbody
tr(v-for='(item, index) in list' :key='item.songmid' @click="handleDoubleClick(index)")
tbody(@contextmenu="handleContextMenu")
tr(v-for='(item, index) in list' :key='item.songmid' @click="handleDoubleClick($event, index)")
td.nobreak.center(style="width: 37px;" @click.stop)
material-checkbox(:id="index.toString()" v-model="selectdList" @change="handleChangeSelect" :value="item")
td.break(style="width: 25%;")
| {{item.name}}
span.badge.badge-theme-info(v-if="!(item._types.ape || item._types.flac) && item._types['320k']") 高品质
span.badge.badge-theme-success(v-if="item._types.ape || item._types.flac") 无损
td.break(style="width: 20%;") {{item.singer}}
td.break(style="width: 20%;") {{item.albumName}}
span.select {{item.name}}
span.badge.badge-theme-success(:class="$style.labelQuality" v-if="item._types.ape || item._types.flac") {{$t('material.song_list.lossless')}}
span.badge.badge-theme-info(:class="$style.labelQuality" v-else-if="item._types['320k']") {{$t('material.song_list.high_quality')}}
td.break(style="width: 20%;")
span.select {{item.singer}}
td.break(style="width: 20%;")
span.select {{item.albumName}}
td(style="width: 20%; padding-left: 0; padding-right: 0;")
material-list-buttons(:index="index" :search-btn="true"
:remove-btn="false" @btn-click="handleListBtnClick"
@@ -35,17 +37,19 @@ div(:class="$style.songList")
//- button.btn-info(type='button' v-if="item._types['128k'] || item._types['192k'] || item._types['320k'] || item._types.flac" @click.stop='openDownloadModal(index)') 下载
//- button.btn-secondary(type='button' v-if="item._types['128k'] || item._types['192k'] || item._types['320k']" @click.stop='testPlay(index)') 试听
//- button.btn-success(type='button' v-if="(item._types['128k'] || item._types['192k'] || item._types['320k']) && userInfo" @click.stop='showListModal(index)')
td(style="width: 10%;") {{item.interval || '--/--'}}
td(style="width: 10%;")
span(:class="$style.time") {{item.interval || '--/--'}}
div(:class="$style.pagination")
material-pagination(:count="total" :limit="limit" :page="page" @btn-click="handleTogglePage")
div(v-else :class="$style.noitem")
transition(enter-active-class="animated-fast fadeIn" leave-active-class="animated-fast fadeOut")
div(v-show="!list.length" :class="$style.noitem")
p(v-html="noItem")
material-flow-btn(:show="isShowEditBtn && (source == 'kw' || !isAPITemp)" :remove-btn="false" @btn-click="handleFlowBtnClick")
</template>
<script>
import { mapGetters } from 'vuex'
import { scrollTo } from '../../utils'
import { scrollTo, clipboardWriteText } from '../../utils'
export default {
name: 'MaterialSongList',
model: {
@@ -131,7 +135,9 @@ export default {
}
},
methods: {
handleDoubleClick(index) {
handleDoubleClick(event, index) {
if (event.target.classList.contains('select')) return
if (
window.performance.now() - this.clickTime > 400 ||
this.clickIndex !== index
@@ -167,6 +173,18 @@ export default {
handleChangeSelect() {
this.$emit('input', [...this.selectdList])
},
handleContextMenu(event) {
if (!event.target.classList.contains('select')) return
let classList = this.$refs.dom_scrollContent.classList
classList.add(this.$style.copying)
window.requestAnimationFrame(() => {
let str = window.getSelection().toString()
classList.remove(this.$style.copying)
str = str.trim()
if (!str.length) return
clipboardWriteText(str)
})
},
},
}
</script>
@@ -179,6 +197,7 @@ export default {
height: 100%;
display: flex;
flex-flow: column nowrap;
position: relative;
}
.list {
@@ -197,18 +216,18 @@ export default {
td {
font-size: 12px;
:global(.badge) {
margin-right: 3px;
&:first-child {
margin-left: 3px;
}
&:last-child {
margin-right: 0;
}
margin-left: 3px;
}
}
:global(.badge) {
opacity: .85;
}
&.copying {
.labelQuality, .time {
display: none;
}
}
}
.pagination {
text-align: center;
@@ -217,8 +236,11 @@ export default {
// transform: translateX(-50%);
}
.noitem {
position: relative;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
display: flex;
flex-flow: column nowrap;
justify-content: center;

View File

@@ -5,8 +5,8 @@
div(:class="$style.icon")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 451.847 451.847' space='preserve')
use(xlink:href='#icon-down')
div.scroll(:class="$style.list" :style="{ width: listStyle }" @click.stop ref="dom_list")
div(:class="$style.tag" @click="handleClick(null)") 默认
div.scroll(:class="$style.list" :style="{ width: listWidth + 'PX' }" @click.stop ref="dom_list")
div(:class="$style.tag" @click="handleClick(null)") {{$t('material.tag_list.default')}}
dl(v-for="type in list")
dt(:class="$style.type") {{type.name}}
dd(:class="$style.tag" v-for="tag in type.list" @click="handleClick(tag)") {{tag.name}}
@@ -23,16 +23,16 @@ export default {
return []
},
},
listWidth: {
type: Number,
default: 645,
},
value: {
type: Object,
},
},
computed: {
...mapGetters(['setting', 'windowSizeList']),
listStyle() {
let info = this.windowSizeList.find(i => i.id === this.setting.windowSizeId) || this.windowSizeList[0]
return info.tabList
},
...mapGetters(['setting']),
},
data() {
return {
@@ -56,7 +56,7 @@ export default {
handleClick(item) {
if (!item) {
item = {
name: '默认',
name: this.$t('material.tag_list.default'),
id: null,
}
}
@@ -117,7 +117,7 @@ export default {
margin-left: 7px;
line-height: 0;
svg {
width: 1em;
width: .9em;
transition: transform .2s ease;
transform: rotate(0);
}
@@ -134,7 +134,7 @@ export default {
.list {
position: absolute;
top: 100%;
width: 646px;
width: 645px;
left: 0;
border-bottom: 2px solid @color-tab-border-bottom;
border-right: 2px solid @color-tab-border-bottom;

View File

@@ -54,6 +54,7 @@ material-modal(:show="version.showModal" @close="handleClose" v-if="version.newV
| 国内Windows/MAC用户推荐到
strong 网盘
| 下载
material-btn(:class="$style.btn" @click.onec="handleIgnoreClick") {{ isIgnored ? '恢复当前版本的更新失败提醒' : '忽略当前版本的更新失败提醒'}}
main(:class="$style.main" v-else-if="version.isDownloading && version.isTimeOut && !version.isUnknow")
h2 新版本下载超时
div(:class="$style.desc")
@@ -108,6 +109,10 @@ material-modal(:show="version.showModal" @close="handleClose" v-if="version.newV
div(:class="$style.footer")
div(:class="$style.desc")
p 发现有新版本啦正在努力更新中若下载太慢可以手动更新哦~
p
| 你也可以关闭本弹窗继续使用软件还可在
strong 设置-软件更新
| 重新打开本弹窗
p
| 手动更新可以去&nbsp;
strong.hover.underline(@click="handleOpenUrl('https://github.com/lyswhut/lx-music-desktop/releases')" title="点击打开") 软件发布页
@@ -143,9 +148,12 @@ export default {
? `${this.version.downloadProgress.percent.toFixed(2)}% - ${sizeFormate(this.version.downloadProgress.transferred)}/${sizeFormate(this.version.downloadProgress.total)} - ${sizeFormate(this.version.downloadProgress.bytesPerSecond)}/s`
: '初始化中...'
},
isIgnored() {
return this.setting.ignoreVersion == this.version.newVersion.version
},
},
methods: {
...mapMutations(['setVersionModalVisible', 'setSetting']),
...mapMutations(['setVersionModalVisible', 'setIgnoreVersion']),
handleClose() {
this.setVersionModalVisible({
isShow: false,
@@ -162,6 +170,10 @@ export default {
handleCopy(text) {
clipboardWriteText(text)
},
handleIgnoreClick() {
this.setIgnoreVersion(this.isIgnored ? null : this.version.newVersion.version)
this.handleClose()
},
},
}
</script>

View File

@@ -2,10 +2,10 @@
material-modal(:show="show" :bg-close="bgClose" @close="handleClose")
main(:class="$style.main")
h2
| 添加&nbsp;
| {{$t('material.list_add_modal.title_first')}}&nbsp;
span(:class="$style.name") {{this.musicInfo && `${musicInfo.name}`}}
| &nbsp;...
material-btn(:class="$style.btn" :title="`把该歌曲添加到 ${item.name}`" :key="item.id" @click="handleClick(index)" v-for="(item, index) in lists") {{item.name}}
| &nbsp;{{$t('material.list_add_modal.title_last')}}
material-btn(:class="$style.btn" :title="$t('material.list_add_modal.btn_title', { name: item.name })" :key="item.id" @click="handleClick(index)" v-for="(item, index) in lists") {{item.name}}
</template>
<script>

View File

@@ -1,8 +1,8 @@
<template lang="pug">
material-modal(:show="show" :bg-close="bgClose" @close="handleClose")
main(:class="$style.main")
h2 添加已选的 {{musicList.length}} 首歌曲到...
material-btn(:class="$style.btn" :title="`把该歌曲添加到 ${item.name}`" :key="item.id" @click="handleClick(index)" v-for="(item, index) in lists") {{item.name}}
h2 {{$t('material.list_add_multiple_modal.title', { num: musicList.length })}}
material-btn(:class="$style.btn" :title="$t('material.list_add_multiple_modal.btn_title', { name: item.name })" :key="item.id" @click="handleClick(index)" v-for="(item, index) in lists") {{item.name}}
</template>
<script>

View File

@@ -0,0 +1,12 @@
{
"online_music": "在线音乐",
"search": "搜索",
"song_list": "歌单",
"leaderboard": "排行榜",
"my_music": "我的音乐",
"default_list": "试听列表",
"love_list": "收藏列表",
"other": "其他",
"download": "下载管理",
"setting": "设置"
}

View File

@@ -0,0 +1,16 @@
{
"copy_title": "(点击复制)",
"volume": "当前音量:",
"pause": "暂停",
"play": "播放",
"next": "下一首",
"playing": "播放中...",
"stop": "暂停播放",
"end": "播放完毕",
"refresh_url": "URL过期正在刷新URL...",
"error": "音频加载出错5 秒后切换下一首",
"loading": "音乐加载中...",
"buffering": "缓冲中...",
"geting_url": "歌曲链接获取中...",
"lyric_error": "歌词获取失败"
}

View File

@@ -0,0 +1,4 @@
{
"min": "最小化",
"close": "关闭"
}

View File

@@ -0,0 +1,6 @@
{
"btn_tip": "腾讯、网易音源仅支持下载128k音质",
"lossless": "无损音质",
"high_quality": "高品音质",
"normal": "普通音质"
}

View File

@@ -0,0 +1,7 @@
{
"tip": "已选择 {len} 首歌曲",
"tip2": "请选择要优先下载的音质",
"normal": "普通音质",
"high_quality": "高品音质",
"lossless": "无损音质"
}

View File

@@ -0,0 +1,8 @@
{
"play": "播放",
"add": "添加",
"download": "下载",
"start": "开始",
"pause": "暂停",
"remove": "移除"
}

View File

@@ -0,0 +1,5 @@
{
"title_first": "添加",
"title_last": "到...",
"btn_title": "把该歌曲添加到 {name}"
}

View File

@@ -0,0 +1,4 @@
{
"title": "添加已选的 {num} 首歌曲到...",
"btn_title": "把该歌曲添加到 {name}"
}

View File

@@ -0,0 +1,11 @@
{
"play": "播放",
"add_to": "添加到...",
"download": "下载",
"add": "添加",
"start": "开始",
"pause": "暂停",
"file": "定位文件",
"search": "搜索",
"remove": "移除"
}

View File

@@ -0,0 +1,5 @@
{
"prev": "上一页",
"next": "下一页",
"page": "第 {num} 页"
}

View File

@@ -0,0 +1,12 @@
{
"select_all": "全选",
"unselect_all": "全不选",
"name": "歌曲名",
"singer": "歌手",
"album": "专辑",
"action": "操作",
"time": "时长",
"lossless": "无损",
"high_quality": "高品质",
"loding_list": "列表加载中..."
}

View File

@@ -0,0 +1,3 @@
{
"default": "默认"
}

View File

@@ -0,0 +1,30 @@
{
"theme_green": "绿意盎然",
"theme_blue": "蓝田生玉",
"theme_yellow": "信口雌黄",
"theme_orange": "橙黄橘绿",
"theme_red": "热情似火",
"theme_purple": "重斤球紫",
"theme_grey": "灰常美丽",
"theme_mid_autumn": "月里嫦娥",
"theme_naruto": "木叶之村",
"theme_happy_new_year": "新年快乐",
"source_kw": "酷我音乐",
"source_kg": "酷狗音乐",
"source_tx": "企鹅音乐",
"source_wy": "网易音乐",
"source_mg": "咪咕音乐",
"source_bd": "百度音乐",
"source_all": "聚合搜索",
"source_alias_kw": "小蜗音乐",
"source_alias_kg": "小枸音乐",
"source_alias_tx": "小秋音乐",
"source_alias_wy": "小芸音乐",
"source_alias_mg": "小蜜音乐",
"source_alias_bd": "小杜音乐",
"source_alias_all": "聚合大会"
}

View File

@@ -0,0 +1,14 @@
{
"select_all": "全选",
"unselect_all": "全不选",
"name": "歌曲名",
"progress": "进度",
"status": "状态",
"quality": "品质",
"action": "操作",
"all": "全部任务",
"runing": "正在下载",
"paused": "已暂停",
"error": "出错",
"finished": "下载完成"
}

View File

@@ -0,0 +1,11 @@
{
"select_all": "全选",
"unselect_all": "全不选",
"name": "歌曲名",
"singer": "歌手",
"album": "专辑",
"action": "操作",
"time": "时长",
"loding_list": "加载中...",
"no_item": "列表竟然是空的..."
}

View File

@@ -0,0 +1,16 @@
{
"select_all": "全选",
"unselect_all": "全不选",
"name": "歌曲名",
"singer": "歌手",
"album": "专辑",
"action": "操作",
"time": "时长",
"lossless": "无损",
"high_quality": "高品质",
"no_item": "搜我所想~~😉",
"hot_search": "热门搜索",
"history_search": "历史搜索",
"history_clear": "清空搜索历史",
"history_remove": "右击移除该历史"
}

View File

@@ -0,0 +1,120 @@
{
"basic": "基本设置",
"basic_theme": "主题颜色",
"basic_animation_title": "弹出层的动画效果",
"basic_animation": "弹出层随机动画",
"basic_source_title": "选择音乐来源",
"basic_source_test": "测试接口(几乎软件的所有功能都可用)",
"basic_source_temp": "临时接口(软件的某些功能不可用,建议测试接口不可用再使用本接口)",
"basic_source": "音乐来源",
"basic_sourcename_title": "选择音源名字类型",
"basic_sourcename_real": "原名",
"basic_sourcename_alias": "别名",
"basic_sourcename": "音源名字",
"basic_window_size_title": "设置软件窗口尺寸",
"basic_window_size": "窗口尺寸",
"basic_window_size_smaller": "较小",
"basic_window_size_small": "小",
"basic_window_size_medium": "中",
"basic_window_size_big": "大",
"basic_window_size_larger": "较大",
"basic_lang_title": "软件显示的语言",
"basic_lang": "语言",
"play": "播放设置",
"play_toggle_title": "都不选时播放完当前歌曲就停止播放",
"play_toggle": "歌曲切换方式",
"play_toggle_list_loop": "列表循环",
"play_toggle_random": "列表随机",
"play_toggle_list": "顺序播放",
"play_toggle_single_loop": "单曲循环",
"play_quality_title": "启用时将优先播放320K品质的歌曲",
"play_quality": "优先播放高品质音乐",
"play_task_bar_title": "在任务栏上显示当前歌曲播放进度",
"play_task_bar": "任务栏播放进度条",
"play_mediaDevice_title": "选择声音输出的媒体设备",
"play_mediaDevice": "音频输出",
"play_mediaDevice_refresh_btn_title": "刷新音频设备列表",
"play_mediaDevice_refresh_btn": "刷新",
"search": "搜索设置",
"search_hot_title": "是否显示热门搜索",
"search_hot": "热门搜索",
"search_history_title": "是否显示历史搜索记录",
"search_history": "搜索历史",
"list": "列表设置",
"list_source_title": "是否显示歌曲源",
"list_source": "是否显示歌曲源(仅对我的音乐分类有效)",
"list_scroll_title": "是否记住播放列表滚动条位置",
"list_scroll": "记住列表滚动位置(仅对我的音乐分类有效)",
"download": "下载设置",
"download_path_title": "下载歌曲保存的路径",
"download_path": "下载路径",
"download_path_label": "当前下载路径:",
"download_path_open_label": "点击打开当前路径",
"download_path_change_btn": "更改",
"download_name_title": "下载歌曲时的命名方式",
"download_name": "文件命名方式",
"download_embed_pic_title": "是否将封面嵌入音频文件中",
"download_embed_pic": "封面嵌入只支持MP3格式",
"download_lyric_title": "是否同时下载歌词文件",
"download_lyric": "歌词下载",
"download_name1": "歌名 - 歌手",
"download_name2": "歌手 - 歌名",
"download_name3": "歌名",
"download_select_save_path": "选择歌曲保存路径",
"network": "网络设置",
"network_proxy_title": "代理设置(乱设置软件将无法联网)",
"network_proxy_host": "主机",
"network_proxy_port": "端口",
"network_proxy_username": "用户名",
"network_proxy_password": "密码",
"odc": "强迫症设置",
"odc_clear_search_input": "离开搜索界面时清空搜索框",
"odc_clear_search_list": "离开搜索界面时清空搜索列表",
"backup": "备份与恢复",
"backup_part": "部分数据",
"backup_part_import_list": "导入列表",
"backup_part_export_list": "导出列表",
"backup_part_import_setting": "导入设置",
"backup_part_export_setting": "导出设置",
"backup_all": "所有数据(设置与试听列表)",
"backup_all_import": "导入",
"backup_all_export": "导出",
"backup_all_import_desc": "选择备份文件",
"backup_all_export_desc": "选择备份保存位置",
"backup_part_import_setting_desc": "选择配置文件",
"backup_part_export_setting_desc": "选择设置保存位置",
"backup_part_import_list_desc": "选择列表文件",
"backup_part_export_list_desc": "选择设置保存位置",
"other": "其他",
"other_cache": "缓存大小(清理缓存后图片等资源将需要重新下载,不建议清理,软件会根据磁盘空间动态管理缓存大小)",
"other_cache_label": "软件已使用缓存大小:",
"other_cache_label_title": "当前已用缓存",
"other_cache_clear_btn": "清理缓存",
"update": "软件更新",
"update_latest_label": "最新版本:",
"update_unknown": "未知",
"update_current_label": "当前版本:",
"update_downloading": "发现新版本并在努力下载中,请稍后...⏳",
"update_progress": "下载进度:",
"update_latest": "软件已是最新,尽情地体验吧~🥂",
"update_open_version_modal_btn": "打开更新窗口 🚀",
"update_checking": "检查更新中...",
"update_init": "更新初始化中...",
"about": "关于洛雪音乐",
"is_enable": "是否启用",
"is_show": "是否显示",
"click_open": "点击打开",
"click_copy": "点击复制"
}

View File

@@ -0,0 +1,5 @@
{
"back": "返回",
"loding_list": "列表加载中...",
"loding_list_fail": "列表加载失败"
}

View File

@@ -0,0 +1,12 @@
{
"online_music": "在線音樂",
"search": "搜索",
"song_list": "歌單",
"leaderboard": "排行榜",
"my_music": "我的音樂",
"default_list": "試聽列表",
"love_list": "收藏列表",
"other": "其他",
"download": "下載管理",
"setting": "設置"
}

View File

@@ -0,0 +1,16 @@
{
"copy_title": "(點擊複製)",
"volume": "當前音量:",
"pause": "暫停",
"play": "播放",
"next": "下一首",
"playing": "播放中...",
"stop": "暫停播放",
"end": "播放完畢",
"refresh_url": "URL過期正在刷新URL...",
"error": "音頻加載出錯5 秒後切換下一首",
"loading": "音樂加載中...",
"buffering": "緩衝中...",
"geting_url": "歌曲鏈接獲取中...",
"lyric_error": "歌詞獲取失敗"
}

View File

@@ -0,0 +1,4 @@
{
"min": "最小化",
"close": "關閉"
}

View File

@@ -0,0 +1,6 @@
{
"btn_tip": "騰訊、網易音源僅支持下載128k音質",
"lossless": "無損音質",
"high_quality": "高品音質",
"normal": "普通音質"
}

View File

@@ -0,0 +1,7 @@
{
"tip": "已選擇 {len} 首歌曲",
"tip2": "請選擇要優先下載的音質",
"normal": "普通音質",
"high_quality": "高品音質",
"lossless": "無損音質"
}

View File

@@ -0,0 +1,8 @@
{
"play": "播放",
"add": "添加",
"download": "下載",
"start": "開始",
"pause": "暫停",
"remove": "移除"
}

View File

@@ -0,0 +1,5 @@
{
"title_first": "添加",
"title_last": "到...",
"btn_title": "把該歌曲添加到 {name}"
}

View File

@@ -0,0 +1,4 @@
{
"title": "添加已選的 {num} 首歌曲到...",
"btn_title": "把該歌曲添加到 {name}"
}

View File

@@ -0,0 +1,11 @@
{
"play": "播放",
"add_to": "添加到...",
"download": "下載",
"add": "添加",
"start": "開始",
"pause": "暫停",
"file": "定位文件",
"search": "搜索",
"remove": "移除"
}

View File

@@ -0,0 +1,5 @@
{
"prev": "上一頁",
"next": "下一頁",
"page": "第 {num} 頁"
}

View File

@@ -0,0 +1,12 @@
{
"select_all": "全選",
"unselect_all": "全不選",
"name": "歌曲名",
"singer": "歌手",
"album": "專輯",
"action": "操作",
"time": "時長",
"lossless": "無損",
"high_quality": "高品質",
"loding_list": "列表加載中..."
}

View File

@@ -0,0 +1,3 @@
{
"default": "默認"
}

View File

@@ -0,0 +1,26 @@
{
"theme_green": "綠意盎然",
"theme_blue": "藍田生玉",
"theme_yellow": "信口雌黃",
"theme_orange": "橙黃橘綠",
"theme_red": "熱情似火",
"theme_purple": "重斤球紫",
"theme_grey": "灰常美麗",
"theme_mid_autumn": "月裡嫦娥",
"theme_naruto": "木葉之村",
"theme_happy_new_year": "新年快樂",
"source_kw": "酷我音樂",
"source_kg": "酷狗音樂",
"source_tx": "企鵝音樂",
"source_wy": "網易音樂",
"source_mg": "咪咕音樂",
"source_bd": "百度音樂",
"source_all": "聚合搜索",
"source_alias_kw": "小蝸音樂",
"source_alias_kg": "小枸音樂",
"source_alias_tx": "小秋音樂",
"source_alias_wy": "小芸音樂",
"source_alias_mg": "小蜜音樂",
"source_alias_bd": "小杜音樂",
"source_alias_all": "聚合大會"
}

View File

@@ -0,0 +1,14 @@
{
"select_all": "全選",
"unselect_all": "全不選",
"name": "歌曲名",
"progress": "進度",
"status": "狀態",
"quality": "品質",
"action": "操作",
"all": "全部任務",
"runing": "正在下載",
"paused": "已暫停",
"error": "出錯",
"finished": "下載完成"
}

View File

@@ -0,0 +1,11 @@
{
"select_all": "全選",
"unselect_all": "全不選",
"name": "歌曲名",
"singer": "歌手",
"album": "專輯",
"action": "操作",
"time": "時長",
"loding_list": "加載中...",
"no_item": "列表竟然是空的..."
}

View File

@@ -0,0 +1,16 @@
{
"select_all": "全選",
"unselect_all": "全不選",
"name": "歌曲名",
"singer": "歌手",
"album": "專輯",
"action": "操作",
"time": "時長",
"lossless": "無損",
"high_quality": "高品質",
"no_item": "搜我所想~~😉",
"hot_search": "熱門搜索",
"history_search": "歷史搜索",
"history_clear": "清空搜索歷史",
"history_remove": "右擊移除該歷史"
}

View File

@@ -0,0 +1,108 @@
{
"basic": "基本設置",
"basic_theme": "主題顏色",
"basic_animation_title": "彈出層的動畫效果",
"basic_animation": "彈出層隨機動畫",
"basic_source_title": "選擇音樂來源",
"basic_source_test": "測試接口(幾乎軟件的所有功能都可用)",
"basic_source_temp": "臨時接口(軟件的某些功能不可用,建議測試接口不可用再使用本接口)",
"basic_source": "音樂來源",
"basic_sourcename_title": "選擇音源名字類型",
"basic_sourcename_real": "原名",
"basic_sourcename_alias": "別名",
"basic_sourcename": "音源名字",
"basic_window_size_title": "設置軟件窗口尺寸",
"basic_window_size": "窗口尺寸",
"basic_window_size_smaller": "較小",
"basic_window_size_small": "小",
"basic_window_size_medium": "中",
"basic_window_size_big": "大",
"basic_window_size_larger": "較大",
"basic_lang_title": "軟件顯示的語言",
"basic_lang": "語言",
"play": "播放設置",
"play_toggle_title": "都不選時播放完當前歌曲就停止播放",
"play_toggle": "歌曲切換方式",
"play_toggle_list_loop": "列表循環",
"play_toggle_random": "列表隨機",
"play_toggle_list": "順序播放",
"play_toggle_single_loop": "單曲循環",
"play_quality_title": "啟用時將優先播放320K品質的歌曲",
"play_quality": "優先播放高品質音樂",
"play_task_bar_title": "在任務欄上顯示當前歌曲播放進度",
"play_task_bar": "任務欄播放進度條",
"play_mediaDevice_title": "選擇聲音輸出的媒體設備",
"play_mediaDevice": "音頻輸出",
"play_mediaDevice_refresh_btn_title": "刷新音頻設備列表",
"play_mediaDevice_refresh_btn": "刷新",
"search": "搜索設置",
"search_hot_title": "是否顯示熱門搜索",
"search_hot": "熱門搜索",
"search_history_title": "是否顯示歷史搜索記錄",
"search_history": "搜索歷史",
"list": "列表設置",
"list_source_title": "是否顯示歌曲源",
"list_source": "是否顯示歌曲源(僅對我的音樂分類有效)",
"list_scroll_title": "是否記住播放列表滾動條位置",
"list_scroll": "記住列表滾動位置(僅對我的音樂分類有效)",
"download": "下載設置",
"download_path_title": "下載歌曲保存的路徑",
"download_path": "下載路徑",
"download_path_label": "當前下載路徑:",
"download_path_open_label": "點擊打開當前路徑",
"download_path_change_btn": "更改",
"download_name_title": "下載歌曲時的命名方式",
"download_name": "文件命名方式",
"download_embed_pic_title": "是否將封面嵌入音頻文件中",
"download_embed_pic": "封面嵌入只支持MP3格式",
"download_lyric_title": "是否同時下載歌詞文件",
"download_lyric": "歌詞下載",
"download_name1": "歌名 - 歌手",
"download_name2": "歌手 - 歌名",
"download_name3": "歌名",
"download_select_save_path": "選擇歌曲保存路徑",
"network": "網絡設置",
"network_proxy_title": "代理設置(亂設置軟件將無法聯網)",
"network_proxy_host": "主機",
"network_proxy_port": "端口",
"network_proxy_username": "用戶名",
"network_proxy_password": "密碼",
"odc": "強迫症設置",
"odc_clear_search_input": "離開搜索界面時清空搜索框",
"odc_clear_search_list": "離開搜索界面時清空搜索列表",
"backup": "備份與恢復",
"backup_part": "部分數據",
"backup_part_import_list": "導入列表",
"backup_part_export_list": "導出列表",
"backup_part_import_setting": "導入設置",
"backup_part_export_setting": "導出設置",
"backup_all": "所有數據(設置與試聽列表)",
"backup_all_import": "導入",
"backup_all_export": "導出",
"backup_all_import_desc": "選擇備份文件",
"backup_all_export_desc": "選擇備份保存位置",
"backup_part_import_setting_desc": "選擇配置文件",
"backup_part_export_setting_desc": "選擇設置保存位置",
"backup_part_import_list_desc": "選擇列表文件",
"backup_part_export_list_desc": "選擇設置保存位置",
"other": "其他",
"other_cache": "緩存大小(清理緩存後圖片等資源將需要重新下載,不建議清理,軟件會根據磁盤空間動態管理緩存大小)",
"other_cache_label": "軟件已使用緩存大小:",
"other_cache_label_title": "當前已用緩存",
"other_cache_clear_btn": "清理緩存",
"update": "軟件更新",
"update_latest_label": "最新版本:",
"update_unknown": "未知",
"update_current_label": "當前版本:",
"update_downloading": "發現新版本並在努力下載中,請稍後...⏳",
"update_progress": "下載進度:",
"update_latest": "軟件已是最新,盡情地體驗吧~🥂",
"update_open_version_modal_btn": "打開更新窗口 🚀",
"update_checking": "檢查更新中...",
"update_init": "更新初始化中...",
"about": "關於洛雪音樂",
"is_enable": "是否啟用",
"is_show": "是否顯示",
"click_open": "點擊打開",
"click_copy": "點擊複製"
}

View File

@@ -0,0 +1,5 @@
{
"back": "返回",
"loding_list": "列表加载中...",
"loding_list_fail": "列表加載失敗"
}

View File

@@ -0,0 +1,12 @@
{
"online_music": "Online music",
"search": "Search",
"song_list": "Song list",
"leaderboard": "Leaderboard",
"my_music": "My music",
"default_list": "Preview list",
"love_list": "Favorites list",
"other": "Other",
"download": "Download manage",
"setting": "Setting"
}

View File

@@ -0,0 +1,16 @@
{
"copy_title": " (Click copy)",
"volume": "Volume: ",
"pause": "Pause",
"play": "Play",
"next": "Next",
"playing": "Playing...",
"stop": "Stopped",
"end": "End",
"refresh_url": "URL expired, refreshing URL...",
"error": "Music loading error, switch to next song after 5 seconds",
"loading": "Loding...",
"buffering": "Buffering...",
"geting_url": "Getting link...",
"lyric_error": "Get lyric failed"
}

View File

@@ -0,0 +1,4 @@
{
"min": "Minimize",
"close": "Close"
}

View File

@@ -0,0 +1,6 @@
{
"btn_tip": "Tencent and Netease sources only support download 128k",
"lossless": "Lossless",
"high_quality": "High Quality",
"normal": "Normal"
}

View File

@@ -0,0 +1,7 @@
{
"tip": "{len} songs selected",
"tip2": "Select priority download quality",
"normal": "Normal",
"high_quality": "High-quality",
"lossless": "Lossless"
}

View File

@@ -0,0 +1,8 @@
{
"play": "Play",
"add": "Add",
"download": "Download",
"start": "Start",
"pause": "Pause",
"remove": "Remove"
}

View File

@@ -0,0 +1,5 @@
{
"title_first": "Add",
"title_last": "to...",
"btn_title": "Add the song to {name}"
}

View File

@@ -0,0 +1,4 @@
{
"title": "Add selected {num} songs to...",
"btn_title": "Add the song to {name}"
}

View File

@@ -0,0 +1,11 @@
{
"play": "Play",
"add_to": "Add to...",
"download": "Download",
"add": "add",
"start": "Start",
"pause": "Pause",
"file": "Locate file",
"search": "Search",
"remove": "Remove"
}

View File

@@ -0,0 +1,5 @@
{
"prev": "Prev",
"next": "Next",
"page": "Page {num}"
}

View File

@@ -0,0 +1,12 @@
{
"select_all": "Select all",
"unselect_all": "Unselect all",
"name": "Name",
"singer": "Singer",
"album": "Album",
"action": "Actions",
"time": "Interval",
"lossless": "SQ",
"high_quality": "HQ",
"loding_list": "List loading..."
}

View File

@@ -0,0 +1,3 @@
{
"default": "Default"
}

View File

@@ -0,0 +1,29 @@
{
"theme_green": "Green",
"theme_blue": "Blue",
"theme_yellow": "Yellow",
"theme_orange": "Orange",
"theme_red": "Red",
"theme_purple": "Purple",
"theme_grey": "Grey",
"theme_mid_autumn": "Mid-Autumn",
"theme_naruto": "Naruto",
"theme_happy_new_year": "New Year",
"source_kw": "Kuwo",
"source_kg": "Kugou",
"source_tx": "Tencent",
"source_wy": "Netease",
"source_mg": "Migu",
"source_bd": "Baidu",
"source_all": "Aggregated",
"source_alias_kw": "KW Music",
"source_alias_kg": "KG Music",
"source_alias_tx": "TX Music",
"source_alias_wy": "WY Music",
"source_alias_mg": "MG Music",
"source_alias_bd": "BD Music",
"source_alias_all": "Aggregated"
}

View File

@@ -0,0 +1,14 @@
{
"select_all": "Select all",
"unselect_all": "Unselect all",
"name": "Name",
"progress": "Progress",
"status": "Status",
"quality": "Quality",
"action": "Actions",
"all": "All task",
"runing": "Downloading",
"paused": "Paused",
"error": "Error",
"finished": "Finished"
}

View File

@@ -0,0 +1,11 @@
{
"select_all": "Select all",
"unselect_all": "Unselect all",
"name": "Name",
"singer": "Singer",
"album": "Album",
"action": "Actions",
"time": "Interval",
"loding_list": "Loading...",
"no_item": "The list turned out to be empty..."
}

View File

@@ -0,0 +1,16 @@
{
"select_all": "Select all",
"unselect_all": "Unselect all",
"name": "Name",
"singer": "Singer",
"album": "Album",
"action": "Actions",
"time": "Interval",
"lossless": "SQ",
"high_quality": "HQ",
"no_item": "Search what i think~~😉",
"hot_search": "Hot Search",
"history_search": "History Search",
"history_clear": "Clear Search History",
"history_remove": "Right click to remove this history"
}

View File

@@ -0,0 +1,120 @@
{
"basic": "Basic settings",
"basic_theme": "Theme",
"basic_animation_title": "Animation effect of pop-up layer",
"basic_animation": "Pop-up layer random animation",
"basic_source_title": "Select music source",
"basic_source_test": "test interface (almost all functions of the software are available)",
"basic_source_temp": "temp interface (some functions are not available, it is recommended to use this interface if the test interface is unavailable)",
"basic_source": "Music source",
"basic_sourcename_title": "Select the source name type",
"basic_sourcename_real": "Original",
"basic_sourcename_alias": "Alias",
"basic_sourcename": "Source Name",
"basic_window_size_title": "Set software window size",
"basic_window_size": "Window size",
"basic_window_size_smaller": "smaller",
"basic_window_size_small": "small",
"basic_window_size_medium": "medium",
"basic_window_size_big": "big",
"basic_window_size_larger": "Larger",
"basic_lang_title": "Software display language",
"basic_lang": "Language",
"play": "Playback settings",
"play_toggle_title": "Stop playing when the current song is finished without selecting any",
"play_toggle": "Music switching method",
"play_toggle_list_loop": "list loop",
"play_toggle_random": "random list",
"play_toggle_list": "play in order",
"play_toggle_single_loop": "single cycle",
"play_quality_title": "320K quality songs will be played preferentially when enabled",
"play_quality": "Prioritize high-quality music",
"play_task_bar_title": "Show current song playback progress on taskbar",
"play_task_bar": "Taskbar playback progress bar",
"play_mediaDevice_title": "Select the media device for sound output",
"play_mediaDevice": "Audio output",
"play_mediaDevice_refresh_btn_title": "Refresh audio device list",
"play_mediaDevice_refresh_btn": "refresh",
"search": "Search Settings",
"search_hot_title": "Show hot searches",
"search_hot": "Hot Search",
"search_history_title": "Show search history",
"search_history": "Search History",
"list": "List settings",
"list_source_title": "Whether to show song sources",
"list_source": "Whether to show song sources (only valid for my music category)",
"list_scroll_title": "Whether to remember playlist scroll bar position",
"list_scroll": "Remember list scroll position (only valid for my music category)",
"download": "Download settings",
"download_path_title": "Download song save path",
"download_path": "Save path",
"download_path_label": "current save path: ",
"download_path_open_label": "click to open the current path",
"download_path_change_btn": "change",
"download_name_title": "Naming when downloading songs",
"download_name": "File naming",
"download_embed_pic_title": "Whether to embed the cover in the audio file",
"download_embed_pic": "Cover embedding (only supports MP3 format)",
"download_lyric_title": "Whether to download lyrics files at the same time",
"download_lyric": "Lyrics download",
"download_name1": "name - singer",
"download_name2": "singer - name",
"download_name3": "name",
"download_select_save_path": "Select a song save path",
"network": "Network settings",
"network_proxy_title": "Proxy settings (disorderly setting software will not be able to network)",
"network_proxy_host": "host",
"network_proxy_port": "port",
"network_proxy_username": "username",
"network_proxy_password": "password",
"odc": "OCD settings",
"odc_clear_search_input": "Clear search box when leaving search interface",
"odc_clear_search_list": "Clear search list when leaving search interface",
"backup": "Backup and restore",
"backup_part": "Part of data",
"backup_part_import_list": "import list",
"backup_part_export_list": "export list",
"backup_part_import_setting": "import settings",
"backup_part_export_setting": "export settings",
"backup_all": "All data (settings and list)",
"backup_all_import": "import",
"backup_all_export": "export",
"backup_all_import_desc": "Select backup file",
"backup_all_export_desc": "Select backup save location",
"backup_part_import_setting_desc": "Choose a profile",
"backup_part_export_setting_desc": "Select a setting to save the location",
"backup_part_import_list_desc": "Select list file",
"backup_part_export_list_desc": "Select a setting to save the location",
"other": "Other",
"other_cache": "cache size (After clearing the cache, resources such as pictures will need to be downloaded again. Cleaning is not recommended. The software will dynamically manage the cache size based on disk space.)",
"other_cache_label": "used cache size: ",
"other_cache_label_title": "currently used cache",
"other_cache_clear_btn": "clear cache",
"update": "Software update",
"update_latest_label": "Latest version: ",
"update_unknown": "unknown",
"update_current_label": "Current version: ",
"update_downloading": "New version found and working hard to download, please wait...⏳",
"update_progress": "Download progress: ",
"update_latest": "The software is up to date, enjoy yourself~🥂",
"update_open_version_modal_btn": "open update window 🚀",
"update_checking": "checking for updates...",
"update_init": "initializing update...",
"about": "About lx-music-desktop",
"is_enable": "is enabel",
"is_show": "is show",
"click_open": "click to open",
"click_copy": "click to copy"
}

View File

@@ -0,0 +1,5 @@
{
"back": "Back",
"loding_list": "List loading...",
"loding_list_fail": "List loading failed"
}

View File

@@ -0,0 +1,27 @@
// http://kazupon.github.io/vue-i18n/en/messages.html
const requireLang = require.context(
'@/lang',
true,
/\.json$/,
)
const messages = {}
for (const file of requireLang.keys()) {
if (file === './index.js') continue
const path = file.replace(/(\.\/|\.json$)/g, '').split('/')
path.reduce((o, s, i) => {
if (o[s]) return o[s]
o[s] = i + 1 === path.length
? requireLang(file)
: {}
return o[s]
}, messages)
}
export default messages

View File

@@ -0,0 +1,19 @@
[
{
"name": "简体中文",
"locale": "cns",
"alternate": "zh-Hans",
"country": "cn",
"fallback": true
},
{
"name": "繁体中文",
"locale": "cnt",
"country": "cn"
},
{
"name": "English",
"locale": "en",
"country": "us"
}
]

View File

@@ -6,6 +6,7 @@ import './components'
// Plugins
import './plugins'
import i18n from './plugins/i18n'
import App from './App'
import router from './route'
@@ -15,15 +16,16 @@ import '../common/error'
sync(store, router)
if (!process.env.IS_WEB) {
// if (!process.env.IS_WEB) {
}
// }
Vue.config.productionTip = false
new Vue({
router,
store,
i18n,
el: '#root',
render: h => h(App),
})

View File

@@ -0,0 +1,22 @@
/**
* Vue i18n
*
* @library
*
* http://kazupon.github.io/vue-i18n/en/
*/
// Lib imports
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import messages from '@/lang'
Vue.use(VueI18n)
const i18n = window.i18n = new VueI18n({
locale: 'cns',
fallbackLocale: 'cns',
messages,
})
export default i18n

View File

@@ -10,8 +10,8 @@ export default {
}, (err, resp, body) => {
if (err) {
return ++retryNum > 3
? this.dispatch('getVersionInfo2').then(ver => resolve(ver)).catch(err => reject(err))
: this.dispatch('getVersionInfo', retryNum).then(ver => resolve(ver)).catch(err => reject(err))
? this.dispatch('getVersionInfo2').then(resolve).catch(reject)
: this.dispatch('getVersionInfo', retryNum).then(resolve).catch(reject)
}
resolve(body)
})
@@ -23,7 +23,9 @@ export default {
timeout: 20000,
}, (err, resp, body) => {
if (err) {
return ++retryNum > 3 ? reject() : this.dispatch('getVersionInfo2', retryNum).then(ver => resolve(ver)).catch(err => reject(err))
return ++retryNum > 3
? reject(err)
: this.dispatch('getVersionInfo2', retryNum).then(resolve).catch(reject)
}
resolve(body)
})

View File

@@ -11,7 +11,8 @@ export default {
}
},
source(state) {
return music.sources.find(s => s.id === state.setting.sourceId) || music.sources[0]
const source = music.sources.find(s => s.id === state.setting.sourceId) || music.sources[0]
return source
},
sources(state) {
return {
@@ -19,6 +20,16 @@ export default {
list: music.sources,
}
},
sourceNames(state) {
let prefix = 'store.state.source_'
if (state.setting.sourceNameType == 'alias') prefix += 'alias_'
const sources = {}
for (const source of music.sources) {
sources[source.id] = window.i18n.t(prefix + source.id)
}
sources.all = window.i18n.t(prefix + 'all')
return sources
},
userInfo(state) {
return state.userInfo
},
@@ -37,4 +48,7 @@ export default {
windowSizeList(state) {
return state.windowSizeList
},
windowSizeActive(state) {
return state.windowSizeList.find(i => i.id === state.setting.windowSizeId) || state.windowSizeList[0]
},
}

View File

@@ -126,14 +126,31 @@ const refreshUrl = function(commit, downloadInfo) {
getUrl(downloadInfo, true).then(result => {
commit('updateUrl', { downloadInfo, url: result.url })
commit('setStatusText', { downloadInfo, text: '链接刷新成功' })
dls[downloadInfo.key].refreshUrl(result.url)
dls[downloadInfo.key].start()
const dl = dls[downloadInfo.key]
if (!dl) return
dl.refreshUrl(result.url)
dl.start()
}).catch(err => {
console.log(err)
this.dispatch('download/startTask')
})
}
/**
* 删除文件
* @param {*} path
*/
const deleteFile = path => new Promise((resolve, reject) => {
fs.access(path, fs.constants.F_OK, err => {
if (err) return reject(err)
fs.unlink(path, err => {
if (err) return reject(err)
resolve()
})
})
})
// actions
const actions = {
createDownload({ state, rootState, commit }, { musicInfo, type }) {
@@ -210,10 +227,9 @@ const actions = {
console.log('on complate')
},
onError(err) {
// console.log(err.code, err.message)
commit('onError', downloadInfo)
// console.log(tryNum[downloadInfo.key])
if (++tryNum[downloadInfo.key] > 2) {
commit('onError', downloadInfo)
_this.dispatch('download/startTask')
return
}
@@ -226,9 +242,8 @@ const actions = {
}
},
onFail(response) {
commit('onError', downloadInfo)
if (++tryNum[downloadInfo.key] > 2) {
commit('onError', downloadInfo)
_this.dispatch('download/startTask')
return
}
@@ -282,7 +297,9 @@ const actions = {
}
commit('removeTask', index)
if (dls[info.key]) delete dls[info.key]
this.dispatch('download/startTask')
;(info.status != state.downloadStatus.COMPLETED ? deleteFile(info.filePath) : Promise.resolve()).finally(() => {
this.dispatch('download/startTask')
})
},
removeTaskMultiple({ commit, rootState, state }, list) {
list.forEach(item => {
@@ -310,7 +327,7 @@ const actions = {
// mitations
const mutations = {
addTask(state, downloadInfo) {
state.list.push(downloadInfo)
state.list.unshift(downloadInfo)
},
removeTask(state, index) {
state.list.splice(index, 1)

Some files were not shown because too many files have changed in this diff Show More