Skip to content

Commit

Permalink
added route for opening folder selection, removed build tasks for x86
Browse files Browse the repository at this point in the history
  • Loading branch information
Eik-S committed Jan 29, 2019
1 parent 4385ff7 commit 3356136
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
6 changes: 6 additions & 0 deletions HTTPKoaServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ router.get('/backup/location', (ctx) => {
ctx.status = 200
})

router.get('/backup/open-change-location', (ctx) => {
openBackupFolderSelectDialog()
ctx.body = 'success'
ctx.status = 200
})

// putting new files
router.put('/backup/:collection/:timestamp', (ctx) => {
const filename = ctx.params.timestamp
Expand Down
2 changes: 2 additions & 0 deletions folder-select.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,6 @@ input:focus {
right: 15px;
font-weight: 800;
font-size: 18px;
color: #424242;
cursor: pointer;
}
6 changes: 5 additions & 1 deletion folder-select.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<body>
<img src="./img/icon_128x128.png">
<p class="info">Please choose a folder for your local backups.</p>
<button class="cancel" id="cancelButton">X</button>
<div class="select-container">
<button class="cancel">X</button>
<button class="folder-select-bg">Select Folder</button>
<input type="file" id="folderSelect" nwdirectory directory>
</div>
Expand All @@ -20,6 +20,7 @@
var folderSelect = document.getElementById('folderSelect')
var applyButton = document.getElementById('applyButton')
var pathPara = document.getElementById('pathPara')
var cancelButton = document.getElementById('cancelButton')

async function apply() {
const path = folderSelect.value
Expand Down Expand Up @@ -47,6 +48,9 @@
applyButton.disabled = true
}
})
cancelButton.addEventListener('click', () => {
close()
})
</script>
</body>
</html>
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@
"mkdirp": "^0.5.1"
},
"build": {
"nwVersion": "0.35.5"
"nwVersion": "0.35.5",
"packed": true,
"targets": [
"zip"
]
},
"scripts": {
"dist": "build --tasks win-x86,win-x64,linux-x86,linux-x64,mac-x64 --mirror https://dl.nwjs.io/ ."
"dist": "build --tasks win-x64,linux-x64,mac-x64 --mirror https://dl.nwjs.io/ . --concurrent"
},
"devDependencies": {
"nwjs-builder-phoenix": "^1.15.0"
}
}

0 comments on commit 3356136

Please sign in to comment.