mirror of
https://github.com/HolographicHat/Yae.git
synced 2025-12-14 10:28:15 +08:00
fix crash when appcenter error
This commit is contained in:
@@ -57,7 +57,6 @@ const device = (() => {
|
|||||||
|
|
||||||
const upload = () => {
|
const upload = () => {
|
||||||
if (queue.length > 0) {
|
if (queue.length > 0) {
|
||||||
try {
|
|
||||||
const data = JSON.stringify({ "logs": queue })
|
const data = JSON.stringify({ "logs": queue })
|
||||||
axios.post("https://in.appcenter.ms/logs?api-version=1.0.0", data,{
|
axios.post("https://in.appcenter.ms/logs?api-version=1.0.0", data,{
|
||||||
headers: {
|
headers: {
|
||||||
@@ -66,8 +65,7 @@ const upload = () => {
|
|||||||
}
|
}
|
||||||
}).then(_ => {
|
}).then(_ => {
|
||||||
queue.length = 0
|
queue.length = 0
|
||||||
})
|
}).catch(_ => {})
|
||||||
} catch (e) {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,8 +60,12 @@ const exportToCocogoat = async proto => {
|
|||||||
date: getDate(finishTimestamp)
|
date: getDate(finishTimestamp)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
exec("clip").stdin.end(JSON.stringify(out,null,2))
|
const ts = Date.now()
|
||||||
console.log("导出内容已复制到剪贴板")
|
const json = JSON.stringify(out,null,2)
|
||||||
|
exec("clip").stdin.end(json)
|
||||||
|
const fp = `./export-${ts}-cocogoat.json`
|
||||||
|
fs.writeFileSync(fp, json)
|
||||||
|
console.log(`导出内容已复制到剪贴板,若拷贝失败请手动复制 export-${ts}-cocogoat.json 文件内容`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const exportToCsv = async proto => {
|
const exportToCsv = async proto => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const version = {
|
const version = {
|
||||||
code: 2,
|
code: 3,
|
||||||
name: "1.0.1"
|
name: "1.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { version }
|
module.exports = { version }
|
||||||
|
|||||||
Reference in New Issue
Block a user