Skip to content

Commit

Permalink
Swap to file-saver
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr committed Oct 13, 2024
1 parent 75124ca commit f88f676
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/Compile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import { ref } from 'vue'
import { useFetch, useIntervalFn } from '@vueuse/core'
import { useKeymapState } from '@/composables/useKeymapState'
// import { saveAs } from 'file-saver';
import { saveAs } from 'file-saver';
const { keymap } = useKeymapState()
Expand All @@ -41,9 +41,7 @@ const { pause, resume } = useIntervalFn(async () => {
if(data.value.status === 'finished') {
abort();
// TODO: betterer firmware download
// saveAs(`https://api.qmk.fm/v1/compile/${jobID.value}/download`, data.value.result.firmware_filename);
window.open(`https://api.qmk.fm/v1/compile/${jobID.value}/download`, '_blank')
saveAs(`https://api.qmk.fm/v1/compile/${jobID.value}/download`, data.value.result.firmware_filename);
}
}, 2500, {immediate: false})
Expand Down

0 comments on commit f88f676

Please sign in to comment.