diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cf9ac4..11100d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ +## v0.6.0 + +### ✨ 新功能 +- **亮色主题**:新增浅色外观模式,支持深色/浅色切换,7 种主题色各有对应亮色变体 +- **封面主色背景**:全屏漫游抽屉背景自动提取封面图主色调,沉浸感更强;抽屉打开时底部播放栏也跟随封面主色,视觉融为一体 +- **发现页重做**:支持多类型搜索(歌曲/歌手/专辑),输入时自动显示搜索建议,搜索历史和热门搜索 +- **漫游增强**:全屏抽屉支持歌词/评论切换,播放栏新增减少推荐按钮 +- **减少推荐**:FM 模式下可标记"不推荐这首歌"或"不推荐这个歌手",后续不会再收到类似推荐 +- **列表风格统一**:正在播放的歌曲序号位置显示跳动动画,鼠标悬停显示播放图标;红心/下载等图标统一使用图标库 + +### 🐛 修复 +- 专辑页艺术家过多时窗口缩小会竖排显示,现在支持自动换行 +- FM 播放时退出登录后首页仍可点击下一首 +- 本地音乐播放时缓冲进度条未重置 +- 亮色主题下多处文字看不见 +- 退出 FM 模式时状态未正确清理 +- 暗色模式下关闭抽屉时播放栏短暂闪烁亮色 + +### 🎨 变更 +- 移除播放列表按钮上的数字角标 +- 主页每日推荐和 FM 卡片标题固定为白色,不随主题变化 + +### 🧹 清理 +- 内部代码优化和冗余清理 + + ## v0.5.1 ### 🐛 修复 @@ -113,4 +139,4 @@ ## v0.1.0 -Nekosonic 是一款基于 Tauri 2 + Rust 的跨平台桌面音乐播放器,音源主要来自网易云音乐,开箱即用。 \ No newline at end of file +Nekosonic 是一款基于 Tauri 2 + Rust 的跨平台桌面音乐播放器,音源主要来自网易云音乐,开箱即用。 diff --git a/package-lock.json b/package-lock.json index 440c14d..8c36c41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,14 @@ { "name": "nekosonic", - "version": "0.3.0", + "version": "0.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nekosonic", - "version": "0.3.0", + "version": "0.5.1", "dependencies": { + "@iconify-json/lucide": "^1.2.110", "@tauri-apps/api": "^2", "@tauri-apps/plugin-dialog": "^2.7.1", "@tauri-apps/plugin-global-shortcut": "^2.3.1", @@ -22,6 +23,7 @@ "vue-router": "^4.6.4" }, "devDependencies": { + "@iconify/utils": "^3.1.3", "@tailwindcss/vite": "^4.2.4", "@tauri-apps/cli": "^2", "@types/node": "^25.6.0", @@ -538,23 +540,31 @@ "node": ">=18" } }, + "node_modules/@iconify-json/lucide": { + "version": "1.2.110", + "resolved": "https://registry.npmmirror.com/@iconify-json/lucide/-/lucide-1.2.110.tgz", + "integrity": "sha512-rLeHqnZZBxZbprbVwf6uY7HB5GkGVgvT9VujhjvaUEqFDLKZON6zR8K1f8uD1brBwf5TJ0TIvvW8mz5u2XJU+w==", + "license": "ISC", + "dependencies": { + "@iconify/types": "*" + } + }, "node_modules/@iconify/types": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/@iconify/types/-/types-2.0.0.tgz", "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==", - "dev": true, "license": "MIT" }, "node_modules/@iconify/utils": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/@iconify/utils/-/utils-3.1.1.tgz", - "integrity": "sha512-MwzoDtw9rO1x+qfgLTV/IVXsHDBqeYZoMIQC8SfxfYSlaSUG+oWiAcoiB1yajAda6mqblm4/1/w2E8tRu7a7Tw==", + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/@iconify/utils/-/utils-3.1.3.tgz", + "integrity": "sha512-LPKOXPn/zV+zis1oOfGWogaXVpqUybF3ZS6SCZIsz8vg0ivVp9+fVqyYB7xq0aiST/VhUQYGO1qo6uoYSiEJqw==", "dev": true, "license": "MIT", "dependencies": { "@antfu/install-pkg": "^1.1.0", "@iconify/types": "^2.0.0", - "mlly": "^1.8.2" + "import-meta-resolve": "^4.2.0" } }, "node_modules/@jridgewell/gen-mapping": { @@ -2584,6 +2594,17 @@ "node": ">= 4" } }, + "node_modules/import-meta-resolve": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz", + "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", diff --git a/package.json b/package.json index c05d156..e57e594 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nekosonic", "private": true, - "version": "0.5.1", + "version": "0.6.0", "type": "module", "scripts": { "dev": "vite", @@ -10,6 +10,7 @@ "tauri": "tauri" }, "dependencies": { + "@iconify-json/lucide": "^1.2.110", "@tauri-apps/api": "^2", "@tauri-apps/plugin-dialog": "^2.7.1", "@tauri-apps/plugin-global-shortcut": "^2.3.1", @@ -24,6 +25,7 @@ "vue-router": "^4.6.4" }, "devDependencies": { + "@iconify/utils": "^3.1.3", "@tailwindcss/vite": "^4.2.4", "@tauri-apps/cli": "^2", "@types/node": "^25.6.0", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 2773ed8..fa3fc0e 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4,7 +4,7 @@ version = 4 [[package]] name = "Nekosonic" -version = "0.5.1" +version = "0.6.0" dependencies = [ "base64 0.22.1", "cpal", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 36ee1f5..5e0fdde 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "Nekosonic" -version = "0.5.1" +version = "0.6.0" description = "A Simple music app" authors = ["atdunbg"] edition = "2021" diff --git a/src-tauri/src/api.rs b/src-tauri/src/api.rs index 1da235d..9f9bd5e 100644 --- a/src-tauri/src/api.rs +++ b/src-tauri/src/api.rs @@ -123,6 +123,20 @@ impl ApiController { #[derive(Deserialize)] pub struct SearchQuery { pub keyword: String } +/// 多类型搜索查询参数 +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct CloudSearchQuery { + pub keyword: String, + pub search_type: Option, + pub limit: Option, + pub offset: Option, +} + +/// 搜索建议查询参数 +#[derive(Deserialize)] +pub struct SearchSuggestQuery { pub keyword: String } + /// 手机号登录查询参数 #[derive(Deserialize)] pub struct LoginQuery { pub phone: String, pub password: String } @@ -137,6 +151,23 @@ pub async fn search_songs(query: SearchQuery, state: State<'_, ApiController>) - api_call!(state, cloudsearch, params: [("keywords", &query.keyword), ("type", "1"), ("limit", "30")]) } +/// 多类型搜索(歌曲/歌手/专辑) +#[tauri::command] +pub async fn cloudsearch(query: CloudSearchQuery, state: State<'_, ApiController>) -> Result { + api_call!(state, cloudsearch, params: [ + ("keywords", &query.keyword), + ("type", &query.search_type.unwrap_or(1).to_string()), + ("limit", &query.limit.unwrap_or(30).to_string()), + ("offset", &query.offset.unwrap_or(0).to_string()) + ]) +} + +/// 搜索建议 +#[tauri::command] +pub async fn search_suggest(query: SearchSuggestQuery, state: State<'_, ApiController>) -> Result { + api_call!(state, search_suggest, params: [("keywords", &query.keyword)]) +} + /// 获取热搜词列表 #[tauri::command] pub async fn get_hot_search(state: State<'_, ApiController>) -> Result { @@ -312,6 +343,42 @@ pub async fn recommend_resource(state: State<'_, ApiController>) -> Result, + pub sub_mode: Option, + pub limit: Option, +} + +/// 私人漫游(带模式) +#[tauri::command] +pub async fn personal_fm_mode(query: PersonalFmModeQuery, state: State<'_, ApiController>) -> Result { + api_call!(state, personal_fm_mode, params: [ + ("mode", query.mode.as_deref().unwrap_or("DEFAULT")), + ("submode", query.sub_mode.as_deref().unwrap_or("")), + ("limit", &query.limit.unwrap_or(3).to_string()) + ]) +} + +/// FM 不喜欢查询参数 +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct FmTrashQuery { + pub id: u64, + pub time: Option, +} + +/// FM 不喜欢(减少推荐) +#[tauri::command] +pub async fn fm_trash(query: FmTrashQuery, state: State<'_, ApiController>) -> Result { + api_call!(state, fm_trash, params: [ + ("id", &query.id.to_string()), + ("time", &query.time.unwrap_or(25).to_string()) + ]) +} + /// 获取私人漫游歌曲 #[tauri::command] pub async fn personal_fm(state: State<'_, ApiController>) -> Result { diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 0abe0d9..9721492 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -137,6 +137,8 @@ pub fn run() { api::logout, api::search_songs, + api::cloudsearch, + api::search_suggest, api::get_song_url, api::get_hot_search, api::get_playlist_detail, @@ -145,6 +147,8 @@ pub fn run() { api::recommend_resource, api::recommend_songs, api::personal_fm, + api::personal_fm_mode, + api::fm_trash, api::scrobble, api::get_song_detail, api::get_qr_key, diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 085732b..5b26e80 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "Nekosonic", - "version": "0.5.1", + "version": "0.6.0", "identifier": "com.atdunbg.Nekosonic", "build": { "beforeDevCommand": "npm run dev", diff --git a/src/App.vue b/src/App.vue index c8caffa..e0c4ba6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -16,23 +16,24 @@