UX: Config downloads without .txt extension (#314)

* refactor: change mime type in PeerViewModal.vue

* refactor: change download type in InterfaceView.vue
This commit is contained in:
Ryazanov Alexander Mihailovich 2024-10-09 23:32:32 +03:00 committed by GitHub
parent f22a7e4a2e
commit 386597e057
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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'

View File

@ -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'