mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 10:19:51 -06:00
Compare commits
1 Commits
ReviewBot/
...
ReviewBot/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0de0ca7edf |
@@ -41,20 +41,20 @@ export default function Modal({
|
||||
}
|
||||
|
||||
let placementClass = "";
|
||||
|
||||
if (placement === "bottomLeft") {
|
||||
placementClass = "bottom left";
|
||||
} else if (placement === "bottomRight") {
|
||||
placementClass = "bottom right";
|
||||
} else if (placement === "topLeft") {
|
||||
placementClass = "top left";
|
||||
} else if (placement === "topRight") {
|
||||
placementClass = "top right";
|
||||
}
|
||||
|
||||
return {
|
||||
transform: `scale(${scaleValue})`,
|
||||
transformOrigin: placementClass,
|
||||
switch (placement) {
|
||||
case "bottomLeft":
|
||||
placementClass = "bottom left";
|
||||
break;
|
||||
case "bottomRight":
|
||||
placementClass = "bottom right";
|
||||
break;
|
||||
case "topLeft":
|
||||
placementClass = "top left";
|
||||
break;
|
||||
case "topRight":
|
||||
placementClass = "top right";
|
||||
break;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -15,37 +15,37 @@ async function main() {
|
||||
return;
|
||||
}
|
||||
|
||||
const updates = products.map(product => {
|
||||
if (product.styling !== null) {
|
||||
// styling object already exists for this product
|
||||
return;
|
||||
}
|
||||
|
||||
const styling: TStyling = {
|
||||
unifiedStyling: true,
|
||||
allowStyleOverwrite: true,
|
||||
brandColor: {
|
||||
light: product.brandColor,
|
||||
},
|
||||
...(product.highlightBorderColor && {
|
||||
highlightBorderColor: {
|
||||
light: product.highlightBorderColor,
|
||||
dark: product.highlightBorderColor,
|
||||
if (products.length) {
|
||||
for (const product of products) {
|
||||
if (product.styling !== null) {
|
||||
// styling object already exists for this product
|
||||
continue;
|
||||
}
|
||||
|
||||
const styling: TStyling = {
|
||||
unifiedStyling: true,
|
||||
allowStyleOverwrite: true,
|
||||
brandColor: {
|
||||
light: product.brandColor,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
return tx.product.update({
|
||||
where: {
|
||||
id: product.id,
|
||||
},
|
||||
data: {
|
||||
styling,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
await tx.$transaction(updates);
|
||||
...(product.highlightBorderColor && {
|
||||
highlightBorderColor: {
|
||||
light: product.highlightBorderColor,
|
||||
dark: product.highlightBorderColor,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
await tx.product.update({
|
||||
where: {
|
||||
id: product.id,
|
||||
},
|
||||
data: {
|
||||
styling,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user