Commit 516b0d0f authored by SpinShare's avatar SpinShare

make all overlays closable

parent 87f4a9dd
......@@ -185,8 +185,7 @@
}
},
closeOverlays: function() {
this.$data.showUpdateOverlay = false;
this.$data.showDownloadOverlay = false;
ipcRenderer.send("overlays-close");
}
}
}
......
......@@ -158,6 +158,10 @@ ipcMain.on("getDeeplink", (event) => {
});
});
ipcMain.on("overlays-close", () => {
win.webContents.send("overlays-close");
});
function download(url, fileName, cb) {
let dest = path.join(app.getPath('temp'), fileName + ".zip");
let file = fs.createWriteStream(dest);
......
......@@ -17,7 +17,8 @@
</template>
<script>
import { remote } from 'electron';
import { remote, ipcRenderer } from 'electron';
import { path } from 'path';
const { shell } = remote;
export default {
......@@ -25,6 +26,11 @@
props: [
'deleteFiles'
],
mounted: function() {
ipcRenderer.on("overlays-close", () => {
this.close();
});
},
methods: {
confirm() {
this.$parent.$emit('deleteConfirm');
......@@ -50,7 +56,7 @@
align-items: center;
& .delete-content {
width: 500px;
width: 700px;
background: #212629;
border-radius: 6px;
position: relative;
......@@ -71,6 +77,8 @@
}
& .delete-files {
font-size: 12px;
max-height: 50vh;
overflow-y: auto;
& span {
display: block;
......
......@@ -33,7 +33,10 @@
props: [
'downloadQueue'
],
mounted: function(){
mounted: function() {
ipcRenderer.on("overlays-close", () => {
this.close();
});
ipcRenderer.on('downloadProgress', (event, data) => {
this.$data.downloadProgress = data
});
......
......@@ -42,6 +42,11 @@
'hasExpertDifficulty',
'hasXDDifficulty'
],
mounted: function() {
ipcRenderer.on("overlays-close", () => {
this.close();
});
},
methods: {
play: function(difficulty) {
shell.openExternal('steam://run/1058830//play "' + this.$props.fileReference + '.srtb" difficulty ' + difficulty);
......
......@@ -33,6 +33,11 @@
props: [
'isAvailable'
],
mounted: function() {
ipcRenderer.on("overlays-close", () => {
this.close();
});
},
methods: {
OpenAndHideOverlay: function() {
// Open Update
......
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