diff --git a/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ShareFile.tsx b/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ShareFile.tsx index 1e7a85d42..3ed2fb3c6 100644 --- a/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ShareFile.tsx +++ b/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ShareFile.tsx @@ -43,6 +43,7 @@ const styles = (theme: Theme) => createStyles({ copyButtonContainer: { paddingLeft: 16, + paddingTop: 18, }, modalContent: { paddingBottom: 53, @@ -140,7 +141,7 @@ const ShareFile = ({ const slDate = new Date(`${selectedDate}`); const currDate = new Date(); - const diffDate = slDate.getTime() - currDate.getTime(); + const diffDate = Math.ceil((slDate.getTime() - currDate.getTime()) / 1000); if (diffDate > 0) { api @@ -149,7 +150,7 @@ const ShareFile = ({ `/api/v1/buckets/${bucketName}/objects/share?prefix=${encodeFileName( dataObject.name )}&version_id=${versionID}${ - selectedDate !== "" ? `&expires=${diffDate}ms` : "" + selectedDate !== "" ? `&expires=${diffDate}s` : "" }` ) .then((res: string) => { diff --git a/portal-ui/src/screens/Console/Common/FormComponents/common/styleLibrary.ts b/portal-ui/src/screens/Console/Common/FormComponents/common/styleLibrary.ts index 19ff04b02..01748b8ba 100644 --- a/portal-ui/src/screens/Console/Common/FormComponents/common/styleLibrary.ts +++ b/portal-ui/src/screens/Console/Common/FormComponents/common/styleLibrary.ts @@ -667,11 +667,14 @@ export const snackBarCommon = { color: "#fff", }, snackBarExternal: { - top: "-17px", - position: "absolute" as const, - minWidth: "348px", + top: -1, + height: 33, + position: "fixed" as const, + minWidth: 348, whiteSpace: "nowrap" as const, - height: "33px", + left: 0, + width: "100%", + justifyContent: "center" as const, }, snackDiv: { top: "17px", @@ -684,7 +687,9 @@ export const snackBarCommon = { minWidth: "348px", whiteSpace: "nowrap" as const, height: "33px", - maxWidth: "calc(100% - 140px)", + width: "100%", + justifyContent: "center", + left: 0, }, };