mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-09-06 16:07:06 +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) => {
|
export default async (style: IPasteStyle, item: ImgInfo, customLink: string | undefined) => {
|
||||||
let url = item.url || item.imgUrl
|
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
|
const useShortUrl = db.get('settings.useShortUrl') || false
|
||||||
if (useShortUrl) {
|
if (useShortUrl) {
|
||||||
url = await generateShortUrl(url)
|
url = await generateShortUrl(url)
|
||||||
|
|||||||
@@ -140,6 +140,9 @@ async function copyTheLink (item: ImgInfo) {
|
|||||||
|
|
||||||
async function pasteTemplate (style: IPasteStyle, item: ImgInfo, customLink: string | undefined) {
|
async function pasteTemplate (style: IPasteStyle, item: ImgInfo, customLink: string | undefined) {
|
||||||
let url = item.url || item.imgUrl
|
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) {
|
if ((await getConfig('settings.encodeOutputURL')) === true) {
|
||||||
url = handleUrlEncode(url)
|
url = handleUrlEncode(url)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user