Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
1.11.1 changing fileSytem permissions to optional
Browse files Browse the repository at this point in the history
  • Loading branch information
amougel committed Apr 17, 2018
1 parent 9e20715 commit 8e963f1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
1.11.1
===
- Changed the filesystem permissions to optional

1.11.0
===
- Removed wrongly displayed "hardware" menu in settings
Expand Down
11 changes: 6 additions & 5 deletions app/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "__MSG_application_name__"
description: "__MSG_application_small_description__"
version: "1.11.0"
version: "1.11.1"
manifest_version: 2
minimum_chrome_version: "50"
default_locale: "en"
Expand All @@ -23,10 +23,7 @@ permissions:
- "notifications"
- "usb"
- "hid"
- fileSystem:
- "write"
- "retainEntries"
- "directory"
- "fileSystem"
-
usbDevices:
-
Expand Down Expand Up @@ -56,6 +53,10 @@ permissions:

optional_permissions:
- "videoCapture"
-
fileSystem:
- "write"


externally_connectable:
ids:
Expand Down
17 changes: 10 additions & 7 deletions app/src/utils/logger.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,16 @@ class @ledger.utils.Logger
callback?(name: name, url: zip.url())

@downloadLogsToZip: ->
@exportLogsToZip (data) ->
chrome.fileSystem.chooseEntry {"type": "saveFile", "suggestedName": data.name},
(file) =>
file.createWriter (writer) =>
writer.onwriteend = (e) =>
console.log("logs saved")
writer.write(data.zip)
ledger.managers.permissions.request {permissions: [
"fileSystem.write"
]}, (granted) =>
@exportLogsToZip (data) ->
chrome.fileSystem.chooseEntry {"type": "saveFile", "suggestedName": data.name},
(file) =>
file.createWriter (writer) =>
writer.onwriteend = (e) =>
console.log("logs saved")
writer.write(data.zip)

@downloadLogsWithLink: ->
@exportLogsWithLink (data) ->
Expand Down

0 comments on commit 8e963f1

Please sign in to comment.