Commit 0af7b6ca authored by thatanimeweirdo's avatar thatanimeweirdo

Merge branch 'vue-rewrite-dragndrop' into 'vue-rewrite'

re-added drag and drop install

See merge request !28
parents e947eb47 1cc47a4c
<template>
<section class="section-library">
<section class="section-library" @dragover.prevent @drop.stop.prevent="drop()">
<SongRow :title="$t('library.installed.header')">
<template v-slot:controls>
<div class="item"></div>
......@@ -160,6 +160,17 @@
dialog.showOpenDialog({ title: "Open Backup", properties: ['openFile', 'multiSelections'], filters: [{"name": "Backup Archive", "extensions": ["zip"]}] }).then(result => {
if(!result.canceled) {
result.filePaths.forEach((rawFilePath) => {
this.extract(rawFilePath)
});
}
});
},
drop: function(e) {
event.dataTransfer.files.forEach((file) => {
this.extract(file.path);
});
},
extract: function(rawFilePath) {
let filePath = glob.sync(rawFilePath);
if(filePath.length > 0) {
let srxdControl = new SRXD();
......@@ -181,9 +192,6 @@
console.error(error);
});
}
});
}
});
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment