mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-23 23:57:22 +08:00
✨ feat: 添加设置页面 可配置代理开关
This commit is contained in:
@@ -13,6 +13,7 @@ interface State {
|
||||
user: any
|
||||
playList: SongResult[]
|
||||
playListIndex: number
|
||||
setData: any
|
||||
}
|
||||
|
||||
const state: State = {
|
||||
@@ -24,8 +25,11 @@ const state: State = {
|
||||
user: null,
|
||||
playList: [],
|
||||
playListIndex: 0,
|
||||
setData: null,
|
||||
}
|
||||
|
||||
const windowData = window as any
|
||||
|
||||
const mutations = {
|
||||
setMenus(state: State, menus: any[]) {
|
||||
state.menus = menus
|
||||
@@ -62,6 +66,13 @@ const mutations = {
|
||||
(state.playListIndex - 1 + state.playList.length) % state.playList.length
|
||||
await updatePlayMusic(state)
|
||||
},
|
||||
async setSetData(state: State, setData: any) {
|
||||
state.setData = setData
|
||||
windowData.electron.ipcRenderer.setStoreValue(
|
||||
'set',
|
||||
JSON.parse(JSON.stringify(setData))
|
||||
)
|
||||
},
|
||||
}
|
||||
|
||||
const getSongUrl = async (id: number) => {
|
||||
|
||||
Reference in New Issue
Block a user