Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -480,7 +480,6 @@ function extractSecondColor(item) {
|
|||||||
return (
|
return (
|
||||||
normalizeSecondColorValue(item?.Renk2) ||
|
normalizeSecondColorValue(item?.Renk2) ||
|
||||||
normalizeSecondColorValue(item?.ItemDim3Code) ||
|
normalizeSecondColorValue(item?.ItemDim3Code) ||
|
||||||
normalizeSecondColorValue(item?.Yaka) ||
|
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -536,21 +535,12 @@ function resolveProductImageUrl(item) {
|
|||||||
|
|
||||||
const uploadsPath = normalizeUploadsPath(item.storage_path || item.storage || '')
|
const uploadsPath = normalizeUploadsPath(item.storage_path || item.storage || '')
|
||||||
let publicUrl = ''
|
let publicUrl = ''
|
||||||
const thumbFolder = (typeof window !== 'undefined' && window.devicePixelRatio > 1.5)
|
|
||||||
? 't600'
|
|
||||||
: 't300'
|
|
||||||
if (uploadsPath) {
|
if (uploadsPath) {
|
||||||
// Thumbnail tercih et
|
publicUrl = uploadsPath
|
||||||
if (uploadsPath.includes('/uploads/image/') && !uploadsPath.includes('/uploads/image/t300/') && !uploadsPath.includes('/uploads/image/t600/')) {
|
|
||||||
publicUrl = uploadsPath.replace('/uploads/image/', `/uploads/image/${thumbFolder}/`)
|
|
||||||
} else {
|
|
||||||
publicUrl = uploadsPath
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const fileName = String(item.file_name || item.FileName || '').trim()
|
const fileName = String(item.file_name || item.FileName || '').trim()
|
||||||
if (fileName) {
|
if (fileName) {
|
||||||
// b2b benzeri yapi: /uploads/image/t300|t600/<uuid>.jpg
|
publicUrl = `/uploads/image/${fileName}`
|
||||||
publicUrl = `/uploads/image/${thumbFolder}/${fileName}`
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -473,7 +473,6 @@ function extractSecondColor(item) {
|
|||||||
return (
|
return (
|
||||||
normalizeSecondColorValue(item?.Renk2) ||
|
normalizeSecondColorValue(item?.Renk2) ||
|
||||||
normalizeSecondColorValue(item?.ItemDim3Code) ||
|
normalizeSecondColorValue(item?.ItemDim3Code) ||
|
||||||
normalizeSecondColorValue(item?.Yaka) ||
|
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -525,16 +524,11 @@ function resolveProductImageUrl(item) {
|
|||||||
|
|
||||||
const uploadsPath = normalizeUploadsPath(item.storage_path || item.storage || '')
|
const uploadsPath = normalizeUploadsPath(item.storage_path || item.storage || '')
|
||||||
let publicUrl = ''
|
let publicUrl = ''
|
||||||
const thumbFolder = (typeof window !== 'undefined' && window.devicePixelRatio > 1.5) ? 't600' : 't300'
|
|
||||||
if (uploadsPath) {
|
if (uploadsPath) {
|
||||||
if (uploadsPath.includes('/uploads/image/') && !uploadsPath.includes('/uploads/image/t300/') && !uploadsPath.includes('/uploads/image/t600/')) {
|
publicUrl = uploadsPath
|
||||||
publicUrl = uploadsPath.replace('/uploads/image/', `/uploads/image/${thumbFolder}/`)
|
|
||||||
} else {
|
|
||||||
publicUrl = uploadsPath
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const fileName = String(item.file_name || item.FileName || '').trim()
|
const fileName = String(item.file_name || item.FileName || '').trim()
|
||||||
if (fileName) publicUrl = `/uploads/image/${thumbFolder}/${fileName}`
|
if (fileName) publicUrl = `/uploads/image/${fileName}`
|
||||||
}
|
}
|
||||||
|
|
||||||
return { contentUrl, publicUrl }
|
return { contentUrl, publicUrl }
|
||||||
|
|||||||
Reference in New Issue
Block a user