mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-24 01:30:16 +08:00
⬆️ Upgrade: picgo version to latest
ISSUES CLOSED: #299,#525
This commit is contained in:
@@ -2,12 +2,12 @@ import picgo from '@core/picgo'
|
||||
|
||||
const getPicBeds = () => {
|
||||
const picBedTypes = picgo.helper.uploader.getIdList()
|
||||
const picBedFromDB = picgo.getConfig('picBed.list') || []
|
||||
const picBedFromDB = picgo.getConfig<IPicBedType[]>('picBed.list') || []
|
||||
const picBeds = picBedTypes.map((item: string) => {
|
||||
const visible = picBedFromDB.find((i: IPicBedType) => i.type === item) // object or undefined
|
||||
return {
|
||||
type: item,
|
||||
name: picgo.helper.uploader.get(item).name || item,
|
||||
name: picgo.helper.uploader.get(item)!.name || item,
|
||||
visible: visible ? visible.visible : true
|
||||
}
|
||||
}) as IPicBedType[]
|
||||
|
||||
Reference in New Issue
Block a user