mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-19 16:29:31 +08:00
🐛 Fix(custom): fix gallery copy bug of aws-s3
This commit is contained in:
@@ -24,7 +24,10 @@ export const formatCustomLink = (customLink: string, item: ImgInfo) => {
|
||||
|
||||
export default async (style: IPasteStyle, item: ImgInfo, customLink: string | undefined) => {
|
||||
let url = item.url || item.imgUrl
|
||||
url = handleUrlEncodeWithSetting(item.url || item.imgUrl)
|
||||
if (item.type === 'aws-s3' || item.type === 'aws-s3-plist') {
|
||||
url = item.imgUrl || item.url || ''
|
||||
}
|
||||
url = handleUrlEncodeWithSetting(url)
|
||||
const useShortUrl = db.get('settings.useShortUrl') || false
|
||||
if (useShortUrl) {
|
||||
url = await generateShortUrl(url)
|
||||
|
||||
@@ -140,6 +140,9 @@ async function copyTheLink (item: ImgInfo) {
|
||||
|
||||
async function pasteTemplate (style: IPasteStyle, item: ImgInfo, customLink: string | undefined) {
|
||||
let url = item.url || item.imgUrl
|
||||
if (item.type === 'aws-s3' || item.type === 'aws-s3-plist') {
|
||||
url = item.imgUrl || item.url || ''
|
||||
}
|
||||
if ((await getConfig('settings.encodeOutputURL')) === true) {
|
||||
url = handleUrlEncode(url)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user