mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: updates
This commit is contained in:
parent
f340a90117
commit
cec4c5909d
50 changed files with 1304 additions and 207 deletions
|
|
@ -1,4 +1,8 @@
|
|||
import { FetchArtistAlbumsResponse, FetchArtistResponse } from './api/Artist'
|
||||
import {
|
||||
FetchArtistAlbumsResponse,
|
||||
FetchArtistResponse,
|
||||
FetchSimilarArtistsResponse,
|
||||
} from './api/Artist'
|
||||
import { FetchAlbumResponse } from './api/Album'
|
||||
import {
|
||||
FetchUserAccountResponse,
|
||||
|
|
@ -32,6 +36,7 @@ export const enum APIs {
|
|||
UserAlbums = 'album/sublist',
|
||||
UserArtists = 'artist/sublist',
|
||||
UserPlaylist = 'user/playlist',
|
||||
SimilarArtist = 'simi/artist',
|
||||
|
||||
// not netease api
|
||||
CoverColor = 'cover_color',
|
||||
|
|
@ -53,6 +58,7 @@ export interface APIsParams {
|
|||
[APIs.UserAlbums]: void
|
||||
[APIs.UserArtists]: void
|
||||
[APIs.UserPlaylist]: void
|
||||
[APIs.SimilarArtist]: { id: number }
|
||||
[APIs.CoverColor]: { id: number }
|
||||
[APIs.VideoCover]: { id: number }
|
||||
}
|
||||
|
|
@ -72,6 +78,7 @@ export interface APIsResponse {
|
|||
[APIs.UserAlbums]: FetchUserAlbumsResponse
|
||||
[APIs.UserArtists]: FetchUserArtistsResponse
|
||||
[APIs.UserPlaylist]: FetchUserPlaylistsResponse
|
||||
[APIs.SimilarArtist]: FetchSimilarArtistsResponse
|
||||
[APIs.CoverColor]: string | undefined
|
||||
[APIs.VideoCover]: string | undefined
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
export enum ArtistApiNames {
|
||||
FetchArtist = 'fetchArtist',
|
||||
FetchArtistAlbums = 'fetchArtistAlbums',
|
||||
FetchSimilarArtists = 'fetchSimilarArtists',
|
||||
}
|
||||
|
||||
// 歌手详情
|
||||
|
|
@ -26,3 +27,12 @@ export interface FetchArtistAlbumsResponse {
|
|||
more: boolean
|
||||
artist: Artist
|
||||
}
|
||||
|
||||
// 获取相似歌手
|
||||
export interface FetchSimilarArtistsParams {
|
||||
id: number
|
||||
}
|
||||
export interface FetchSimilarArtistsResponse {
|
||||
code: number
|
||||
artists: Artist[]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
export interface Store {
|
||||
uiStates: {
|
||||
loginPhoneCountryCode: string
|
||||
showLyricPanel: boolean
|
||||
showLoginPanel: boolean
|
||||
}
|
||||
persistedUiStates: {
|
||||
loginPhoneCountryCode: string
|
||||
loginType: 'phone' | 'email' | 'qrCode'
|
||||
}
|
||||
settings: {
|
||||
showSidebar: boolean
|
||||
|
|
@ -29,8 +33,12 @@ export interface Store {
|
|||
|
||||
export const initialState: Store = {
|
||||
uiStates: {
|
||||
loginPhoneCountryCode: '+86',
|
||||
showLyricPanel: false,
|
||||
showLoginPanel: false,
|
||||
},
|
||||
persistedUiStates: {
|
||||
loginPhoneCountryCode: '+86',
|
||||
loginType: 'qrCode',
|
||||
},
|
||||
settings: {
|
||||
showSidebar: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue