Skip to content

Commit

Permalink
UX: Config downloads without .txt extension (#314)
Browse files Browse the repository at this point in the history
* refactor: change mime type in PeerViewModal.vue

* refactor: change download type in InterfaceView.vue
  • Loading branch information
alryaz authored Oct 9, 2024
1 parent f22a7e4 commit 386597e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/PeerViewModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function download() {
let text = configString.value
let element = document.createElement('a')
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text))
element.setAttribute('href', 'data:application/octet-stream;charset=utf-8,' + encodeURIComponent(text))
element.setAttribute('download', filename)
element.style.display = 'none'
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/InterfaceView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function download() {
let text = interfaces.configuration
let element = document.createElement('a')
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text))
element.setAttribute('href', 'data:application/octet-stream;charset=utf-8,' + encodeURIComponent(text))
element.setAttribute('download', filename)
element.style.display = 'none'
Expand Down

0 comments on commit 386597e

Please sign in to comment.