mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-18 08:44:16 +08:00
feat: 增加 getFileIcon api
This commit is contained in:
@@ -110,7 +110,7 @@ class API {
|
||||
}
|
||||
|
||||
public showOpenDialog({ data }, window) {
|
||||
dialog.showOpenDialogSync(window, data);
|
||||
return dialog.showOpenDialogSync(window, data);
|
||||
}
|
||||
|
||||
public setExpendHeight({ data: height }, window: BrowserWindow, e) {
|
||||
@@ -307,6 +307,10 @@ class API {
|
||||
shell.showItemInFolder(data.path);
|
||||
return true;
|
||||
}
|
||||
public async getFileIcon({ data }) {
|
||||
const nativeImage = await app.getFileIcon(data.path, { size: 'normal' });
|
||||
return nativeImage.toDataURL();
|
||||
}
|
||||
|
||||
public shellBeep() {
|
||||
shell.beep();
|
||||
|
||||
Reference in New Issue
Block a user