fixed error in selecting path and naming screenshot
This commit is contained in:
parent
8ab1dadf54
commit
01fdfcf420
1124
package-lock.json
generated
1124
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -4,7 +4,8 @@
|
|||
"description": "tool for documenting online harassment",
|
||||
"main": "main.js",
|
||||
"dependencies": {
|
||||
"electron": "^1.7.10"
|
||||
"electron": "^1.7.10",
|
||||
"eslint": "^4.15.0"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
const electron = require('electron');
|
||||
const remote = electron.remote;
|
||||
const desktopCapturer = electron.desktopCapturer;
|
||||
const electronScreen = electron.screen;
|
||||
const shell = electron.shell;
|
||||
const dialog = remote.dialog;
|
||||
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
|
@ -16,7 +18,12 @@ var screenshotPath = '';
|
|||
var caseName = '';
|
||||
|
||||
pathButton.addEventListener('click', function(event) {
|
||||
dialog.showSaveDialog(function(fileName) {
|
||||
dialog.showSaveDialog({
|
||||
filters: [
|
||||
{ name: 'png', extensions: ['png'] }
|
||||
]
|
||||
},
|
||||
function(fileName) {
|
||||
if (fileName === undefined) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user