Multiple minor fixes for 2.0.1 release to improve general usability

This commit is contained in:
Frikky
2025-03-21 02:03:19 +01:00
parent f3d547b875
commit 373e5bc909
12 changed files with 145 additions and 76 deletions
+7 -3
View File
@@ -526,7 +526,7 @@ const LeftSideBar = ({ userdata, serverside, globalUrl, notifications, }) => {
<Divider style={{ marginBottom: 10, }} />
<Typography color="textSecondary" align="center" style={{ marginTop: 5, marginBottom: 5, fontSize: 18 }}>
Version: 2.0.0
Version: 2.0.1
</Typography>
</Menu>
</span>
@@ -773,6 +773,9 @@ const LeftSideBar = ({ userdata, serverside, globalUrl, notifications, }) => {
}, [window?.location?.pathname]);
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
return (
<div
style={{
@@ -785,8 +788,9 @@ const LeftSideBar = ({ userdata, serverside, globalUrl, notifications, }) => {
transition: "width 0.3s ease",
boxShadow: "0px 4px 12px rgba(0, 0, 0, 0.2)" ,
resize: 'both',
zoom: 0.8,
zoom: isSafari ? undefined : 0.8,
transform: isSafari ? "scale(0.8)" : undefined,
transformOrigin: isSafari ? "top left" : undefined,
height: "calc((100vh - 32px)*1.2)",
}}
>
+7 -4
View File
@@ -909,21 +909,23 @@ const LicencePopup = (props) => {
const priceItem =
window.location.origin === "https://shuffler.io/" || "https://sandbox.shuffler.io/"
? shuffleVariant === 0
? "app_executions"
: "cores"
? "price_1PWI3uDzMUgUjxHSffUBwWCy"
: "price_1PWI8EDzMUgUjxHSfEhUB7oL"
: shuffleVariant === 0
? "price_1PZPSSEJjT17t98NLJoTMYja"
: "price_1PZPQuEJjT17t98N3yORUtd9";
const successUrl = `${window.location.origin}/admin?admin_tab=billingstats&payment=success`
const failUrl = `${window.location.origin}/admin?admin_tab=billingstats&payment=failure`
const quantity = shuffleVariant === 0 ? selectedValue / 100 : selectedValue
console.log("Priceitem: ", priceItem, shuffleVariant)
console.log("Priceitem: ", priceItem, quantity, shuffleVariant)
var checkoutObject = {
lineItems: [
{
price: priceItem,
quantity: shuffleVariant === 0 ? selectedValue / 100 : selectedValue,
quantity: quantity,
},
],
mode: "subscription",
@@ -1141,6 +1143,7 @@ const LicencePopup = (props) => {
>
View all plans
</Button>
<Button
variant="contained"
style={{ borderRadius: 4, textTransform: "capitalize", color: "#1a1a1a", backgroundColor: "#ff8544", width: "100%", fontSize: 16}}
+1 -1
View File
@@ -48,7 +48,7 @@ const menuData = {
title: "Shuffle",
description:
"The most versatile automation engine with focus on security.",
icon: "images/icons/shuffleLogo.svg",
icon: "/images/icons/shuffleLogo.svg",
path: "/docs/about",
gaData: {
category: "navbar",
@@ -307,17 +307,16 @@ const OrgHeaderexpandedNew = (props) => {
const setSelectedRegion = (region) => {
// send a POST request to /api/v1/orgs/{org_id}/region with the region as the body
if (region === "US") {
region = "us-west2"
} else if (region === "EU") {
region = "europe-west2"
} else if (region === "CA") {
region = "northamerica-northeast1"
} else if (region === "UK") {
region = "europe-west2"
} else if (region === "EU-2") {
region = "europe-west3"
}
const regionMap = {
"US": "us-west2",
"EU": "europe-west2",
"CA": "northamerica-northeast1",
"UK": "europe-west2",
"EU-2": "europe-west3",
"AUS": "australia-southeast1"
};
region = regionMap[region] || region;
var data = {
dst_region: region
@@ -336,7 +335,11 @@ const OrgHeaderexpandedNew = (props) => {
timeOut: 1000
}).then((response) => {
if (response.status !== 200) {
toast("Failed to change region!")
response.json().then((reason) => {
toast.error("Failed to change region: " + reason.reason)
}).catch((err) => {
toast.error("Failed to change region")
});
}
else {
toast("Region changed successfully! Reloading in 5 seconds..")
@@ -347,7 +350,7 @@ const OrgHeaderexpandedNew = (props) => {
}
return response.json();
// return responseJson
})
}
@@ -1091,6 +1094,7 @@ const RegionChangeModal = memo(({ selectedOrganization, setSelectedRegion, userd
"EU-2": "eu",
"CA": "ca",
"UK": "gb",
"AUS": "au",
};
//let regiontag = "UK";
@@ -1112,6 +1116,9 @@ const RegionChangeModal = memo(({ selectedOrganization, setSelectedRegion, userd
} else if (regiontag === "ca") {
regiontag = "CA";
regionCode = "ca";
} else if (regiontag === "austrailia") {
regiontag = "AUS";
regionCode = "au"
}
}
@@ -1124,11 +1131,12 @@ const RegionChangeModal = memo(({ selectedOrganization, setSelectedRegion, userd
value={regiontag}
style={{ minWidth: 120, height: 35, borderRadius: 4 }}
onChange={(e) => {
if (userdata?.support) {
setSelectedRegion(e.target.value)
} else {
handleSendChangeRegionMail(e.target.value)
}
// if (userdata?.support) {
// setSelectedRegion(e.target.value)
// } else {
// handleSendChangeRegionMail(e.target.value)
// }
setSelectedRegion(e.target.value)
}}
>
{Object.keys(regionMapping).map((region, index) => {
@@ -1138,6 +1146,10 @@ const RegionChangeModal = memo(({ selectedOrganization, setSelectedRegion, userd
selectedOrganization.region = "europe-west2";
}
if (region === "AUS") {
region = "AUS (test)"
}
// Check if the current region matches the selected region
if (region === selectedOrganization.region) {
// If the region matches, set the MenuItem as selected
+1 -1
View File
@@ -2551,7 +2551,7 @@ const ParsedAction = (props) => {
{workflow.execution_variables !== undefined && workflow.execution_variables !== null && workflow.execution_variables.length > 0 ? (
<div style={{ marginTop: "20px" }}>
<Typography>Execution variable (optional)</Typography>
<Typography color="textSecondary">Runtime variable (optional)</Typography>
<Select
MenuProps={{
disableScrollLock: true,
@@ -2476,7 +2476,8 @@ const CodeEditor = (props) => {
var fixedcodedata = localcodedata
const valid = validateJson(localcodedata, true)
if (valid.valid) {
fixedcodedata = JSON.stringify(valid.result, null, 2)
//fixedcodedata = JSON.stringify(valid.result, null, 2)
fixedcodedata = JSON.stringify(valid.result)
}
// console.log(codedata)
@@ -398,8 +398,9 @@ const WorkflowValidationTimeline = (props) => {
nodecolor = green
branchcolor = green
} else {
nodecolor = grey
branchcolor = grey
// Green by default
nodecolor = green
branchcolor = green
}
} else {
nodecolor = green
@@ -561,8 +562,6 @@ const WorkflowValidationTimeline = (props) => {
nodecolor = green
branchcolor = green
}
var flex = index !== 0 && index !== relevantactions.length - 1 ? 1 : 3
if (nodecolor === green) {
@@ -609,6 +608,8 @@ const WorkflowValidationTimeline = (props) => {
const ballsize = 8
const topMargin = 20
console.log("CHIP: ", index, chipColor, chipBackground)
const chipStyle = {
height: 40,
minWidth: 125,
@@ -676,7 +677,6 @@ const WorkflowValidationTimeline = (props) => {
{founderror.length > 0 ? founderror : `App: ${appname} - Action: ${action.label}`}
</Typography>
} placement="top">
<Chip label={`${appname}`} style={chipStyle} icon={
<Avatar
variant="round"