Feature scan info (#53)

* pref: migrate fetch model info to end back

* fix(download): can't select model type

* feat: add scan model info

* feat: add trigger button in setting

* feat: add printing logs

* chore: add explanation of scan model info
This commit is contained in:
Hayden
2024-11-21 22:04:39 +08:00
committed by GitHub
parent 6ae7e1835f
commit 659637c6e0
20 changed files with 921 additions and 428 deletions

View File

@@ -26,14 +26,3 @@ export const bytesToSize = (
export const formatDate = (date: number | string | Date) => {
return dayjs(date).format('YYYY-MM-DD HH:mm:ss')
}
export const previewUrlToFile = async (url: string) => {
return fetch(url)
.then((res) => res.blob())
.then((blob) => {
const type = blob.type
const extension = type.split('/')[1]
const file = new File([blob], `preview.${extension}`, { type })
return file
})
}