mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Migrate some easy components to ES6
This commit is contained in:
parent
37ebb772e8
commit
f3b5c804a3
5 changed files with 256 additions and 267 deletions
|
@ -1,18 +1,14 @@
|
|||
define(['multi-download'], function (multiDownload) {
|
||||
'use strict';
|
||||
import multiDownload from "multi-download"
|
||||
|
||||
return {
|
||||
download: function (items) {
|
||||
export function download(items) {
|
||||
|
||||
if (window.NativeShell) {
|
||||
items.map(function (item) {
|
||||
window.NativeShell.downloadFile(item.url);
|
||||
});
|
||||
} else {
|
||||
multiDownload(items.map(function (item) {
|
||||
return item.url;
|
||||
}));
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
if (window.NativeShell) {
|
||||
items.map(function (item) {
|
||||
window.NativeShell.downloadFile(item.url);
|
||||
});
|
||||
} else {
|
||||
multiDownload(items.map(function (item) {
|
||||
return item.url;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue