mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-06 20:02:38 +00:00
update
This commit is contained in:
parent
444ae4d71c
commit
19783d8a9f
5 changed files with 44 additions and 1 deletions
|
@ -144,6 +144,7 @@ export default {
|
|||
'menu.firmware': 'Firmware Store',
|
||||
'menu.channel': 'Channel Share',
|
||||
'global.use': 'Use',
|
||||
'global.download': 'Download',
|
||||
'tool.ssbpatch': 'LOSEHU S Firmware SI4732 SSB Patch',
|
||||
'tool.writessbpatch': 'SSB Patch Write',
|
||||
'global.login': 'Login',
|
||||
|
|
|
@ -144,6 +144,7 @@ export default {
|
|||
'menu.firmware': '固件市场',
|
||||
'menu.channel': '信道分享',
|
||||
'global.use': '使用',
|
||||
'global.download': '下载',
|
||||
'tool.ssbpatch': 'LOSEHU S 版固件 SI4732 单边带补丁',
|
||||
'tool.writessbpatch': '写入单边带补丁',
|
||||
'global.login': '登录',
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
</a-list-item-meta>
|
||||
<template #actions>
|
||||
<a-link @click="onStar(item.id)">👍</a-link>
|
||||
<a-link @click="iDownload('https://k6.vicicode.cn/wsapi/download?id=' + item.id, item.title)">{{$t('global.download')}}</a-link>
|
||||
<a-link @click="useFirmware('https://k6.vicicode.cn/wsapi/download?id=' + item.id)">{{$t('global.use')}}</a-link>
|
||||
</template>
|
||||
</a-list-item>
|
||||
|
@ -210,6 +211,18 @@
|
|||
});
|
||||
}
|
||||
|
||||
const iDownload = (url: any, name: any) => {
|
||||
fetch(url).then(e=>e.blob()).then(blob=>{
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = name + '.xlsx';
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
</a-list-item-meta>
|
||||
<template #actions>
|
||||
<a-link @click="onStar(item.id)">👍</a-link>
|
||||
<a-link @click="iDownload('https://k6.vicicode.cn/wsapi/download?id=' + item.id, item.title)">{{$t('global.download')}}</a-link>
|
||||
<a-link @click="useFirmware('https://k6.vicicode.cn/wsapi/download?id=' + item.id + '&n=/' + item.title)">{{$t('global.use')}}</a-link>
|
||||
</template>
|
||||
</a-list-item>
|
||||
|
@ -210,6 +211,18 @@
|
|||
});
|
||||
}
|
||||
|
||||
const iDownload = (url: any, name: any) => {
|
||||
fetch(url).then(e=>e.blob()).then(blob=>{
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = name;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
<a-radio v-for="subItem in state.disMatrix[item]" :value="subItem[0]"
|
||||
:disabled="subItem[1]">{{ state.disName[item].get(subItem[0]) }}</a-radio>
|
||||
</a-radio-group>
|
||||
<a-button type="primary" @click="useFirmware">{{ $t('diy.generate') }}</a-button>
|
||||
<div>
|
||||
<a-button type="primary" @click="useFirmware">{{ $t('diy.generate') }}</a-button>
|
||||
<a-link @click="iDownload">{{$t('global.download')}}</a-link>
|
||||
</div>
|
||||
</t-space>
|
||||
</a-card>
|
||||
</a-col>
|
||||
|
@ -36,6 +39,18 @@ const useFirmware = () => {
|
|||
});
|
||||
}
|
||||
|
||||
const iDownload = () => {
|
||||
fetch('https://k6.vicicode.cn/diyapi/LOSEHU' + state.flag.join('') + '.bin?v=' + (new Date()).getTime()).then(e=>e.blob()).then(blob=>{
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = "LOSEHU-CUSTOM-" + state.flag.join('') + ".bin";
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
})
|
||||
}
|
||||
|
||||
const state: {
|
||||
versions: any,
|
||||
flag: any,
|
||||
|
|
Loading…
Reference in a new issue