mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-08 21:38:13 -05:00
✨ Feature: add telegra.ph picbed support
This commit is contained in:
parent
883e5a1e6d
commit
dd6bfe6864
@ -68,7 +68,7 @@
|
|||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
"node-ssh-no-cpu-features": "^1.0.1",
|
"node-ssh-no-cpu-features": "^1.0.1",
|
||||||
"nodejs-file-downloader": "^4.12.1",
|
"nodejs-file-downloader": "^4.12.1",
|
||||||
"piclist": "^1.0.1",
|
"piclist": "^1.0.2",
|
||||||
"pinia": "^2.1.6",
|
"pinia": "^2.1.6",
|
||||||
"pinia-plugin-persistedstate": "^3.2.0",
|
"pinia-plugin-persistedstate": "^3.2.0",
|
||||||
"qiniu": "^7.9.0",
|
"qiniu": "^7.9.0",
|
||||||
|
@ -682,59 +682,45 @@ async function copy (item: ImgInfo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function remove (item: ImgInfo) {
|
function remove (item: ImgInfo) {
|
||||||
if (item.id) {
|
if (!item.id) return
|
||||||
$confirm($T('TIPS_REMOVE_LINK'), $T('TIPS_NOTICE'), {
|
$confirm($T('TIPS_REMOVE_LINK'), $T('TIPS_NOTICE'), {
|
||||||
confirmButtonText: $T('CONFIRM'),
|
confirmButtonText: $T('CONFIRM'),
|
||||||
cancelButtonText: $T('CANCEL'),
|
cancelButtonText: $T('CANCEL'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
const file = await $$db.getById(item.id!)
|
const file = await $$db.getById(item.id!)
|
||||||
if (await getConfig('settings.deleteCloudFile')) {
|
if (await getConfig('settings.deleteCloudFile') && picBedsCanbeDeleted.includes(item?.type || 'placeholder')) {
|
||||||
if (item.type !== undefined && picBedsCanbeDeleted.includes(item.type)) {
|
const result = await ALLApi.delete(item)
|
||||||
const result = await ALLApi.delete(item)
|
if (result) {
|
||||||
if (result) {
|
ElNotification({
|
||||||
ElNotification({
|
title: $T('GALLERY_SYNC_DELETE_NOTICE_TITLE'),
|
||||||
title: $T('GALLERY_SYNC_DELETE_NOTICE_TITLE'),
|
message: `${item.fileName} ${$T('GALLERY_SYNC_DELETE_NOTICE_SUCCEED')}`,
|
||||||
message: `${item.fileName} ${$T('GALLERY_SYNC_DELETE_NOTICE_SUCCEED')}`,
|
type: 'success'
|
||||||
type: 'success'
|
})
|
||||||
})
|
|
||||||
await $$db.removeById(item.id!)
|
|
||||||
sendToMain('removeFiles', [file])
|
|
||||||
const obj = {
|
|
||||||
title: $T('OPERATION_SUCCEED'),
|
|
||||||
body: ''
|
|
||||||
}
|
|
||||||
const myNotification = new Notification(obj.title, obj)
|
|
||||||
myNotification.onclick = () => {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
updateGallery()
|
|
||||||
} else {
|
|
||||||
ElNotification({
|
|
||||||
title: $T('GALLERY_SYNC_DELETE_NOTICE_TITLE'),
|
|
||||||
message: `${item.fileName} ${$T('GALLERY_SYNC_DELETE_NOTICE_FAILED')}`,
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
await $$db.removeById(item.id!)
|
ElNotification({
|
||||||
sendToMain('removeFiles', [file])
|
title: $T('GALLERY_SYNC_DELETE_NOTICE_TITLE'),
|
||||||
const obj = {
|
message: `${item.fileName} ${$T('GALLERY_SYNC_DELETE_NOTICE_FAILED')}`,
|
||||||
title: $T('OPERATION_SUCCEED'),
|
type: 'error'
|
||||||
body: ''
|
})
|
||||||
}
|
return true
|
||||||
const myNotification = new Notification(obj.title, obj)
|
|
||||||
myNotification.onclick = () => {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
updateGallery()
|
|
||||||
}
|
}
|
||||||
}).catch((e) => {
|
}
|
||||||
console.log(e)
|
await $$db.removeById(item.id!)
|
||||||
|
sendToMain('removeFiles', [file])
|
||||||
|
const obj = {
|
||||||
|
title: $T('OPERATION_SUCCEED'),
|
||||||
|
body: ''
|
||||||
|
}
|
||||||
|
const myNotification = new Notification(obj.title, obj)
|
||||||
|
myNotification.onclick = () => {
|
||||||
return true
|
return true
|
||||||
})
|
}
|
||||||
}
|
updateGallery()
|
||||||
|
}).catch((e) => {
|
||||||
|
console.log(e)
|
||||||
|
return true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDeleteCloudFile (val: ICheckBoxValueType) {
|
function handleDeleteCloudFile (val: ICheckBoxValueType) {
|
||||||
|
@ -12532,10 +12532,10 @@ performance-now@^2.1.0:
|
|||||||
resolved "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
resolved "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
||||||
integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==
|
integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==
|
||||||
|
|
||||||
piclist@^1.0.1:
|
piclist@^1.0.2:
|
||||||
version "1.0.1"
|
version "1.0.2"
|
||||||
resolved "https://registry.npmjs.org/piclist/-/piclist-1.0.1.tgz#6d15ec44393de38b32ba34d041511324ec7dda55"
|
resolved "https://registry.npmjs.org/piclist/-/piclist-1.0.2.tgz#7a064ef88cf364568aef1e36ea6d9582ebc6119f"
|
||||||
integrity sha512-c68ijE5Gj3E29KEc1B6F75pluldHLJvkvYmoWhNpYg1hOXGTlxepZCZm8Wp/a9NVjT8jh3zfX1fmpbFGjpOOug==
|
integrity sha512-AUuD7n72ZI9eui1q+QVCdsM7nCYiP3c2bJajOtxYT4UuppRVPoIekM+UBoeTMgSTuzT9yxXAhQH0JXZ27Iy+qg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@picgo/i18n" "^1.0.0"
|
"@picgo/i18n" "^1.0.0"
|
||||||
"@picgo/store" "^2.0.4"
|
"@picgo/store" "^2.0.4"
|
||||||
|
Loading…
Reference in New Issue
Block a user