mirror of
https://github.com/h44z/wg-portal
synced 2025-02-26 05:49:14 +00:00
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:
parent
f22a7e4a2e
commit
386597e057
@ -100,7 +100,7 @@ function download() {
|
|||||||
let text = configString.value
|
let text = configString.value
|
||||||
|
|
||||||
let element = document.createElement('a')
|
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.setAttribute('download', filename)
|
||||||
|
|
||||||
element.style.display = 'none'
|
element.style.display = 'none'
|
||||||
|
@ -52,7 +52,7 @@ async function download() {
|
|||||||
let text = interfaces.configuration
|
let text = interfaces.configuration
|
||||||
|
|
||||||
let element = document.createElement('a')
|
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.setAttribute('download', filename)
|
||||||
|
|
||||||
element.style.display = 'none'
|
element.style.display = 'none'
|
||||||
|
Loading…
Reference in New Issue
Block a user