Share customer session cookies with the storefront and polish business settings.
Keep JWT login mirrored on the tenant cookie domain, improve e-payment settings UX, and add a storefront link from the customer sidebar. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
c289de5d2e
commit
dc570c1e7f
@@ -146,6 +146,19 @@ export async function resolveHtmlEmbeddedDataUrls(html: string): Promise<string>
|
||||
return doc.body.innerHTML
|
||||
}
|
||||
|
||||
export function galleryMediaIdsAfterChange(
|
||||
previousImages: string[],
|
||||
previousIds: string[],
|
||||
nextImages: string[],
|
||||
): string[] {
|
||||
const prevUrlToId = new Map(
|
||||
previousImages.map((url, index) => [url, previousIds[index] ?? '']),
|
||||
)
|
||||
return nextImages.map((url) =>
|
||||
isDataUrl(url) ? '' : prevUrlToId.get(url) ?? '',
|
||||
)
|
||||
}
|
||||
|
||||
export async function resolveDataUrlsToMediaIds(
|
||||
values: string[],
|
||||
existingMediaIds: string[],
|
||||
|
||||
@@ -31,9 +31,8 @@ export interface MellatGatewaySettings {
|
||||
enabled: boolean
|
||||
terminalId: string
|
||||
username: string
|
||||
/** Always empty in API responses; use passwordSet. */
|
||||
/** Always empty in API responses; send a new value to replace the stored secret. */
|
||||
password: string
|
||||
passwordSet?: boolean
|
||||
}
|
||||
|
||||
export interface ZarinpalGatewaySettings {
|
||||
@@ -73,7 +72,6 @@ export const DEFAULT_EPAYMENT_SETTINGS: EPaymentSettings = {
|
||||
terminalId: '',
|
||||
username: '',
|
||||
password: '',
|
||||
passwordSet: false,
|
||||
},
|
||||
sep: { enabled: false },
|
||||
snappay: { enabled: false },
|
||||
|
||||
Reference in New Issue
Block a user