mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-15 17:07:29 +08:00
feat: mac 添加权限
This commit is contained in:
Vendored
+2
-5
@@ -4,6 +4,7 @@ interface API {
|
||||
minimize: () => void;
|
||||
maximize: () => void;
|
||||
close: () => void;
|
||||
quitApp: () => void;
|
||||
dragStart: (data: any) => void;
|
||||
miniTray: () => void;
|
||||
miniWindow: () => void;
|
||||
@@ -25,11 +26,7 @@ interface API {
|
||||
importLxMusicScript: () => Promise<{ name: string; content: string } | null>;
|
||||
invoke: (channel: string, ...args: any[]) => Promise<any>;
|
||||
getSearchSuggestions: (keyword: string) => Promise<any>;
|
||||
lxMusicHttpRequest: (request: {
|
||||
url: string;
|
||||
options: any;
|
||||
requestId: string;
|
||||
}) => Promise<any>;
|
||||
lxMusicHttpRequest: (request: { url: string; options: any; requestId: string }) => Promise<any>;
|
||||
lxMusicHttpCancel: (requestId: string) => Promise<void>;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ const api = {
|
||||
minimize: () => ipcRenderer.send('minimize-window'),
|
||||
maximize: () => ipcRenderer.send('maximize-window'),
|
||||
close: () => ipcRenderer.send('close-window'),
|
||||
quitApp: () => ipcRenderer.send('quit-app'),
|
||||
dragStart: (data) => ipcRenderer.send('drag-start', data),
|
||||
miniTray: () => ipcRenderer.send('mini-tray'),
|
||||
miniWindow: () => ipcRenderer.send('mini-window'),
|
||||
@@ -61,11 +62,8 @@ const api = {
|
||||
getSearchSuggestions: (keyword: string) => ipcRenderer.invoke('get-search-suggestions', keyword),
|
||||
|
||||
// 落雪音乐 HTTP 请求(绕过 CORS)
|
||||
lxMusicHttpRequest: (request: {
|
||||
url: string;
|
||||
options: any;
|
||||
requestId: string;
|
||||
}) => ipcRenderer.invoke('lx-music-http-request', request),
|
||||
lxMusicHttpRequest: (request: { url: string; options: any; requestId: string }) =>
|
||||
ipcRenderer.invoke('lx-music-http-request', request),
|
||||
|
||||
lxMusicHttpCancel: (requestId: string) => ipcRenderer.invoke('lx-music-http-cancel', requestId)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user